• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Differences between 0.3.6 and 0.4.0

sivael

New Member
Joined
Dec 31, 2009
Messages
11
Reaction score
1
What actually is different in the 0.4.0 server? I mean - is it a total rewrite of the system or just an upgrade?

The things I'm most interested in:
- How does the amount of used memory change? Does it use less memory than the 0.3.6? If yes, then by what amount? RLMap or equivalent stats would be best because the map is big enough to show the difference well.
- How does the system time usage change? More? Less?
- How do the .lua scripts change? Is it a ready-to-go compilation of most useful scripts?
- Does some kind of a plugin system for various script chunks operate there?
- Stability mprovements are a given especially because most of the instability comes from faulty scripts, but still -what kind of improvements are made there?

SOURCE side improvements:
- I know that writing exactly what was changed and how is a bit too much to ask, but a general description of what was changed would be nice.
Like for example an implementation of qtree to remove redundant references from the tile class or a better map loading scheme that frees a node after it has been read.

I'm interested in investing in a new version since there are some changes that would require me to totally rewrite the server and I simply don't have the time for that. I've lowered the memory usage to about 83% of the original for large maps but the possilbe modifications could lower the amount by at least 40% instead of a rather feeble 17% that my mods give.

Thanks in advance,
Siv.
 
Last edited:
Thanks for that link to plans - was helpful.
So... There aren't any more modifications and optimalizations underway?
I kind of hoped there would be...
Oh well... will have to do it myself then.

Thanks:)
 
Yup. But it seems that the team doesn't want to change the main system structure and that's enough information for me to see that there won't be any major optimalizations coming.
And I saw some things from there in 0.3.6...

Actually... it's on GPLv3. So... I can branch the code(or base a new, similar project on this one) but will have to keep the GPLv3.
And that means that I would need to publish the sources... right? Freely... right? No charge... right?
Or is it like with 0.4 that they can charge people for the access to the source?
It's not like I'm arguing law or considering suing them, no. I'm just saying - if the project is on GPLv3 - do I have to publish sources or not IF(and that's a BIIIIIIG *IF*) I redo a big part of this project?
Would object files with headers be enough for publishing that work? I know, that commercial licensed software can not use GPL licensed software.

I'm asking that mainly because it's a question of market sharing. If I release my totally redone app and others would just copy the code - it wouldn't be much use, would it...

Just looking for possible options.

Siv.

EDIT: Main points for redoing the system:
- The current item-tile-lua-processing(collision detection, moving, etc...) system is totally overblown with data. It could be done much cheaper memory-wise. One idea is to use StaticItem definitions for items that are used the most and don't change, and DynamicItem definitions for items that change. That way You'd have ONE instance of grass item for the whole map. Kind of nice, don't You think?
- The current QTree imlementation is I believe a bit dodgy, it's better to allocate whole chunks of map(8x8 or 16x16 or sth...) and access them using a three-level qtree. Would be nicer I guess. And faster. And smaller memory-wise.
- Current implementation does not allow for map-patches or script chunks(as in plugin system). It would be relatively simple to do, really. And I would much more like to compile my system like adding a line: "/plugins/megawarsystem.gz" that would simply have a bunch of files appending their xml lines to main xml files to do spells, etc. No more scriptfile hell and interference between scripts.
It doesn't of course have to be a /gz. A simple dir system would do.
And map patches... well... Let's say that You've got a nice map, full of creatures and with no quests.
You add a patch, with a diff for monsters and ground, houses, etc... it adds a location and scripts for the let's say annihilator quest. And with one line, I add annihilator quest. No tedious searching for npc's, scripts and connections.
Would make the servers *much* better. Why? Currently you have a few compilations of quests and scripts and npc's that are not compatible. You'd have then a few chunks that you simply add to your project. and the chunks would be much better, because they would be polished and a new version could be loaded into the system easily.
- Current map loader... well... sucks. Takes way more memory than it should. And it would be much nicer to make an automatic converter to a native filetype that would not be so... xml-ish.
- The current LUA binding system sux. I seem to remember one of the devs saying so once...

That is basically what I have in mind, and planned, some of these already implemented(like the qtree system and a prototype of new tile/item system) and I would be very interested to know if I could pull it off without giving my sources to everyone around. Just to buy myself some time to secure this server's position on the market.
 
Last edited:
Yup. But it seems that the team doesn't want to change the main system structure and that's enough information for me to see that there won't be any major optimalizations coming.
And I saw some things from there in 0.3.6...

Actually... it's on GPLv3. So... I can branch the code(or base a new, similar project on this one) but will have to keep the GPLv3.
And that means that I would need to publish the sources... right? Freely... right? No charge... right?
Or is it like with 0.4 that they can charge people for the access to the source?
It's not like I'm arguing law or considering suing them, no. I'm just saying - if the project is on GPLv3 - do I have to publish sources or not IF(and that's a BIIIIIIG *IF*) I redo a big part of this project?
Would object files with headers be enough for publishing that work? I know, that commercial licensed software can not use GPL licensed software.

I'm asking that mainly because it's a question of market sharing. If I release my totally redone app and others would just copy the code - it wouldn't be much use, would it...

Just looking for possible options.

Siv.

EDIT: Main points for redoing the system:
- The current item-tile-lua-processing(collision detection, moving, etc...) system is totally overblown with data. It could be done much cheaper memory-wise. One idea is to use StaticItem definitions for items that are used the most and don't change, and DynamicItem definitions for items that change. That way You'd have ONE instance of grass item for the whole map. Kind of nice, don't You think?
- The current QTree imlementation is I believe a bit dodgy, it's better to allocate whole chunks of map(8x8 or 16x16 or sth...) and access them using a three-level qtree. Would be nicer I guess. And faster. And smaller memory-wise.
- Current implementation does not allow for map-patches or script chunks(as in plugin system). It would be relatively simple to do, really. And I would much more like to compile my system like adding a line: "/plugins/megawarsystem.gz" that would simply have a bunch of files appending their xml lines to main xml files to do spells, etc. No more scriptfile hell and interference between scripts.
It doesn't of course have to be a /gz. A simple dir system would do.
And map patches... well... Let's say that You've got a nice map, full of creatures and with no quests.
You add a patch, with a diff for monsters and ground, houses, etc... it adds a location and scripts for the let's say annihilator quest. And with one line, I add annihilator quest. No tedious searching for npc's, scripts and connections.
Would make the servers *much* better. Why? Currently you have a few compilations of quests and scripts and npc's that are not compatible. You'd have then a few chunks that you simply add to your project. and the chunks would be much better, because they would be polished and a new version could be loaded into the system easily.
- Current map loader... well... sucks. Takes way more memory than it should. And it would be much nicer to make an automatic converter to a native filetype that would not be so... xml-ish.
- The current LUA binding system sux. I seem to remember one of the devs saying so once...

That is basically what I have in mind, and planned, some of these already implemented(like the qtree system and a prototype of new tile/item system) and I would be very interested to know if I could pull it off without giving my sources to everyone around. Just to buy myself some time to secure this server's position on the market.

:SS I lost you after "Yup."
 
I totaly dont get the EDIT(well, I'm not good in c++ xD), but about license part: I guess you have to release source if you release executable(both for free) but you can do any changes and use it as you want

EDIT: current way of coding items and weapons is a pain in ass actually, most of attributes cannot be edited by lua and weapon can have only one additional element if I read the source correctly(everything in the abilities struct fucks up all my plans)
 
Last edited:
So... I guess that another thing TODO would be to add scripted item(weapon) events and multiple weapon effects... ya?
EDIT:
I think I found a loophole.
By leaving networking section and global application structure in GPL(and that's what I'd use from the current application) and writing a new chunk that would be a closed source library(.so) containing all the map structures, loading, items, tiles, script binding and etc... I would enable people to:
a) Modify the software to support any protocol.
b) Compile their servers freely, even with 64bit support for networking needs while a .so would handle all the work server-side.
c) Close my source from evil people.
d) Make it 100% legal to sell the copies of this software thus making it popular. And without providing the sources to potentially valuable code.

What do You think?
 
Last edited:
Well, many of your ideas have been around for a while and might be implanted sometime. For the third step you got "mods".
 
Yes, mods allow you to modify the scripts, true. But not the map and what's more - they sometimes conflict with each other, and they have to consist of a single file. At least as far as I know.
My solution would be much cleaner.
Also, you have to resort to dirty tricks to ensure the mod loading order while a simple dependency check would suffice.
Ok. I know, that I'm not being original. But seriously... how long were these things around? 3 years? 4?
I made a working prototype of the new item structure in a *week*.
If someone was to do that, they have *epic* lags:p
So... I'd like some feedback on the license thingie.

Thanks! :)
 
stian, maybe you can answer me few questions:
was there any serious reason of making abilities struct in items?
why I have to use functions likegetAttack() instead of just one big getAttribute("attribute")(it probably made source way bigger)
and why when weapon have more than 2 elements only 2 last declared are displayed on attack(was it reason of making only one nonphysical per weapon? is it client sided or just I'm too dumb to make it proper way?)
 
if im understanding all ur ideas correctly it sounds good. i wish i knew more about C++. i dont think the "map-patch" idea is any good. its really easy just to open it and important the new map to the old map.

i know u can change the sources and that you can distribute it but i dont know if u can charge for it. oh and also technically 0.4 isnt being sold. its a pre-release available to donators. and like zakius a bunch of things in 0.4 are also in 0.3.6
 
I read about GPL and actually *Everyone* can charge a fee for the binary and the sources xD
So... You can charge a fee from anyone for distributing the application. But so does the person you sell it too :p And he can copy it and distribute any way he wants:p
Weird, but You can read about it on the GPL site:p

Ok. Map-patches are quite important. For example, I made a small quest for two players working together to solve a nice little puzzle involving switches, buttons and a bunch of demons.
Now... to implement such a quest in the normal map system, You'd need to open up the map, paste the selected floors in the appropriate place, check for errors, save the map and send it to Your server, then restart it. What I suggest is a system when You don't even need to shut your server down. Instead, just put in the map and script plugin, that gets new UID's, and AID's for the selected actions, then, as a god, go into the starting place, invoke a command to show you how everything would look if you patched the map like that(every quest would have an anchor point to put it on the map), then traverse the newly created areas and confirm it. Now: no UID, no AID conflicts. Easily solvable errors(small size of the patch allows for quick and painless uploads to check if the map, AID, UID, and such are placed correctly)
Imagine trying on a quest that's actually available only for You, and only You can see it, You can turn it off anytime You want to(if You found a bug in a quest, you can temporally disable it, fix it and turn it on again Without the need to shut down the server at all.)
I mean... isn't that cool? :D

Ok. Back to work. I just finished setting up a new rack server in our server room and it was *hell*. Hot. Loud. My feet ache.
 
how would u set where to anchor it? it still would need to be in a place that isnt overlapping the current map. and if it was off in some random place how would u get there? well i guess /send xyz would still work but ud still need to know the coordinates. alright maybe ill like it/if once i try it.
 
Back
Top