opened
larryhastings
username_0
If there's only one dam left in a level, and you blow up that dam and die in the same logical frame, e.g.:
 * you're standing on an bomb that blows up the dam
 * you're standing next to the bomb that blows up the dam
 * you're standing on the dam when it blows up

Then you both die and win the level simultaneously.  The game displays both "You Won!" and "Oops!", one on top of the other.  In my experience the game always behaves as if you won, and pressing Space goes on to the next level / title screen.
If player wins and dies on the same frame, both happen
issue
created
larryhastings
username_0
I'm fixing this by adding a 1-frame timer between finishing the level and displaying the "level complete" or "you won" message.  That way, if during the calculation of the final level state, you die, that happens first.

There's also a new "level.level_complete" flag gating the UI.  So now if the game tries to call more than one (you died *and* you won) on the same frame, the first one called will win.  This could still happen, but it will be immensely less likely now that I've added the one-frame timer.

I think the logic to display charred-and-smoking-Jim or frozen-Jim is done separately from displaying the "oops!", and while the "oops!" obeys this new level flag, the damaged Jim graphics don't.  So you could still die and win on the same frame, and Jim would get shown charred or frozen, and it still says You Win!  I guess I can live with that.
comment
closed
larryhastings
username_0
issue