Learn Create Your Own Split Screen

Next Page

The steps are similar in Javascript, but without the sprite.

First we make a variable:

var time_remaining = 20;
And we display it inside our frame function:
ctx.fillText("Time Remaining: " + time_remaining, 0, 45);

I chose 45 as y-position for time remaining based on the fact I'm using a font size of 20 pixels, combined with a bit of trial-and-error to see what looked good.

It's not counting down, but that's next.