Tuesday, May 06, 2008

Metal Glove Solid: Now with a map

No, your eyes do not deceive you, you really can see some bona-fide collision-detectable walls in the screenshot on the right. They are the two blue vertical lines.

But the fun doesn't stop there. You may have also noticed the small yellow square in mid-flight downwards towards the white square "ghosts". Yes indeed, that would be a bullet - I have also implemented shooting. I'm still debating whether to allow the player to fix the direction of shooting in a Llamatron kind of way, but I'll do that as part of the gameplay tweaking later when I determine the speed of all the movement.

Whenever writing games that involve some kind of "map" (i.e. most of them), there's always the perpetual problem of how to design it. I always like to get something up and running as quickly as possible, so instead of writing a custom mapping program, or implementing a way to "design-as-you-play", I simply use a spreadsheet program (OpenOffice of course). This is a picture of the map data for the dungeon shown in the screenshot:-

As you can see, by using colours it makes it far easier to see the layout of the map, and when saving it as a CSV file, all the colour is stripped from the file leaving a nice flat file of data for the import code to read. Designing the map couldn't be easier once all the different sections have been placed at least once; it's just a case of copying/pasting about, and then re-saving as a CSV.

Another bonus is that any hackers can edit the CSV files and make up their own maps very easily. My other games Laser Tactics and DangerMan (among others) use this method, though as of yet nobody has told me that they've been bothered.

1 comment:

ghoulsblade said...

probably overkill here, but might be worth a look if you ever get sick of using openoffice for mapediting ;)
a few generic map-editors :