Retro Blaster Touch

We are going to use the guts of the GeoBlaster Extended game from Chapter 9, change it up a bit graphically, and then modify it for touch controls. Mouse movement and touch movement are handled in different manners between the desktop and mobile Safari browsers, so most of our code changes will be in this area. We will also be adding in auto-fire to the game, because we don’t want the user to have to press any complicated on-screen buttons to fire missiles.

The original Retro Blaster was one of the first indie Flash games that we ever completed. If you search for “8bitrocket Retro Blaster” on the Internet, you will find it in a number of places. It is a much more complicated and intricate game than we are going to create here. What we have done is replace the tile sheets from GeoBlaster Extended with game graphics from Retro Blaster, and we have added a background graphic and title screen.

Figures 10-6 and 10-7 show the new player ship tile sheets that we will be using.

Retro Blaster ship tiles 1

Figure 10-6. Retro Blaster ship tiles 1

Retro Blaster ship tiles 2 (with thrust)

Figure 10-7. Retro Blaster ship tiles 2 (with thrust)

Figures 10-8, 10-9, and 10-10 show examples of the large, medium, and small rock tile sheets that we will use in this version of the Retro Blaster Touch game.

Figure 10-8. Retro Blaster large rock tiles

Figure 10-9. Retro ...

Get HTML5 Canvas, 2nd Edition 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.