Taking hits after pausing

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Taking hits after pausing

Post by Cody »

Took a mis-jump tonight… there I was, surrounded by half a dozen warships, and taking a hammering. I was about to hyperspace my way out of trouble, when the bloody phone rang. I hit ‘pause’… and watched amazed as a laser shot lanced across the screen, then ‘froze’, catching-up with the rest of the display, and I heard two hull hits… all after pausing the game. I dealt with the phone call, took the pic below, hyperspaced out (just in time), then went back to try it again, several times… same result. After pausing, I was taking two or three hits, then the laser beams would freeze… I even got killed a second after pausing, and got a frozen white explosion screen, before it eventually switched to the F5 screen… which was paused.

As I say, the laser shot in this pic appeared after I’d paused the game, and the rest of the display had frozen:

Image

1.74.2 on Win XP, with or without oxps (apart from Fighter Hud and a scuffed Griff Cobra).
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Very srane indeed. I occasionally have hit P the very moment a laser shot was fired, and so the beam stayed visible on the paused screen. But I never had the action going on after hitting P.

Maybe there are some script parts which are still executed when hitting P, and only stop when they're finished? Although it doesn't sound verly likely.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Playing Sounds (internal and via SoundSources or Sound.playMusic()) are not stopped/paused when the game is paused (you can see it with Hyperradio or BGS).

And changing this behaviour would probably need bigger core changes, as Oolite would have to decide which one of the currently playing channels would have to be stopped/paused and which one should remain.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

I can understand that with the sounds, but I’d expect the display to pause completely.
Taking hits, or even getting killed, a second after pausing is a bit odd… it’s no problem, though.

BTW Svengali, the latest version of BGS runs sweet… thanks.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

Odd… I can’t seem to replicate this in normal space.

I just got into a firefight with eight Vipers (now that’s what I call trouble)… every time I hit pause, everything stopped as it should. Tried it several times, with the same results… but if I mis-jump into interstellar space and get into a firefight with Thargoids, it’s really easy to replicate. I also noticed that the one or two ‘after-pause’ strikes made the energy banks flicker downwards, even though the game was paused.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1161
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

IIRC!

Pausing doesn't lock up the game, it just sets the time-elapsed-in-game for each screen update cycle to zero.

That means most events are paused.

Some events do not check how long it has been since the last frame (or the last time that event happened) before they occur and the thargoid laser is one of these (because the thargoid laser effectively never overheatsg, is how I recall I rationalised this).

Because of the way it is implemented, the pause doesn't quite work. It's a bug of some long standing (probably since the pause mode was added).

What's needed is to audit the code for events that do not check for time-elapsed or whether pause mode is active and include those checks.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Post by Cody »

Cool... and I actually understood the explanation. Thank you sir!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

It's probably brutally worse at framerates below 50 fps.
I've seen crazy-lag at <10 fps.
Post Reply