'play until shortly before death' isn't quite that

Found a bug in R'n'D? Report it here!

Moderators: Flumminator, Zomis

Post Reply
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

'play until shortly before death' isn't quite that

Post by filbo »

Well, actually that probably isn't the intended definition of the action that I get by typing '51555' or similar. It's more like 'play until shortly before end of tape'.

Where this particularly becomes important is if an old tape no longer works with the current engine. Suppose I have a saved solution tape of 6 minutes, but when playing it back in the current engine, I die at 3 minutes. At death, the tape counter suddenly jumps to 6:00, so even after one replay-to-death, the next attempt to 'replay until near death' does the same thing, trying to play back all 6 minutes and aborting at 3.

Some possible remedies:

- if the player dies before the end of the tape, use internal playback buffer to 'rewind' a few seconds from the point of death
- when the player dies during playback, truncate the in-core tape image at that point, so next playback attempt stops earlier

The point about the tape counter jumping to the end reminds me of a mostly unrelated detail (I should raise a separate 'bug' but this is so minor): after finishing a level, if you don't acknowledge the 'save tape?' question, play continues. I understand this is by design and I even asked for it; this is just leading up to: however, the time counter stops ticking. When I leave it running for amusement -- to see whether the amoeba wins (or whatever) -- I'd kind of like to see how much 'game time' has gone by. In other words I'd like the clock to keep running.

And that reminds me of a third little bug, this one I'd say is of intermediate importance between the other two: after '51555' 'play until shortly before end of tape', the game is left paused but certain display items are not updated. Taking a quick look, it appears that both time & clock *are* updated, while emeralds, dynamite, keys, and score are not. Only when I hit '5' (play) or '4' (record) do these get updated. It'd be nice if they updated at the end of the warp-to-near-end.

Summary:

[ ] Change 'warp to near end' to stop N seconds before player death *or* end of tape
[ ] Don't jump tape counter to end of tape when player ends during playback
[ ] Continue to run the clock during after-level continued play
[ ] When 'warp to near end' pauses, update all the score elements
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 'play until shortly before death' isn't quite that

Post by Holger »

These are all good and valid points! Let me comment on some of them:
At death, the tape counter suddenly jumps to 6:00
Some explanation on this one: When the player dies while replaying a tape (with or without "pause before end" mode being active), the tape gets stopped (but not paused, as it would not make sense anymore to continue a tape when the player is already dead). When the tape is stopped, the total tape playing time is displayed. That's the reason why it looks like the counter "jumped to the end".

I think the problem here is that I always refer to the game record/replay system as "the tape recorder", which gives bad analogies to how real-world tape recorders work. Instead, the better analogy would not be a tape recorder, but a CD player: If you play a track on a CD player and press the "stop" button, the counter usually shows the total playing time of the current track (but does not display the time where the track was stopped, or "00:00"). In contrast, a real tape recorder would still show the last counter value where the "stop" button was pressed, so you could continue by pressing "play" again. In this regard, pressing "stop" and "play" on a real tape recorder would be the same as pressing "pause" and "play", which is not the case on a CD player.

The problem with perfectly rebuilding button controls from a real tape recorder to the game record/replay system would be that we would also have to add a "rewind" functionality. That is, if you want to restart a tape, you would have to press "stop", "rewind" and "play" instead of just "stop" and "play" (like you would do on a CD player).

Apparently (as this issue was reported before) this is more confusing and/or contra-intuitive that I expected. :-|

Besides this detail, the problem of automatically stopping in the middle of a tape (because the player died unexpectedly) is a real one, just as you described it.
Some possible remedies:

- if the player dies before the end of the tape, use internal playback buffer to 'rewind' a few seconds from the point of death
- when the player dies during playback, truncate the in-core tape image at that point, so next playback attempt stops earlier
These are two good possible solutions for this case, the second one being the easiest, but with the disadvantage that you would need a second run of the (then truncated) tape. The first suggested solution would immediately result in the expected state, which is good. The downside would be that it might be very confusing if a 6-minute-tape automatically pauses after 3 minutes, without telling you why. This could be solved by a message like "tape truncated due to unexpected death of the player". (Another -- purely technical -- downside would be that this solution would use the internal playback buffer (game snapshot) system, which is unfortunately still buggy when used to continue recording after loading a previous game snapshot.)

So I think I will go with the second solution for now (possibly switching to the first one if I should ever be able to fix the bug in the snapshot system).

More on the other points in a separate post!
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: 'play until shortly before death' isn't quite that

Post by filbo »

How about:

Play with specified display parameters, until death; then display 'replaying to before death' (with better wording :) and silent-warp from beginning to (now known) time N seconds before death.

?
User avatar
Holger
Site Admin
Posts: 4073
Joined: Fri Jun 18, 2004 4:13 pm
Location: Germany
Contact:

Re: 'play until shortly before death' isn't quite that

Post by Holger »

Play with specified display parameters, until death; then display 'replaying to before death' (with better wording :) and silent-warp from beginning to (now known) time N seconds before death.
Hmmm, not sure if I got that?! Could you please describe it again with other words? :-|
And that reminds me of a third little bug, this one I'd say is of intermediate importance between the other two: after '51555' 'play until shortly before end of tape', the game is left paused but certain display items are not updated. Taking a quick look, it appears that both time & clock *are* updated, while emeralds, dynamite, keys, and score are not. Only when I hit '5' (play) or '4' (record) do these get updated. It'd be nice if they updated at the end of the warp-to-near-end.
That's a real, solid bug that should be fixed! :-o
The point about the tape counter jumping to the end reminds me of a mostly unrelated detail (I should raise a separate 'bug' but this is so minor): after finishing a level, if you don't acknowledge the 'save tape?' question, play continues. I understand this is by design and I even asked for it; this is just leading up to: however, the time counter stops ticking. When I leave it running for amusement -- to see whether the amoeba wins (or whatever) -- I'd kind of like to see how much 'game time' has gone by. In other words I'd like the clock to keep running.
That's a bit tricky to do while keeping the interface consistent somehow (while such things are surely always possible by using some weird debug options introduced for that purpose): After the game was solved, the tape is stopped and the time counter was counted down to add to the overall score (and is not visible anymore if the "tape request" uses the door area, of course). So "keeping the clock running" apparently refers to the tape recorder here. The problem is that no tape is running anymore at this point (neither recording nor replaying), to it would probably be confusing to see the time counter in the tape recorder still be running...

A "quick and dirty" solution would be to define a debug key shortcut that toggles displaying the current game time somewhere, similar to displaying the current FPS...
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: 'play until shortly before death' isn't quite that

Post by filbo »

>> Play with specified display parameters, until death; then display 'replaying to before death'
>> (with better wording :) and silent-warp from beginning to (now known) time N seconds before death.

> Hmmm, not sure if I got that?! Could you please describe it again with other words? :-|

Yeah, it was pretty clumsy...

I meant:

If the user said 'play until a few seconds before end of tape',
then do so (using whatever display mode they asked for -- could be normal
play speed, fast forward, warp, or invisible);

If, during that replay, the player died (before end of tape),
then display a message about what's happening,
replay again *from start of tape* (thus avoiding the resync issues),
in invisible warp mode (so it's fast),
and stop a few seconds before you know (from the first run) that the player is going to die.

====

which is more or less the equivalent of cutting the tape right before death,
then letting the player re-request the 'play until before end of tape';
but more automated.
filbo
Posts: 647
Joined: Fri Jun 20, 2014 10:06 am

Re: 'play until shortly before death' isn't quite that

Post by filbo »

For the 'continued game operation after level solved', ...

There are two time displays visible. I don't know the right terminology.
One is the _counter_, let's say, which (in most levels) counts down how much time you have left,
but in levels with no limit, counts up how much time you have consumed.
The other is the _clock_, which displays minutes:seconds in 'human readable' form.

I don't even know which of those I really want to see continue ticking!

But the 'clock' has more sensible human-readable behavior, and does not have the quirks of: counting in either direction (depending on level parameters); sticking at zero when counted all the way down from specified time limit.

I guess I actually wouldn't mind if, in the after-end-of-level mode,
*both* of those continued to tick,
with the 'clock' showing game-time since zero (divided out into minutes:seconds)
and the 'counter' showing the *same* game-time since zero (as an integer number of seconds) --
without regard to the level's original time limit or lack thereof. It is not particularly interesting to me
(though I suppose in some cases it might be), 'how much time *would* I have had left at this
point, who-knows-how-much time later than when I solved the level?'. Absolute time since
start of level is more interesting.

But I guess it would be sort of silly to show exactly the same number of seconds, in two different formats.
So let me propose this:

'clock' continues to show absolute game time since start of level
if I solved at 3:00 and 90s of after-solve time have passed since then, it displays '4:30'
and 'counter' shows time *since* solved -- it displays '90'.

reasonable?
Post Reply