Live data from Hacker News

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

kotaku.com

181–190 of 273 posts

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

#181
One game that I thought had a great "pause" feature was Dragon's Dogma, you can pause the game mid fight to use items that heal or remove status effects. At first I felt this was kind of cheesy, but due to the games inventory weight limits it actually made traveling long distance or tackling dungeons more strategic because you had to bring the appropriate items for the enemies you'd be facing and use them sparingly or you'd be in trouble. Further into the game it actually felt like it required more strategy and planning, I thought it was pretty great game design and really liked it.

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

#182
post #109

Earlier quoted context omitted.

the notion of using time directly in gamedev has always confused me; it feels like the correct answer should be to simply have a notion of turns, and a real-time game simply iterates over turns automatically. And then so many turns are executed per second It's a simulation; why should clock time be involved to begin with? The only things that should care about clock time are those that exist outside the sim, e.g audi…

Simulation can proceed in logical time but animation is necessarily tied to wall clock time in order to be perceived as smooth and consistent by a human viewer.

In that case, animation belongs to the same category as audio — it exists outside the simulation state.

But I’m not 100% that’s even true; in the context of replay, I imagine it’d be more appropriately part of the sim for it to scrub properly.

In the context of networked games with client-side prediction, I think it’d probably be key frames tied to logical time and intermediate frames tied to wallclock

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

#183

One of the fun features that I developed for Warcraft (the RTS) was to fade the screen to grayscale when the game is paused. Since the game uses a 256 color palette, it was only necessary to update a few bytes of data (3x256) instead of redrawing the whole screen, so the effect was quick. I also used this trick when the game stalled due to missing network packets from other players. Initially the game would still be…

Omg I love this! I have been finding excuses to do little animation engine features that arent on the critical path of development for the sake of creative self-indulgence. Such features shipped was alpha channel based fading using the fundamental opengl fade parameter (under the hood its a linear interpolation of alpha values over 256, pieced together over a provided pair of timestamps). I tell you what I'll do toda…

WC code is likely not (legally) available, but Wolfenstein and Doom both did similar palette tricks and are documented in the Black Books for each - https://fabiensanglard.net/three_books_update/index.html

Code for those is available.

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

#184

Earlier quoted context omitted.

> a lockstep solution which only considers inputs Nothing stops you from adding a PRNG seed parameter to initialize your deterministic game engine.

That could lead to other subtle problems elsewhere though, because it requires synchronizing the seed. If you can't do that, it could lead to problems. E.g. when comparing offline speedruns where everyone would have a different seed. Then some players could have more luck than others even with the same inputs, which would be unfair. (Though I can't think of anything else at the moment.)

That's not more of a problem than synchronizing the player names at game start. It's table stakes for an online game.

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

#185

One of the fun features that I developed for Warcraft (the RTS) was to fade the screen to grayscale when the game is paused. Since the game uses a 256 color palette, it was only necessary to update a few bytes of data (3x256) instead of redrawing the whole screen, so the effect was quick. I also used this trick when the game stalled due to missing network packets from other players. Initially the game would still be…

One of my favourite things of being on HN is reading comments like this. Namely, devs who worked on games I played growing up. I absolutely love hearing stories from their past about little technical nuances like this comment. The more technical / specific, the better.

I'd honestly love to compile a book of "war stories" told by devs like netcoyote.

Maybe I will.

Net, if you're interested, hit me up.

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

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

I think the parent comment still ought to stand. Unless you're saying it's literally infeasible for some reason, which I find hard to believe?

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

#187
post #53

Earlier quoted context omitted.

not framerate of rendering but physics running at (its own) fixed frame rate.

Every game logic update, not only physics, should run on a timer that's fully independent from the frame rate. The only place where that doesn't matter is fixed hardware - i.e. old generation consoles, before they started to make "pro" upgrades.

> i.e. old generation consoles, before they started to make "pro" upgrades.

And before it was realistically possible to port a game to run on multiple consoles without a complete rewrite.

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

#188

Earlier quoted context omitted.

Murdering CEOs is extremism, saying something is an "evil megacorp" is totally different.

There's probably something eloquent by Hannah Arendt about how 190,000 Americans killed by health insurance companies goes unnoticed while one person killing a CEO becomes a spectre of "left wing extremism" held up as an example. Or was it by The Joker from Batman? Or was it when protesters in Latin America sat down blocking a road to protest environmental destruction and an American driver was so angry that he was m…

> There's probably something eloquent by Hannah Arendt about how 190,000 Americans killed by health insurance companies

Health insurance companies don't kill people, quite the opposite. If it weren't for health insurance, a lot more people would die. Murdering their CEOs is crazy extremism.

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

#189

One of the fun features that I developed for Warcraft (the RTS) was to fade the screen to grayscale when the game is paused. Since the game uses a 256 color palette, it was only necessary to update a few bytes of data (3x256) instead of redrawing the whole screen, so the effect was quick. I also used this trick when the game stalled due to missing network packets from other players. Initially the game would still be…

One of my favourite things of being on HN is reading comments like this. Namely, devs who worked on games I played growing up. I absolutely love hearing stories from their past about little technical nuances like this comment. The more technical / specific, the better. I'd honestly love to compile a book of "war stories" told by devs like netcoyote. Maybe I will. Net, if you're interested, hit me up.

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.

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

#190

Earlier quoted context omitted.

Omg I love this! I have been finding excuses to do little animation engine features that arent on the critical path of development for the sake of creative self-indulgence. Such features shipped was alpha channel based fading using the fundamental opengl fade parameter (under the hood its a linear interpolation of alpha values over 256, pieced together over a provided pair of timestamps). I tell you what I'll do toda…

WC code is likely not (legally) available, but Wolfenstein and Doom both did similar palette tricks and are documented in the Black Books for each - https://fabiensanglard.net/three_books_update/index.html Code for those is available.

Oh rad! Thanks for the heads up. I'll do a post-dev comparison to see what I land on and what was done here.
Post reply on HN