Mycal
Staff member
One thing I have been trying very hard to do in comparison to a few free ORPGs, is to separate the actual game from the game editors. The world editor was my effort to do this and so far, it's great in idea, but not in functionality.
The big problem is storage of player created objects. Let's focus on maps in general, but this does apply to pretty much every aspect of the world editor. When a map is created, you give it a name, size, and then fill in the rest of the information as you go. When you are done creating a map, you save it. Here lies the problem. For accessibility, I've made the main method of storing maps as XML files. I also allow binary maps and a local database (using sqlite3) format. XML files are very easy to examine and fork into a new editor if necessary, while binary maps are very small and read and write very fast. Either method is relatively fast and the difference in sizes isn't really enough to make a huge difference. But this is done simply to share maps with other developers easily as well as easily editing of incomplete maps in the absence of an internet connection.
Now the real problem is connecting maps to one another. In the past, we used a simple number from 1-5000 to store and link the map. This isn't ideal since you have to first lookup a free map number and ensure that no one is currently working on said map, etc. So when I ported the code, I chose to use the map name as a means of linking, but here lies another problem. No matter how much I may urge, I can see developers naming maps exactly the same. So I added an optional variable that adds an area name for maps that belong together. However, again, there may be some reason for which you don't want to name a map at all. So then I decided on the filename of the map, but now we run into the issue of how to use this in the final database of maps? What if someone inadvertently names the map the same thing?
So now I have one more idea, but perhaps I should also poll the (currently inactive) developers. I am now going to generate a unique GUID for each map upon creation. This will be used to link maps in the final database. Of course while in development, we can't assume that you'll have to find, copy, paste, etc the GUID, so the world editor will work like this for now. When linking a map, you select the file in which you want to link, then the worldeditor automatically fills in the GUID for you. Does this sound acceptable to all developers?
This will make, both map names and area names as completely optional. Areas will eventually be compiled together in a single file for ease of access, so it is still recommended to use areas.
The big problem is storage of player created objects. Let's focus on maps in general, but this does apply to pretty much every aspect of the world editor. When a map is created, you give it a name, size, and then fill in the rest of the information as you go. When you are done creating a map, you save it. Here lies the problem. For accessibility, I've made the main method of storing maps as XML files. I also allow binary maps and a local database (using sqlite3) format. XML files are very easy to examine and fork into a new editor if necessary, while binary maps are very small and read and write very fast. Either method is relatively fast and the difference in sizes isn't really enough to make a huge difference. But this is done simply to share maps with other developers easily as well as easily editing of incomplete maps in the absence of an internet connection.
Now the real problem is connecting maps to one another. In the past, we used a simple number from 1-5000 to store and link the map. This isn't ideal since you have to first lookup a free map number and ensure that no one is currently working on said map, etc. So when I ported the code, I chose to use the map name as a means of linking, but here lies another problem. No matter how much I may urge, I can see developers naming maps exactly the same. So I added an optional variable that adds an area name for maps that belong together. However, again, there may be some reason for which you don't want to name a map at all. So then I decided on the filename of the map, but now we run into the issue of how to use this in the final database of maps? What if someone inadvertently names the map the same thing?
So now I have one more idea, but perhaps I should also poll the (currently inactive) developers. I am now going to generate a unique GUID for each map upon creation. This will be used to link maps in the final database. Of course while in development, we can't assume that you'll have to find, copy, paste, etc the GUID, so the world editor will work like this for now. When linking a map, you select the file in which you want to link, then the worldeditor automatically fills in the GUID for you. Does this sound acceptable to all developers?
This will make, both map names and area names as completely optional. Areas will eventually be compiled together in a single file for ease of access, so it is still recommended to use areas.