Live data from Hacker News

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

kotaku.com

51–60 of 273 posts

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

#51

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 really that much to do with determinism. Quake uses a client-server network model all the time, even when you're only playing a local single-player game. What the demo recording system does is capture all of the network packets that are being sent from the server to the client. When playing back a demo, all the game has to do is run a client and replay the packets that it originally received from the server. It's a very elegant system that naturally flows out of the rather forward-looking decision to build the entire engine around a robust networking model.

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

#52

How difficult can it be when Cloud providers are able to do live migration of VM from one bare metal server to another?

Likely more difficult.

Live migration boils down to copy memory over the network, stream the page faults till you converge enough, and resume execution on the other host. It’s not a hard problem but a precise and tedious one.

Pausing a game might involve a lot of GPU contexts to freeze, network resources to pause, storage streams to pause, input handling, sound, etc. Add to that physics engine that may be tied deeply in the system and you end up with a hard problem.

What a VM does is not the role of the hypervisor, thus it can apply its hammer that works in pretty much all cases, and VMs are pretty much all the same. On the other hand, all games are bespoke with custom plugins and custom integrations, which make them the opposite of "generic pause implementation".

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

#53

Earlier quoted context omitted.

Tying physics to framerate at all is a mistake. Like, should be filed as a bug mistake. There's no scenario in which that's desirable. And yet even Rockstar gets it wrong. (GTA V has several framerate dependent bugs)

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.

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

#54
post #23

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…

Related to that is the ability to watch games using the game-client too. This used to be a promoted feature in CS, with "HLTV/GOTV", but sadly disappeared when they moved to CS2. Spectating in-client is such as powerful way to learn what people are doing that you can't always see even from a recording from their perspective.

Also allowed to watch games _live_! Long before streaming videos was a reality.

Ah, the good old days of watching live competition of quake through the game itself, chatting with others basically through the game console.

Pretty cool system.

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

#55

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…

Checking in as a random indie developer who still prioritises determinism in my engine. I don't understand why so many games/engines sacrifice it when it has so much utility.

Probably (armchair HN reader, not a game developer here) due to dealing with multiplayer latency and / or performance / multithreading / scalability.

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

#56
post #10

I quite like when games keep playing some visual-only animations when paused. Like torch flames and trees swaying in the wind.

Against the Storm (and excellent rouguelite city-builder) does this in a really cool way. Pausing is a core mechanic of the game, and you frequently pause while you place building or things like that - and all the visual animations stop (fire, rain, trees swaying, etc).

But when you find a broken ancient seal in the forest, the giant creepy eyeball moving around in it keeps moving even when you pause the game, which helps emphasise how other-worldly it is.

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

#57
post #10

I quite like when games keep playing some visual-only animations when paused. Like torch flames and trees swaying in the wind.

I find it confusing: for me a clear indicator the game is paused is all animations also pausing. Some games do not pause in menu’s, for example. And some do, but not when in a multiplayer session

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

#58
I only know pausing games is funky because the highest my playstation fans ever go is pausing some games. Quite weird pausing is not just a feature of the game engine or runtime, especially as the menu and settings system seem to be totally separate in most cases anyways.

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

#59
post #29

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…

Rocket League is a relatively recent game that allows match recording. It’s nice.

Replays are very common in fighting games as well, rollback netcode gets you most of the way to a replay system already (replaying game state from inputs is a core requirement for online play)

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

#60
post #37
post #35

Earlier quoted context omitted.

This absolutely still exists - I have a library for reading Source 2 (CS2, Deadlock etc) demo files and streams (HTTP ones like CSTV). https://github.com/saul/demofile-net

Demo files work, but I'm talking about spectating live. The "Watch" tab was removed and the ability to just browse and spectate the top games currently being played. I'm sure the technology still exists in the engine, but it's no longer the key feature it once was. HLTV/GOTV was launched with some fanfare back in the day.

Absolutely crazy they haven’t revived this yet given the popularity of streaming.
Post reply on HN