So far I have implemented the features of the original:
- 7×7 tile view port of a larger map
- player can move though the map, by clicking on it
particular terrain tiles block movement
One major feature that I want to implement is a map editor. I plan the following changes to the code to get this the way I want it:
Move the map data to a database or file. Presently this data is in a hard coded array of strings. I am looking at changing this to a two dimensional array of objects with each object containing all the information about the tile.
- Create a tileset to contain all of the terrain tiles. Presently these are just images with the same prefix and ending in a number which identifies the tile and what it can do. I would like the tileset to be a collection of objects each which can have different data associated with it – such as the image file and other game data like whether the tile blocks movement.
Other things to do include improving the interface. I’d like to highlight the tile with an outline when the player mouses over it. I’d like to provide feedback when a player clicks a tile. Etc…