Live data from Hacker News

Game devs explain the tricks involved with letting you pause a game

kotaku.com

221–230 of 273 posts

Re: Game devs explain the tricks involved with letting you pause a game

#221

One of the things I was thinking about with regards to pause and or save games, is the need to control all aspects of real time logic, with possibly stopping/resuming, and saving it to disk is how our current ways of doing async is incredibly lacking. Unity has introduced the idea of coroutines (which were essentially yield based generators), and people started using them, and immediately encountered problems with pa…

I understand why coroutines are an issue for saving, but why are they an issue for pausing? Don't you just not resume the coroutines while paused?

It depends. If you are using `yield return new WaitForSecondsRealtime(x)` then the coroutine keeps running when you set TimeScale to 0, but that's usually a feature and not a bug, since it lets you potentially use them when paused (since async/task C# stuff was usually been a bit sketchy, though it's definitely better now).

Some more info here (and in general about pausing in Unity): https://gamedevbeginner.com/the-right-way-to-pause-the-game-...

Re: Game devs explain the tricks involved with letting you pause a game

#222
post #163

Earlier quoted context omitted.

There's a book I read a while back named "Longitude" that maps the storied quest in science to improve upon dead reckoning by devising greater and greater accuracy in time pieces used on ships. Iirc it was a fun read if anyone else finds that sort of thing interesting (as I do.)

It's a great read! A story of how the scientific elite stalled progress because the right answer wasn't the one they hoped it would be, and didn't come from the sort of person they thought it should. If you get the chance, you can see some of Harrison's chronometers at the Royal Observatory in London, though I don't know if they're always on display. I'll add a recommendation for Sextant by David Barrie.

Thanks for the recommendation, I'll add it to the shortlist!

Re: Game devs explain the tricks involved with letting you pause a game

#223

One of the things that impressed me in Quake (the first one) was the demo recording system. The system was deterministic enough that it could record your inputs/the game state and just play them back to get a gameplay video. Especially given that Quake had state of the art graphics at the time, and video playback on computers otherwise was a low-res, resource intensive affair at the time, it was way cool. It always s…

Supreme Commander 2 savefiles appear to be a list of timestamped user interface inputs and unit commands

Yeah they used determinism, few bit can be read about here:

https://gafferongames.com/post/floating_point_determinism/ https://www.forrestthewoods.com/blog/synchronous_rts_engines...

Re: Game devs explain the tricks involved with letting you pause a game

#224

I would prefer to understand why a paused or backgrounded game still manages to consume a ton of CPU or GPU Like, you're still just churning away at the main game loop while literally nothing else is happening except for you waiting for me to unpause it ? Because THAT would be an actual achievement. Hell, I can suspend any process from the Unixy side of things by sending a SIGSTOP signal, for a far more perfect "paus…

But if you were a game dev, you would understand why it‘s not as easy as it seems to outsiders. :)

Re: Game devs explain the tricks involved with letting you pause a game

#225

I would prefer to understand why a paused or backgrounded game still manages to consume a ton of CPU or GPU Like, you're still just churning away at the main game loop while literally nothing else is happening except for you waiting for me to unpause it ? Because THAT would be an actual achievement. Hell, I can suspend any process from the Unixy side of things by sending a SIGSTOP signal, for a far more perfect "paus…

Because the engine is still running, even in a paused state, the game still has to show something and process input. Sometimes there is a menu too, sometimes the game is not completely frozen: flames may flicker for instance.

In the article, there is a case where the game takes a screenshot and disable costly rendering, presumably to deal with this problem. But the thing is that most games are designed to to be actively played, not paused for extended periods of time and having an active pause for a couple of minutes isn't going to destroy the environment.

For backgrounding, is is common for games to run at a much slower framerate to save resources.

Re: Game devs explain the tricks involved with letting you pause a game

#226

One of the things that impressed me in Quake (the first one) was the demo recording system. The system was deterministic enough that it could record your inputs/the game state and just play them back to get a gameplay video. Especially given that Quake had state of the art graphics at the time, and video playback on computers otherwise was a low-res, resource intensive affair at the time, it was way cool. It always s…

It wasn't deterministic. It didn't record the inputs. It recorded the basic state of the objects you could see.

Deterministic game sync is a completely different approach more often used in RTS games. Quake had non-deterministic authoritative central server + clients getting an incomplete view of the world.

Re: Game devs explain the tricks involved with letting you pause a game

#227
post #144

If your game uses more than 1% CPU and 1% GPU when paused you're doing something wrong. A damn blurred screenshot should not make the GPU consume hundreds of Watts.

See this video: https://youtu.be/dVWkPADNdJ4?t=19m10s

Taken from this comment: https://news.ycombinator.com/item?id=47825155

Obviously not every game is doing that level of styling, but often a lot of stuff might still be happening when a game is "paused" for various reasons e.g. aesthetics, or handling input for pause menus, which usually offer you the ability to change all the games settings, e.g. video resolution, volume levels, etc. and also provide you with audio/visual feedback when you make choices, which requires keeping the audio engine running as well as rendering to the screen @ 60 fps.

Re: Game devs explain the tricks involved with letting you pause a game

#228
post #15

One of the things that impressed me in Quake (the first one) was the demo recording system. The system was deterministic enough that it could record your inputs/the game state and just play them back to get a gameplay video. Especially given that Quake had state of the art graphics at the time, and video playback on computers otherwise was a low-res, resource intensive affair at the time, it was way cool. It always s…

I'm pretty sure it's because it's in fact 'just' a cool side effect to a common network architecture optimisation from the time where you could'nt send the 'state' of the entire game even with only delta modifiers and so you make the game detertministic to only synchronize inputs :) an exemple article I remember : https://www.gamedeveloper.com/programming/1500-archers-on-a-... The main downside which probably caused…

Quake 1 ran game logic and model animation at 10 ticks per second (a reasonable choice when PCs running Quake at 20fps were impressive).

Camera and linear motion of objects were interpolated to the framerate.

Re: Game devs explain the tricks involved with letting you pause a game

#229

I’d love to hear about the 2020 release of Microsoft Flight Simulator, which had an “active pause” feature that they hyped as a big innovation for that release. You could pause and switch camera angles and see what was going on, then quickly resume. Pretty much the whole game was still interact-able, but with your plane’s position paused. It was supposed to be a nice user-friendly way to pause while you checked gauge…

> which had an “active pause” feature that they hyped as a big innovation for that release

So my memory might be playing me a trick, but wasn't that already the case in FS2002 and 2004? I seem to remember using the pause as a kid to look at my plane under every angle.

Re: Game devs explain the tricks involved with letting you pause a game

#230

Earlier quoted context omitted.

This is a great idea, but respectfully, if you're going to get traction you need to be the one instigating getting people to talk to you. Have a pitch, have an explicit ask, and be willing to put effort into making it happen. Fantastic idea though, you should do it.

There are a few of these floating around for older games, but the world needs more: Ara technica has a war stories feature on game development. https://arstechnica.com/video/series/war-stories For apple 2 games John Romero did a podcast. It’s decent but he seems to have stopped doing them. https://appletimewarp.libsyn.com/ Or YouTube Ted dabney experience has a lot of interesting interviews with older arcade game des…

Sid Meier's Memoir! is exactly that, Sid Meier wrote a memoir which is indeed mostly war stories of his involvement in making games.
Post reply on HN