A checkpoint usually represents a certain distance through the game (or perhaps a track) in which an agent (user or NPC) has succeeded reaching. Reaching (or passing) checkpoints often results in bonus awards, such as extra time, points, ammo, and so on. Also, if a player has multiple lives, then often a player will only be respawned back as far as the most recently passed checkpoint, rather than right to the beginning of the level.
This recipe demonstrates a simple approach to the checkpoints, whereby once the player's character has passed a checkpoint, if they die, they are moved back to the most recently passed checkpoint:
![](https://static.packt-cdn.com/products/9781788471909/graphics/assets/c7e329b9-214a-46bd-9088-ad03fec4a8fb.png)