5
\$\begingroup\$

Does anybody know how it is implemented or has any advice how to do it?

I'm especially interested in how to avoid that a player dies right after a checkpoint. How does the game evaluate when it's save to do one. Of course there seem to be "simple" triggers based on passing through a position in the map or achieving certain objectives, but I'm pretty sure they avoid that the game saves while a bullet is in flight killing you.

I have the feeling that the game shows you something slightly different on every reload, like if it would save the game at one point and maybe do a little replay. If it reloads and you die quickly, the next reload will be slightly different, I feel.

Could it be that once a trigger for a checkpoint is passed, the game saves it's whole state to a new file. Then it waits for maybe 2s whether you die. Only if you don't die it saves the game. Is that all?

Maybe it even freezes it's random number generator and stores the next player actions, too. So when the checkpoint loads, it can fast forward a little bit and a different amount of time each load?

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Are you specifically asking how Call of Duty did it (which is not an appropriate question for this site) or are you asking how you can build something similar to what Call of Duty did? I have a feeling it's the latter. \$\endgroup\$
    – user1430
    Aug 12, 2012 at 15:50
  • 1
    \$\begingroup\$ +1, although be careful with looking up to COD. I've completed COD: BO on Veteran and and experienced few situations where I were dying 1-2 seconds after spawning. I had to hold "W" before even fading in to dodge the incoming bullets, and in the end I died 10-20 times until this sort of "random seed" did let me go further. \$\endgroup\$ Aug 12, 2012 at 16:07
  • \$\begingroup\$ @user I have had the same experience with the series; CoD implements nothing more complex than just setting the new checkpoint when the player passes a certain point on the map, but Adam's answer is in the correct direction for avoiding the issue checkpoint systems can cause. \$\endgroup\$
    – David M
    Jul 2, 2014 at 15:39

1 Answer 1

4
\$\begingroup\$

Here are some possible ways to do handle this, which can be combined:

  1. When loading a save game, adjust the game state to make the save point safe for the player for at least a few seconds. This has the downside that players can rush forward to a dangerous checkpoint, and know that even if they die after getting there the reload will fix it.

  2. Skip auto saving when it's not a good place to load back into (e.g. if any enemy is in range and in line of sight). If you're too conservative with the tests the game may never save.

  3. Let the player decide when to save. The downside here is that if the player forgets to save then they could lose lots of progress.

  4. Let the player handle bad saves by selecting an older save to load.

\$\endgroup\$
1
  • \$\begingroup\$ Auto-saves at set intervals could mitigate the problem with #3. \$\endgroup\$
    – user631
    Aug 14, 2012 at 18:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .