Game devs explain the tricks involved with letting you pause a game
1–10 of 273 posts
Re: Game devs explain the tricks involved with letting you pause a game
#2Re: Game devs explain the tricks involved with letting you pause a game
#3The best approach would be using something like if(game_is_paused) return; in the game loops.
Re: Game devs explain the tricks involved with letting you pause a game
#4Not sure if slowing down time is the right approach. The best approach would be using something like if(game_is_paused) return; in the game loops.
Re: Game devs explain the tricks involved with letting you pause a game
#5Not sure if slowing down time is the right approach. The best approach would be using something like if(game_is_paused) return; in the game loops.
Slowing down time applies it universally. Otherwise you're going to need that condition to every single object in the game.
Re: Game devs explain the tricks involved with letting you pause a game
#6Not sure if slowing down time is the right approach. The best approach would be using something like if(game_is_paused) return; in the game loops.
It depends on how your timers are implemented. If they are implemented as a "rendez-vous" absolute date (as in UTC for instance - not in local time unless you want to add "eastern eggs" related to daylight saving time...), this will cause bugs. If you implement your own in-game monotonic clock that you can stop, it should be ok.
Do people actually do that? What's the plan for when the user sleeps their machine? All the events just inexplicably happen all at once when they wake it?
Re: Game devs explain the tricks involved with letting you pause a game
#7Not sure if slowing down time is the right approach. The best approach would be using something like if(game_is_paused) return; in the game loops.
I haven’t tried this yet, but for a custom engine I would introduce a second delta time that is set to 0 in the paused state. Multiplying with the paused-dt „bakes in“ the pause without having to sprinkle ifs everywhere. Multiplying with the conventional dt makes the thing happen even when paused (debug camera, UI animations).
Re: Game devs explain the tricks involved with letting you pause a game
#8It always surprised me how few games had that feature - though a few important ones, like StarCraft, did - and it only became rarer over the years.
Re: Game devs explain the tricks involved with letting you pause a game
#9One 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…
Re: Game devs explain the tricks involved with letting you pause a game
#10Like torch flames and trees swaying in the wind.