Live data from Hacker News

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

kotaku.com

271–273 of 273 posts

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

#271

The ability to pause is extremely important in games (at least single player ones). I hate when games are into multiplayer modes even when played in single-player campaign (e.g.: Generation Zero) and thus cannot be paused. Another thing that I hate in this regard are unpausable cutscenes. I remember when I was playing The Witcher 3, that at last there was some cutscene advancing some plot point, and right into the mi…

The worst part is that often enough the pause key (e.g. Escape) skips the cutscene so it's a risk to even try pausing them.

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

#272
post #102
post #80

I would expect pausing to bring a game’s CPU/GPU usage down to near-zero, which won’t happen if the game keeps redundantly rendering the exact same frame. A game engine can optimize this by special casing time scale zero to simply render a single textured quad under the pause menu (which is probably what one of the commenters in TFA referred to).

You would expect it to do that, and I'd say that's a desirable behaviour, but it's not really that simple and you certainly don't get that for free. Typically any of the common modern engines with a "time scale" variable like that are not at all optimising anything in that way. It's likely that the physics engine won't be stepped with a zero delta time, which will reduce the time spent on physics, but that's more of…

It's pretty simple to add a max framerate. Which is something you should do anyway because your simulation is not going to be stable with infinitesimally small time steps just due to floating point limitations.

And Vsync is or at least should also be the default in addition to that.

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

#273
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.

Paused game does not equal paused process. It means the gameplay clock has paused. The rendering loop continues to run. The GUI is immediate mode and is still rendered. In some games visual effects continue to be rendered. If it’s a networked game the network code will continue to run.

If your GUI rendering uses more than 1% CPU and 1% GPU you're doing something wrong ;)
Post reply on HN