UNDER CONSTRUCTION.gif
This will be a list of all of the
code examples
from the book
HTML5 Games: Novice to Ninja
.
Chapter 1
01-base
02-guess
Chapter 2
01-dom-rick-clicker
02-canvas-setup
03-canvas-effect
04-canvas-text
05-drawImage
06-drawImage-snowfield
07-drawImage-crop
08-save-restore
09-rotation
10-global-alpha
11-logo
Chapter 3
01-setInterval
02-setTimeout
03-raindrops
04-delta-time
05-key-controls
06-mouse-controls
07-library-base
(native)
08-library-renderer
(native)
09-library-loop
(native)
10-library-entity
(native)
11-shooter-base
(native)
12-shooter-shoot
(native)
13-shooter-baddies
(native)
14-shooter-collisions
(native)
The "native" links use JavaScript Native Modules - so you can "view-source" and see the original source code if your browser supports it.
Chapter 4
01-game-wrapper
(native)
02-translate
(native)
03-scale
(native)
04-anchor
(native)
05-rotate
(native)
05b-rotate-nested
(native)
06-spritesheets
(native)
07-spritesheet-anim-remainder
(native)
08-spritesheet-anim
(native)
09-spritesheet-anim-lib
(native)
10-tilemaps
(native)
11-tilemaps-level
(native)
12-tilemap-helpers
(native)
13-camera
(native)
14-game-screen
(native)
15-game-logo-gameover
(native)
16-game-final
(native)
Chapter 5
01-aabb
(native)
02-hitbox
(native)
03-collision-helper
(native)
04-collision-group-helper
(native)
05-random-map
(native)
06-maze-generator
(native)
07-tilemap-stop-dead
(native)
08-tilemap-wallslide
(native)
09-tilemap-snap-to-edge
(native)
10-bob-bats
(native)
11-waypoints
(native)
12-fire-at-player
(native)
13-chase-evade
(native)
14-state-machine
(native)
15-path-finding
(native)
Chapter 6
01-jump-empty
(native)
02-jump
(native)
03-jump-fixed
(native)
04-jump-fixed-speed
(native)
05-vector-distance
(native)
06-vector-simple-bounce
(native)
07-acceleration-constant
(native)
08-acceleration-integrate
(native)
09-acceleration-impulse
(native)
10-friction-dampening
(native)
11-friction-better
(native)
12-jump-with-gravity
(native)
13-platformer-phys
(native)
14-billiard-balls
(native)
15-polar-coordinates
(native)
16-polar-steering
(native)
17-matter
(native)
18-matter-sync
(native)
19-pengolfin
(native)
Chapter 7
01-plop-demo
(native)
02-play-sound
(native)
03-theme-volume-loops
(native)
04-sound-pool
(native)
05-sound-group
(native)
06-asset-manager
(native)
Chapter 8
01-screen-shake
(native)
02-screen-flash
(native)
03-time-dilate
(native)
04-anim-lerp
(native)
05-anim-timer
(native)
06-anim-easing
(native)
07-one-up
(native)
08-particles
(native)
09-camera-track
(native)
10-player-flash
(native)
11-jump-forgive
(native)
12-knock-back
(native)
13-wall-jump
(native)
14-cloud-tiles
(native)
15-disappear-tiles
(native)
16-triggers
(native)
18-screen-transition
(native)
19-tiled-load
(native)
...more to come
Chapter 9
03-spatial-partitioning
(native)
04-offscreen-entities
(native)
...more to come