更新时间:2021-12-08 12:43:13
封面
版权页
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files eBooks discount offers and more
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Mission briefing
Task 1
Mission accomplished
A Hotshot challenge / Hotshot challenges
Conventions
Reader feedback
Customer support
Chapter 1. Building a CSS Quest Game
Creating the HTML structure
Managing the game scene
Representing the quest composition
Placing the patterns on the deck
Selecting the pattern
Comparing the player and compositions of the quest
Showing different quests
Adding a countdown timer to the game
Hotshot challenges
Chapter 2. Card Battle!
Creating the game scenes
Creating a 3D card-flipping effect
Selecting a card
Adding a power value to the cards
Creating the opponent's card
Building the battle animation
Adding health points to the game
Restarting the game for the next round of battle
Chapter 3. Space Runner
Managing the scenes
Defining the floor and tiles in the game
Controlling the tiles creation in JavaScript
Using a game loop
Parallax background scrolling
Controlling a player with the keyboard
Determining a collision between the player and tiles
Spritesheet animation
Chapter 4. Multiply Defense
Setting up the canvas and EaselJS
Defining the numbered box
The game loop and falling boxes
Inputs and equations
Removing the boxes
Ending the game
Restarting the game
Replacing the rectangle shape with bitmap graphics
A Hotshot challenge
Chapter 5. Building an Isometric City Game
Designing the game's user interface
Placing the tiles and grid in the city layer
Choosing which building to build
Placing buildings on the floor
Advancing the construction progress over time
Generating coins and diamonds
Collecting pop-up diamonds
Saving and loading the game progress
Chapter 6. Space Defenders
Setting up the user interface
Placing the defense buildings
Summoning the enemies
Generating energy
Enemies attacking the buildings
Firing bullets and attacking the enemies
Controlling enemy waves
Loading the bitmap graphics into the game
Chapter 7. A Ball-shooting Machine with Physics Engine
Creating a simulated physics world
Shooting the ball
Handling collision detection
Defining levels
Adding a launch bar with power
Adding a cross obstacle
Visualizing the graphics