Monday, October 29, 2007

TankWars Editor Interface Complete

I've completed the TankWars level editor interface... you can now change the tiles on the tilemap and place game objects on the screen such as Tanks, Helicopters, and rocks. My group member is working on loading and saving a level with XML, and once that is done, the editor will be able to load up levels, edit them, and then save them back as XML files.

The editor is really simple and consists only of 'hotkeys' to edit. The most difficult part for me was simply trying to think in terms of a scene graph, but that took me a day or so and then I figured it out. The way I have my scenegraph set up right now is like so...

WorldTransformNode
-> TileMap (draw all the tiles)
--> Mouse notify node (sends signals to tilemap when mouse is clicked, gives relative mouse coordinates to the tilemap, based on transformation)

The advantage of the scenegraph is not having to calculate transformations myself, which saves a lot of hassle and is worth it once it is figured out.

Also, one of the aspects of Arc v.3 that I'm looking forward to is a large reduction of code without any loss of features :) This will be accomplished by moving all physics code to another project, simplification of the scenegraph, and reliance on Tango's template containers, as well as a possible re-factor.

No comments: