Game devs explain the tricks involved with letting you pause a game
181–190 of 273 posts
Re: Game devs explain the tricks involved with letting you pause a game
#182Earlier 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.
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
#183One 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…
Code for those is available.
Re: Game devs explain the tricks involved with letting you pause a game
#184Earlier 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.)
Re: Game devs explain the tricks involved with letting you pause a game
#185One 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…
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
#186If 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.
Re: Game devs explain the tricks involved with letting you pause a game
#187Earlier 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.
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
#188Earlier 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…
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
#189One 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.
Fantastic idea though, you should do it.
Re: Game devs explain the tricks involved with letting you pause a game
#190Earlier 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.