Workshop › Mario-style Platformer › Step 29 of 37
A player who falls below the level loses a life. The corner now shows the lives too.
```js
if (player.y > ROWS * TILE) {
die()
return
}
ctx.fillText('Coins: ' + collected + ' Lives: ' + lives, 12, 26)
```ROWS * TILE is the bottom of the level (352). Below it: die().return leaves update at once: after die everything was rebuilt, so the rest of this frame's update is skipped.update, after the coin loop, leave an empty line and write the pit check.draw, extend the counter text with ' Lives: ' + lives.Skills: Game states
← Lives and a fresh start Enemies hurt →