- Joined
- Jun 9, 2008
- Messages
- 309
In my current project, I have several mechanics that depend on regions. One I especially like is that a unit's armor and art will adapt depending on what "climate zone" they are in.
My first impulse was to make it a simple "unit enters region" trigger (whenever a unit enters the region, it gets the specific upgrades or downgrades).
The trouble is, in my 480x480 map with 23 players, I cannot shake the feeling that anything that uses regions makes the map more unstable and likely to lag or to crash. It seems it cannot perfectly handle potentially hundreds of units triggering the action all across the map.
So I am looking for alternatives. One thing I considered using other events than "enters region", say "unit is given an order" and then check "is in region" in the conditions. Not sure that makes it less hard to handle for the computer, though.
Another idea I had was to place dummy units that cast spells on any nearby units, and that specific spell casting triggers the actions. But that's obviously kinda messy, and I haven't tested it yet.
I don't want to check every unit in the map periodically, that sounds like a bad idea.
The most simple solution might be to have much smaller regions, subdivide every "climate zone" into much smaller units, but of course that is a bit annoying to put in place, too.
Any thoughts?
My first impulse was to make it a simple "unit enters region" trigger (whenever a unit enters the region, it gets the specific upgrades or downgrades).
The trouble is, in my 480x480 map with 23 players, I cannot shake the feeling that anything that uses regions makes the map more unstable and likely to lag or to crash. It seems it cannot perfectly handle potentially hundreds of units triggering the action all across the map.
So I am looking for alternatives. One thing I considered using other events than "enters region", say "unit is given an order" and then check "is in region" in the conditions. Not sure that makes it less hard to handle for the computer, though.
Another idea I had was to place dummy units that cast spells on any nearby units, and that specific spell casting triggers the actions. But that's obviously kinda messy, and I haven't tested it yet.
I don't want to check every unit in the map periodically, that sounds like a bad idea.
The most simple solution might be to have much smaller regions, subdivide every "climate zone" into much smaller units, but of course that is a bit annoying to put in place, too.
Any thoughts?