© Zarrar Chishti 2017

Zarrar Chishti, Cross Over to HTML5 Game Development, https://doi.org/10.1007/978-1-4842-3291-0_8

8. Add Some Bling to Our Game

Zarrar Chishti

(1)Glasgow, UK

“Simplicity is the ultimate sophistication.”

Leonardo da Vinci

I am sure you have noticed that there is no actual score in our Score box . What we need in there is some text that increments every time we send a zombie off into space. To do this, we need to do the following:

  1. Add a text field in our HTML.

  2. Format this text field so that it changes size and location, depending on the screen size.

  3. Start at zero and increment every time a bubble zombie appears.

  4. Reset back to zero every time a new game is played.

What’s the Score?

Open the default.html file and type the following ...

Get Cross Over to HTML5 Game Development: Use Your Programming Experience to Create Mobile Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.