没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
HTML5 Games
Creating Fun with HTML5, CSS3, and WebGL
Jacob Seidelin
HTML5 Games: Creating Fun with
HTML5, CSS3, and WebGL
Table of Contents
Introduction
Who this book is for
What this book is about
Part 1: Getting Started with HTML5 Games
Chapter 1: Gaming on the Web
Tracing the History of HTML5
Using HTML5 for Games
Canvas
Audio
WebSockets
Web Storage
WebGL
HTML5 is (not) a Flash killer
Creating Backward Compatibility
Feature detection
Using the Modernizr Library
Filling the gaps with polyfills
Building a Game
Summary
Chapter 2: Taking the First Steps
Understanding the Game
Swapping jewels
Matching three
Level progression
Identifying Game Stages
Splash screen
Main menu
Playing the game
High score
Creating the Application Skeleton
Setting up the HTML
Adding a bit of style
Loading the scripts
Creating the Splash Screen
Working with web fonts
Styling the splash screen
Summary
Chapter 3: Going Mobile
Developing Mobile Web Applications
Write once, read many
The challenges of mobile platforms
Handling User Input on Mobile Devices
Keyboard input
Mouse versus touch
Adapting to Small Screen Resolutions
Creating scalable layouts
Controlling the viewport
Disabling user scaling
Creating Different Views
Creating the main menu
Adding screen modules
Using CSS media queries
Detecting device orientation
Adding a mobile style sheet
Developing for iOS and Android Devices
Placing web applications on the home screen
Getting the browser out of the way
Debugging Mobile Web Applications
Enabling the Safari debugger
Accessing the Android log
Summary
Part 2: Creating the Basic Game
Chapter 4: Building the Game
Creating the Game Board Module
Initializing the game state
Filling the initial board
Implementing the Rules
Validating swaps
Detecting chains
Refilling the grid
Swapping jewels
Summary
Chapter 5: Delegating Tasks to Web Workers
Working with Web Workers
Limitations in workers
What workers can do
Using Workers
Sending messages
Receiving messages
Catching errors
Shared workers
A prime example
Using Web Workers in Games
Creating the worker module
Keeping the same interface
Summary
Chapter 6: Creating Graphics with Canvas
Graphics on the Web
Bitmap images
SVG graphics
Canvas
When to choose canvas
Drawing with Canvas
Drawing shapes and paths
Using advanced strokes and fill styles
Using transformations
Adding text, images, and shadows
Managing the state stack
Drawing the HTML5 logo
Compositing
Accessing Image Data
Retrieving pixel values
Updating pixel values
Exporting image file data
Understanding security restrictions
Creating pixel
-based effects
Summary
Chapter 7: Creating the Game Display
Preloading Game Files
Detecting the jewel size
Modifying the loader script
Adding a progress bar
Improving the Background
Building the Game Screen
Drawing the board with canvas
Drawing the board with CSS and images
Summary
Chapter 8: Interacting with the Game
Capturing User Input
Mouse events on touch devices
The virtual keyboard
Touch events
Input events and canvas
Building the Input Module
Handling input events
Implementing game actions
Binding inputs to game functions
Summary
Chapter 9: Animating Game Graphics
Making the Game React
Animation timing
Animating the cursor
Animating game actions
剩余398页未读,继续阅读
资源评论
雏鸟
- 粉丝: 0
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功