In the last few weeks, I have been working on different parts of the game. I believe in iterative implementation rather than doing a whole feature right away. There are 2 reasons for this, first I dont believe it is possible to see if a feature works in the game if I cant play with it fast (even if it is buggy) and I believe it keeps ideas flowing and development fresh to develop iteratively.
So for the last few weeks, I have been working on different prototypes for a few important features in the game.
I] Map Editor
One of the most important thing in Forsaken: Year One will be the map generator. So far I had been working with a small handmade map, where I placed all the buildings by hand, but it is not ideal for a lot of reasons.
I started playing around with a map editor that would take multiple textures as input and generate a map. This is a very early prototype and will need a lot of improvements, but here is the basic idea:
- First I generate different textures in any painting program (each pixel will be a tile in game). One texture is for the terrain, one for the roads and one for the buildings (I will probably add others, for example for the trees, rocks, zombies densities...).
- Next each color used in the textures is mapped to game elements. The mapping is done using an xml file which is read in the game.
- Finally I load the png and go through each pixel using the color information and the xml, and I generate each tile for each texture, swapping the texture as necessary.
One of the next things that I will work on is getting rid of the ugly seams when generating the map and generating zones with higher densities of trees (which can also be defined for higher densities of zombies).
II] Resources List
Forsaken: Year One has a lot of resources. At the moment, there are about 100 and I plan on growing it a lot more than that. All the resources are represented in xml files (more on that in a later post), with information on the affects they have, their cost, and any other relevant information.
With such interconnected resources and huge documents, it is really hard to visualize what is already there and how they are connected. I was looking for a solution to solve this problem and the best thing I came up with was to display the resources and connections in a diagram software. (http://dia-installer.de/)
Even though this is not yet ideal, it makes everything a lot clearer and easier to modify and extend. It is still missing some interesting features, such as visualizing the connection by clicking the resource box, and most importantly have it parse an xml file and be able to output a result xml file to be used in the game.
Resources display in Dia
The last thing I have developed is a basic storyteller. The idea is that all game elements will be generated by this storyteller, given a unique set of rules. Keeping the generation in a specific class or set of classes will allow me to easily expand a given storyteller and implement new ones with different set of rules. It also allows us to modify generation parameters easily given any context.
The current storyteller randomly generates game elements and keeps track of everything that has already been generated.
A future interesting storyteller would be having one that checks the game state before making any decisions. For example, if the user already owns 1500 food, no additional food will be generated until the player’s reserves decrease. So it could either give the player what he needs at all times, or on the contrary try to keep him on his toes and never allow him to have a flourishing society and always have to fight for every resource and take some tough decisions (exile one of his survivors so that the other can survive a little longer)
Thank you for reading through the entire text, and don’t hesitate the comment and share your thoughts on the game, I love hearing about it, and it will help me make the game better!