Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
HTML5 Game
Randy Hoyt
@randyhoyt
randyhoyt.com/launchgame
@randyhoyt
Overview
Code
HTML5
Games
@randyhoyt
Overview
Games
HTML5
Code
@randyhoyt
Games
Games
s!
e
m
a
g
I love
@randyhoyt
Games
s!
e
m
a
g
I love
@randyhoyt
Games
Games
s!
e
m
a
g
I love
@randyhoyt
Games And Me
@randyhoyt
HTML5
rt!
e
l
A
d
r
Buzzwo
Canvas
@randyhoyt
Canvas
WebGL
http://trhou.se/whyWebGL
@randyhoyt
Canvas
WebGL
http://trhou.se/whyWebGL
WebSocket
http://trhou.se/introwebsockets
@randyhoyt
Canvas
WebGL
http://trhou.se/whyWebGL
WebSocket
http://trhou.se/introwebsockets
SVG
@randyhoyt
HTML5 Games
HTML5 Games
http://trhou.se/gamesin2012
Goko
Game Closure Devkit
Famo.us - http://tcrn.ch/ZfCuNh
@randyhoyt
Code
Project Structure
HTML
CSS
JavaScript
@randyhoyt
Project Structure
HTML
CSS
JavaScript
@randyhoyt
Project Structure
HTML
CSS
JavaScript
@randyhoyt
Project Structure
HTML
CSS
JavaScript
@randyhoyt
HTML
CSS
Canvas Preview
Image in JavaScript
requestAnimationFrame
update function
update function
init
update
fillRect
fillRect
drawImage
Frog variables
clearRect
clearRect
init
update
init
update
init
update
render
Game Logic
Init
- Place Frog
- Place Obstacles
Update
- Move
Render
@randyhoyt
Init
- Bind Events
- Place Frog
- Place Obstacles
Update
- Move
Render
@randyhoyt
Init
- Bind Events
- Place Frog
- Place Obstacles
- Place Badges
Update
...
@randyhoyt
...
Update
- Check for Movement
- Check for Obstacles
- Move
- Check for Badges
Render
@randyhoyt
...
Update
...
...
Render
Check for Victory
@randyhoyt
Game Preview
Impact
LimeJS
Crafty
GameClosure
CocoonJS
... a
re!
o
m
y
n
nd ma
@randyhoyt
Impact
LimeJS
Crafty
GameClosure
CocoonJS
@randyhoyt
Game Engine Comparison, http://trhou.se/gamecompare
LimeJS
HTML
Create Director
Director Settings
Scene
Blank Canvas
Comments
appendChild
Preview Game
Frog Constructor
Frog Properties
Require Frog
Constants
appendChild Frog
init
render
Game Preview
Frog: startMovement
init
update
render
Schedule Manager
init
render
checkMovement
init
render
init
render
init
render
... and if the frogs left would be left of the walls right ...
... and if the frogs top would be above the walls bottom ...
... and if the frogs bottom would be below the walls top ...
init
render
init
render
init
render
init
render
init
render
init
render
init
`
render
init
`
render
init
`
render
randyhoyt.com/launchgame
@randyhoyt