Example
Example
Click on the example then press 'space' to add to your score!
Fully understand the concept by watching the tutorial in full screen at high res.
Once you have watched the video, you can refer to the code below to help you make your own that fits your game. Make sure you type it yourself to help you learn.
Here is my code. Instead of keyboard.press.SPACE, you will probably have something else, like touching a coin (see collisions).
You can create a player high score with the storage object, which can save values to the user's browser cache. For example: