Home Page Icon
Home Page
Table of Contents for
Multiplayer Game Development with HTML5
Close
Multiplayer Game Development with HTML5
by Rodrigo Silveira
Multiplayer Game Development with HTML5
Multiplayer Game Development with HTML5
Table of Contents
Multiplayer Game Development with HTML5
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with Multiplayer Game Programming
Understanding the basics of networking
Peer-to-peer networking
Client-server networking
Networking protocols – UDP and TCP
Network sockets
Socket programming in JavaScript
The WebSocket protocol
Creating a client-side WebSocket
Game clients
Game servers
Putting it all together – Tic-tac-toe
Node.js – the center of the universe
The /Player.js class
The /BoardServer.js class
The /server.js class
The /public/js/Board.js class
The /public/js/app.js class
Summary
2. Setting Up the Environment
JavaScript outside the browser with Node.js
Node.js
Installing Node.js
Writing modular JavaScript
CommonJS
RequireJS
Managing Node.js packages with Npm
Managing frontend packages with Bower
Browserify
Automating your workflow
Grunt
Gulp
Summary
3. Feeding a Snake in Real Time
Hello world for game development
Setting up the game
package.json
Index.jade
The game modules
Game.js
snake.js
Other supporting modules
app.client.js
The game loop
Frame rate independence
Time-based game loop
Multiple game loops
Implementing an authoritative server
Game server interface
Updating the game client
Understanding the game loop
Game client's game loop
Game server's game loop
Lobby and room system
Implementing the lobby
Implementing the rooms
Matching players within game rooms
Inviting friends into your world
Auto-matching
Skill-based matching
Socket.io
Installing Socket.io
Client-side Socket.io
Summary
4. Reducing Network Latency
Dealing with network latency
Synchronizing clients in lockstep
Fixed-time step
Synchronizing the clients
Predicting the future with a local game server
Reporting user input
Error correction
Play through the intent, but not the outcome
How close is close enough?
Smooth user experience
Summary
5. Leveraging the Bleeding Edge
HTML5 – the final frontier
Maximizing your game with the fullscreen mode
Better controlling with gamepad
Peer-to-peer with WebRTC
Capturing the moment with Media Capture
Summary
6. Adding Security and Fair Play
Common security vulnerabilities
Encryption over the wire
Script injection
Server validation
Artificial intelligence
Building secure games and applications
Authoritative server
Session-based gameplay
Security through obscurity
Reinventing the wheel
Npm install validator
Npm install js-sha512
Npm install closure compiler
Fair play and the user experience
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Table of Contents
Next
Next Chapter
Multiplayer Game Development with HTML5
Multiplayer Game Development with HTML5
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset