Conceptually, how does replay work in a game?

后端 未结 12 1135
野趣味
野趣味 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:10

    I would believe that at certain increments the game would take a snapshot of the state of everything (EVERYTHING). Then when the replay is happening simple usage of linear-interpolation can be used to fill in the "holes". At least that is how i think it would be done.

    You are correct that recording the inputs would be unreliable/not guarantee the same output. The game definitely has to keep track of the state of all the objects (or at least the important ones)

提交回复
热议问题