My game is based partly on the idea of an evolving world. NPC cities expand, monster colonies roam towards areas they find valuable (due to resources or other) and players can build and expand cities.
This is all fine and dandy, but presents me with somewhat of a problem when it comes to updating and expanding the world. I'm in the process of building a map editor at the moment, and it occured to me that I'm going to run into issues once the game runs live.
The game runs off MySQL, and to support the map editor I'll clone the main database on a weekly basis to a 'test' database, that the map editor can draw from. This means a level editor can make changes as they like, without impacting the game which runs live 24/7 (outside of patch dates). However -- What if Jimmy decides to build a city in an area where a developer is currently editing a map? Or what if a monster colony decides to migrate off a map that a developer is working on, they push their changes live and suddenly it'll warp back to where it was before!
The way I see it, I have 3 choices. Two of which are very hard to implement, one of which I'm going to have a hard time fitting into the game as it is. Lets start with the easy one:
1) All cities become teleporters from a 'world map'. This means players can't influence actual real-estate outside of their own instance, which a developer should never have to edit. The same goes for 'monster colonies', which become 'points of interest' on the world map. This means nothing editable runs the risk of 'intruding' on something else.
2) I try and cook up a system that does the equivelant of an intelligent diff between how the area looked when the developer checked it out, how it looks now in the live version and how it looks for the developer. I'd have to account for a variety of headache-inducing situations here.
3) I scrap the idea of a map editor and move the map editing tools into the game client, allowing the level editors to edit the 'live' world. This means changes can't be pushed periodically, they'll show up right away - Areas can of course be 'closed off', but that might make the game unplayablee.
Because its the only sane option of the above, I am of course mostly considering #1 so far. However, I wonder if someone has an approach I hadn't considered? :/ If the game didn't include a model of frequent changes, this would be a non-issue.
Apr 16 2009, 1:45 pm