Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Index

Index

Image A

Adobe Fireworks, 83

Adobe Illustrator, 84

Adobe Photoshop, 84

Alien Turtle Invasion game

boilerplate code, 113

basic HTML code, 111113

Game CSS, 113

game directory, setup, 111

HTML and CSS code, 111, 112

projects directory, creation, 111

competition, 110

engine coding

background drawing and redraw, 115

build and hone, 114

canvas element, 114

checkhits, 125126

drawing, spaceship, 116

fire projectiles, spaceship, 120

fireLaser() function, 119

full game code, 129136

game loop function, 114, 115, 118, 121

game state setting, 120

hit detection, 122, 123

invaders and spaceship shooting, 126

invaders drawing, 120

invasion, 122

keyboard events, 117

lasers drawing, 118, 119

position and checking, collisions, 123124

position, spaceship, 117


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint