Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
1  
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. –  Josh Petrie Aug 12 '12 at 15:50
1  
+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. –  Devdalus Aug 12 '12 at 16:07
    
@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. –  David M Jul 2 at 15:39

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
Auto-saves at set intervals could mitigate the problem with #3. –  Dalin Seivewright Aug 14 '12 at 18:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.