Conceptually, how does replay work in a game?

后端 未结 12 1022
野趣味
野趣味 2021-01-29 18:27

I was kind of curious as to how replay might be implemented in a game.

Initially, I thought that there would be just a command list of every player/ai action that was t

12条回答
  •  无人及你
    2021-01-29 19:11

    Perhaps you could Simply save a stack of commands being sent by each player. So instead of saving that a bomb detonates at a certain point and time, or that a certain car is destroyed, you simply save the key presses sent by each player. Then, in the replay, you simply simulate the game as it would have happened with those presses. I feel like that has the potential to take up less space, but I've never worked on a replay system like that.

    Interesting question, though. I'd be interested in how it's done in professional games.

提交回复
热议问题