Friday, December 7, 2007

Map Editor, Tile Engine

I've begun to build a map editor. Before I got too far, however, I decided I had to beef up the tile engine a little. The game now reads a text file with info on a tileset for a map, such as the image's path, the size of a tile, and so forth. Also, on the spur of the moment, I added the capability to animate the tiles. Anyway, I tested it and voila, it worked. Of course, nothing on the screen had changed, but the new code had worked nonetheless.

Next, I wanted to test the animation code, so I took my one tile and put a duplicate right next to it with some highlights. I set the duration for each frame as half a second. It worked. There were no errors. None. I got it on my first try. That's a first. Anyway, I changed the frames again so that the highlighted one only flashed every so many seconds, so it was more like lightning than a consistent blinking light. Not that I'm keeping the animation for good, but I want it to look as good as it can until I add more tiles. And I won't be adding tiles until I have a working version of the editor. And even then I'll probably only add one more tile.

There you have it. A decent tile engine. I'm planning on sticking with it unless someone suggests something better.

Suggestions? Questions?

clevceo

No comments: