- Joined
- Jul 14, 2011
- Messages
- 3,213
Well, I'm making a Bomberman map.
Every bomb is placed on the position of the caster, and that bomb is centered on the region the unit is standing at (all the map is covered with 512/512 regions)
Now, I create 4 dummies everytime a bomb explodes and move them in each direction, these units kills or destroys anything in the path (unless they colide with a structure or a highger clifflvl) But using dummies that way leaks a lot, and takes too much resources. Besides, I would like to create an Exclamation Mark on the squares that any of the bombs will reach, so units can escape (if they're fast enough).
I think that creating 1 Killer and 1 exclamation mark in each region, and unhiding it when is reached by a bomb and give the owning of the unit to the owner of the bomb that exploded, so the kill goes for that player, and then hide the unit again... Would be more efficient, but way harder for my brain :$
I could also Pick every unit in a given region but that would require a lot of Group creation and Destroying (Unless I add every unit in the region to a group, kill them, then clear the group).
Every bomb is placed on the position of the caster, and that bomb is centered on the region the unit is standing at (all the map is covered with 512/512 regions)
Now, I create 4 dummies everytime a bomb explodes and move them in each direction, these units kills or destroys anything in the path (unless they colide with a structure or a highger clifflvl) But using dummies that way leaks a lot, and takes too much resources. Besides, I would like to create an Exclamation Mark on the squares that any of the bombs will reach, so units can escape (if they're fast enough).
I think that creating 1 Killer and 1 exclamation mark in each region, and unhiding it when is reached by a bomb and give the owning of the unit to the owner of the bomb that exploded, so the kill goes for that player, and then hide the unit again... Would be more efficient, but way harder for my brain :$
I could also Pick every unit in a given region but that would require a lot of Group creation and Destroying (Unless I add every unit in the region to a group, kill them, then clear the group).