HTML5 Games Most Wanted gathers the top HTML5 games developers and reveals the passion they all share for creating and coding great games. Youll learn programming tips, tricks, and optimization techniques alongside real-world code examples that you can use in your own projects. You wont just make games—youll make great games. The book is packed full of javascript, HTML5, WebGL, and CSS3 code, showing you how these fantastic games were built and passing on the skills youll need to create your own great games. Whether youre a coding expert looking for secrets to push your games further, or a beginner looking for inspiration and a solid game to build on and experiment with, HTML5 Games Most Wanted is for you. Topics and games covered include building complexity from simplicity in A to B, how to create, save, and load game levels in Marble Run, creating fast 3D action games like Cycleblob, entity interpolation from Snowball Fight, trait-based gaming in Grave Danger, the advanced use of WebGL from the game Bar Fight, tips on combining the entangled web of HTML5 technologies brilliantly shown in Far7, the holy grail of making a unique game like Z-Type, and how to build split-screen games as in the addictive Robots Are People Too. What you’ll learn How to create fantastic games using HTML5 How to add 3D to your games with WebGL How to create multiplayer games How to build a level designer for your game
Author(s): Egor Kuryanovich, Shy Shalom, Russell Goldenberg, Mathias Paumgarten, David Strauss, Seb Lee-Delisle, Gaëtan Renaudeau, Jonas Wagner, Jonathan Bergknoff, Rob Hawkes, Brian Danchilla
Edition: 1
Publisher: friendsofED
Year: 2012
Language: English
Pages: 284
Tags: Библиотека;Компьютерная литература;HTML / CSS / JavaScript;HTML5 / CSS3;
Cover......Page 264
Contents at a Glance......Page 3
Contents......Page 266
About the Authors......Page 275
About the Technical Reviewer......Page 277
About the Cover Image Artist......Page 278
Introduction......Page 4
A brief introduction......Page 6
Write once, use anywhere......Page 7
Everyone has control......Page 8
Game-related browser technologies already exist......Page 9
There are plenty of good open web games out there......Page 14
Distribution and monetization options already exist......Page 17
The not-so-good side to open web games......Page 18
What does the future hold and what still needs to be done?......Page 19
Who am I?......Page 20
A to B......Page 21
Influence and inspiration......Page 22
Pre-production......Page 23
Production......Page 24
Reception......Page 25
Rules of simplicity......Page 26
Processing.js......Page 28
What are its strengths and weaknesses?......Page 29
Examples and integration of Processing.js......Page 30
Embedding a sketch......Page 31
Integrating JavaScript......Page 32
Using audio......Page 33
High-score list with jQuery......Page 34
Resources......Page 35
Introduction......Page 36
HTML, a content language......Page 38
CSS, a descriptive stylesheet language......Page 41
JavaScript, a high-level dynamic language......Page 48
Game specification......Page 49
Game styles......Page 50
Game logic......Page 51
PhoneGap Build......Page 56
WebAppBuilder......Page 57
Makefile for of our chess game......Page 58
Internationalization......Page 59
The example......Page 60
Overview of the Canvas API......Page 61
Solutions comparison: Canvas......Page 62
Conclusion......Page 63
Other resources......Page 64
Who we are, what we will build, and why......Page 65
The application and the sense behind it......Page 66
Why levels are important......Page 68
Split the big thing into small components......Page 69
The HTML markup......Page 70
Adding a little style......Page 72
The JavaScript structure......Page 73
The drawing loop......Page 75
The bricks......Page 79
Square......Page 80
Circle......Page 81
Curve......Page 82
Triangle......Page 83
Adding bricks to the grid......Page 84
Implement rotation......Page 88
The Store......Page 89
Saving tracks......Page 90
Retrieving tracks......Page 91
Implement the Save button......Page 92
Create the saved tracks list......Page 93
Summary......Page 94
Overview of the elements......Page 96
The container’s 3D properties......Page 98
Events and game loop timer......Page 99
Making new fish......Page 100
Fish update......Page 102
Fish render......Page 103
Making fish......Page 104
Recycling the fish......Page 105
Exploding the fish......Page 106
Parallax layers......Page 107
Disabling default touch/mouse behavior......Page 108
Conclusion......Page 109
Introduction......Page 110
Vectors......Page 111
Adding checks......Page 113
Components......Page 114
Particles......Page 115
Forces......Page 116
System......Page 117
Designing the spark......Page 118
Implementing the main loop......Page 119
Forces......Page 120
Life and death......Page 121
Rendering......Page 122
Creating the textures......Page 123
Implementing the emitter......Page 124
Implementing the main loop......Page 125
Rotation......Page 126
Smoke......Page 127
Implementing the emitter......Page 128
Implementing the main loop......Page 129
Optimizations......Page 130
Typed arrays......Page 131
requestAnimationFrame......Page 132
Optimized fireworks......Page 133
Conclusion......Page 135
Beginning WebGL......Page 136
Uses and limitations......Page 137
OS, graphics card, and browser support......Page 138
Testing for WebGL support......Page 139
Higher-level APIs......Page 140
Transforms......Page 141
Composing the scene view......Page 142
GLSL......Page 144
Drawing a simple shape......Page 145
Animation and depth......Page 156
A basic game......Page 164
Planning......Page 165
Summary......Page 176
CycleBlob: A WebGL Lightcycle Game......Page 177
What is WebGL?......Page 178
Work environment setup......Page 179
3D models and geometry......Page 181
Static models......Page 184
Dynamic models......Page 186
Geometric processing......Page 187
Situating on a grid......Page 191
Camera positioning......Page 196
Animation engine......Page 199
Starting up......Page 206
Conclusion......Page 211
Reference......Page 212
A Real-Time Multiplayer Game Using WebSockets......Page 214
Philosophy of netcode......Page 215
The game logic......Page 216
The game client, Part 1......Page 221
The game server......Page 225
The game client, Part 2......Page 232
Conclusion......Page 237
UNIX......Page 238
Hard-Pressed for a Choice of Technology......Page 240
Why the choice is so hard to make......Page 241
SVG......Page 242
Canvas......Page 244
Audio......Page 247
Connection......Page 249
Server-Sent Events......Page 250
WebSocket......Page 252
Client databases......Page 253
Web fonts......Page 255
Conclusion......Page 256
B......Page 257
H, I......Page 258
M......Page 259
O......Page 260
S......Page 261
W, X, Y, Z......Page 262