I’ve resumed working on my NES game engine after a long while. I don’t presume a lot of people will be reading this, but it’s a nice way of keeping track of how things progress.
Couple of days ago I decided to start working on a NES map editor, seeing that there very few NES specific map editors available, none of which fulfilled my requirements. Fortunately, after some research I found Tiled, which is a very nice, generic map editor with a good user interface (a rarity). It is simple, but very flexible. The map and tileset data can be exported as XML, so it’s easy to convert to NES specific formats. I already wrote a Python tool to convert *.tsx files (and the images referenced within) to metatile and CHR data and another tool for converting the *.tmx files, which contain the actual map data. I tested the tools by taking a picture of a map from Batman (from here), converted it using tools provided with Tiled (with slight modifications) to a TMX map. All worked well.
The only real issue I have with Tiled is that adding properties to a lot of tiles is not very easy. Each tile needs to be individually right-clicked, a new dialog opened and the property name and value manually typed in. Manually editing the XML files solves this problem to some extent.
After finding a reasonable solution for editing maps, I started looking for a good pixel graphic and animation tool. Unfortunately, I haven’t found the perfect candidate yet. GraphicsGale is the best so far. It has almost everything I want, except features for editing hotspot and collision points. In fact, I couldn’t find any editor which would allow that and exporting said data. I may settle with placing the collision points on a different layer, then exporting that layer separately from others. Or maybe I’ll write code to parse the *.gal file directly if I can find the file format specification somewhere. Anyway, this is not a huge problem.
Finally, I researched and implemented a better camera system for the engine. I posted about it here. It still needs some work, but it’s already a lot better than the old system which simply followed the player rigorously.
Today I decided to start looking for some good placeholder sprites for the player itself and settled on a sprite from Shatterhand. I found a sprite sheet here. Cutting the frames out of the image to form an animation is kind of a pain, because the sprite sheet doesn’t contain any information about the hotspots of the frames. I simply aligned the frames so that his head stays still, although I’m still not sure if that’s correct. Result can be seen on the right.
After converting the sprite and putting it in the engine, the next task I’m planning to do is to get object data exporting working from Tiled, design a simple enemy and finish the level object spawning code. After all of this is done (shouldn’t take more than a week if I can stay motivated) the engine would be in a pretty good shape.