• entries
    743
  • comments
    1924
  • views
    580040

Zones

Sign in to follow this  
Aardvajk

76 views

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.)
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now