Live data from Hacker News

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

kotaku.com

61–70 of 273 posts

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

#61
So the simple case is using some sort of state variable:

switch(game_state):

  case(paused):
     

  case(gameplay)
     

You still have to be careful about how you implement "gameplay", though. For example if at any point you read the 'system clock' to do time-based stuff like animations or physics, then when you unpause you suddenly will have a couple minutes of advance in a place where you expect fractions of a second.

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

#62
I was suspicious of those random game developers getting quoted, and this is the pinned post of the one giving this cute silly story about slowing down game speed time:

"Announcing TORMENT HEXUS, a match-3 roguelike about putting technofascist CEOs on the wrong side of skyscraper windows!

[...]

And remember: they SHOULD be afraid of us. #indiedev #indiegame"

Weird times.

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

#63

Earlier quoted context omitted.

I think if it were as simple as "remember the RNG seed", game developers would do it every time. But determinism also means, for instance, running the physics engine at a deterministic timestep regardless of the frame rate, to avoid differences in accumulated error or collision detection. And that's something that needs designing in from day one . Thank you for still prioritizing it.

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)

It's desirable for arcade games, which have fixed hardware including the display. There's no possibility of upgrading for better framerate, and the game can be designed so slowdown is rare or non-existent. Tying the physics to the framerate gives you very low and very consistent input latency with minimum developer effort.

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

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

Be nice if they fixed whatever bug they have on the Switch 2 that means every replay I previously downloaded[0] is unplayable and further that every time I now try and download a replay, the game crashes.

But then it'd also be nice if they fixed the "game crashes randomly when joining games" bug too.

(To give them credit, it doesn't now take 5 minutes after waking the Switch 2 before Rocket League reconnects me to the Epic servers like it did a couple of months ago...)

[0] Also the stupidly low limit on how many you can download - it's my storage cost, not yours, wtf.

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

#65

I was suspicious of those random game developers getting quoted, and this is the pinned post of the one giving this cute silly story about slowing down game speed time: "Announcing TORMENT HEXUS, a match-3 roguelike about putting technofascist CEOs on the wrong side of skyscraper windows! [...] And remember: they SHOULD be afraid of us. #indiedev #indiegame" Weird times.

Eh, I remember the myriad of both "Torture Bin Laden" as well as "Torture George Bush" flash games in the early/mid 2000s. I think it's very on brand for indie developers.

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

#66
post #29

Earlier quoted context omitted.

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

also trackmania, and it's a common way they use to catch cheaters as pb on leaderboard have inputs

This[0] is a good intro to the topic (see also [1] for the written report)

[0] https://www.youtube.com/watch?v=yDUdGvgmKIw

[1] https://donadigo.com/tmx1

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

#67
There used to be a funny bug in Dota 2:

While the game is paused, if a player were to click on the "level up" buttons for their skills, each click actually advanced the game by 1 frame - so it was possible for people to die etc. during a pause screen.

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

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

Guessing too much potential for abuse if the same server was handling both match and spectating.

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

#69
post #23

Earlier quoted context omitted.

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.

I think some games allow this, I remember watching DotA 2 torunaments this way

The game engine, Source, is also using client-server architecture

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

#70
post #32

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…

Interesting you mention StarCraft. The replay feature could diverge off due to the non deterministic nature of the game. https://news.ycombinator.com/item?id=21920508

That's not the kind of nondeterminism that would cause replay divergence. The PRNG seed is stored in the replay (if it wasn't, almost every game would diverge very quickly. And since the multiplayer works the same basic way, the game would basically not function at all).
Post reply on HN