TFMurphy
Level: Smitemaster
Rank Points: 3118
Registered: 06-11-2007
IP: Logged
|
Tar Babies from Explosions (+3)
I recently learned that the new bomb code's been causing yet more problems - this time with tar babies. It seems that the movement order of babies has been changed, since exploding tar is now dealt with in a different way.
What Used To Happen
It used to be that explosions happened to squares as soon as the explosion reached that point. The order was basically to expand from each bomb, starting with squares close to the bomb and working outwards. Basic order each square was checked in was NW, N, NE, W, E, SW, S, SE. Each bomb was completely finished with before any new bombs that were hit by the explosion were looked at. This dictates the order tarstuff was removed, and thus where babies were spawned in which order.
What Now Happens
Now the entire explosion is calculated, creating an area of squares that are hit by the explosion. The order in which the bombs explode does not matter. Once the entire area has been worked out, the squares affected are 'exploded' one at a time, starting from the leftmost column and working down, and then moving to the right, one column at a time.
===
This creates a movement order change in generated babies from bomb explosions. And because of this, certain demos will likely be invalid (one example brought up was Smitemastery 101: Mucky Museum: 1N1E).
So, what can be done about this? Here's the two main possibilities:
1) Leave as is. There's a logic in it that's easy to understand, and we're already quite a while out of beta on our latest patch. We may want to patch 2.0 to bring it up to speed for CaravelNet highscores though. But this has the downside of invalidating quite a number of old demos.
2) Revert to the old ordering. This is actually fairly easy to do: currently, the variable 'explosion' in CDbRoom::ExpandExplosion is a CCoordSet. If this is changed to a CCoordStack, then we can replace explosion.has with .IsMember, .insert with .Push, and use a while loop with .PopBottom in CDbRoom::BombExplode and CPhoenix::Explode to treat it like a queue, getting the order as originally intended.
The downside here is that we're catching this a little late. Also, reverting using the current code brings another order change to something else: orbs activated by explosions were long ago shifted to the current ordering unintentionally by the same type of bugfix that caused this tarstuff change. It's a lot harder for orbs to be an position that this order change would be noticable, but it can be done, notably with a pair of orbs where one opens and one closes the same door. I don't think this would impact as many rooms as the tar baby order does (if orb ordering affects any rooms at all), but it's certainly an issue.
===
Anyways, I'm not sure what's the best course of action to take, but there's the situation as I see it. Please feel free to add anything you think may help.
|