Zones

Published May 10, 2007
Advertisement
Spent last night grappling with the horrible codebase that is my map editor. The actual application is quite good, but the code is the worst I've ever written. It is all Win32 API stuff so would be ugly anyway but it is getting ridiculous.

Anyway, I've added in a zone system now so you can click-drag to select rectangular areas on a game map then add them as zones, which get saved in the map files and the exported game maps.

Udo now loads these zones into a std::vector and the idea is that each frame I can check to see if Udo is in any of the zones, then broadcast the zone ID to all the items.

The main reason is to be able to activate enemies when you enter certain zones, but I'm sure there will be other uses for this as well.

Better than the last system, which involved writing imp scripts to activate each enemy based on your X and Y position. Too fiddly.

I just need to grapple with Map again a bit so you can change the ID of zones once they have been created. Then you could create several zones with the same ID to create non-rectangular zones. Damn. Thought I was done with Map for now. Probably have to create a dialog box for that, which is a bugger with VC Express.

(And, yes, I know that adding a C to the start of class names is stupid. What can I say? It's a habit I just can't break.)
Previous Entry Sheep
Next Entry Configuration files
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement