Book description
Creating games in Flash is a never-ending journey of exploration, learning, and most of all, fun. Once you've mastered the basics, a new world is opened up to you, enabling you to take your existing skills to the next level and discover new skills that will in turn open new doors. This book is a direct continuation of Foundation Game Design with Flash, and is a complete point-by-point roundup of the most important skills a Flash game designer needs to know. You'll increase your ActionScript knowledge and your game design skills while creating some excellent example games. You'll learn advanced collision detection skills; professional AI and pathfinding; and how to load and save game data, create destructible environments, and build and switch game levels.
Each chapter highlights a new advanced technique illustrated by practical examples.
Examples of games are given in a variety of genres, all of which take an object-oriented programming approach.
Advanced game design topics are covered, including vector-based collision reaction, pathfinding, billiard ball physics, and modeling game data.
Table of contents
- Copyright
- About the Author
- About the Technical Reviewer
- About the Cover Image Designer
- Acknowledgments
- Introduction
-
1. Modeling Game Data
- 1.1. Verlet integration
- 1.1. The problem with Euler integration
- 1.2. Introducing the Model-View-Controller Pattern
- 1.3. A crash course in the drawing API
- 1.4. Introducing interfaces
- 1.5. Summary
-
2. Vectors: Ghosts in the Machine
- 2.1. What are vectors?
- 2.2. Using and viewing vectors
- 2.3. Adding and subtracting vectors
- 2.4. Projecting vectors
- 2.5. Intersection
- 2.6. Collision and bounce
- 2.7. A crash course in embedding assets
-
2.8. Important vector formulas
-
2.8.1.
- 2.8.1.1. Create vectors
- 2.8.1.2. Vector magnitude
- 2.8.1.3. Vectors and angles
- 2.8.1.4. Left and right normals
- 2.8.1.5. Normalized vectors (unit vectors)
- 2.8.1.6. Scaling vectors
- 2.8.1.7. Gravity
- 2.8.1.8. Dot product
- 2.8.1.9. Projection
- 2.8.1.10. Define an environmental boundary
- 2.8.1.11. Resolve a collision with a vector
- 2.8.1.12. Bounce
- 2.8.1.13. Friction
-
2.8.1.
- 2.9. Summary
- 3. Collisions Between Circles
-
4. Collisions Between Polygons
- 4.1. The separating axis theorem
- 4.2. Rectangle collisions
-
4.3. Triangle collisions
- 4.3.1. SAT with triangles—the wrong way
- 4.3.2. SAT with triangles—the right way
-
4.3.3. Triangle collision handling in action
- 4.3.3.1. Make the shapes
- 4.3.3.2. Plot the hypotenuse as a vector
- 4.3.3.3. Create a distance vector between the centers of the objects
- 4.3.3.4. Project the distance vector onto the hypotenuse's normal
- 4.3.3.5. Project the square onto the hypotenuse's normal
- 4.3.3.6. Create a gap vector between the square and hypotenuse
- 4.3.3.7. Find the dot product
- 4.3.3.8. Check if the shapes are overlapping
- 4.3.3.9. Move the square out of the collision
- 4.3.4. Triangle collision wrap-up
- 4.4. Oriented bounding box collisions
- 4.5. Polygon and circle collisions
- 4.6. Case studies
- 4.7. Multilevel games
- 4.8. Summary
- 5. Pixel-Perfect Collision and Destructible Environments
- 6. Explosions, Blitting, and Optimization
-
7. Make It Fun! Sound, Music, and AI
- 7.1. Put fun first
- 7.2. Sound effects and music
- 7.3. Buttons
- 7.4. Enemy AI: Line of sight
- 7.5. Case study: Escape!
- 7.6. Summary
-
8. Tile-Based Game Design
- 8.1. Tile-based game advantages
- 8.2. Building the game world
- 8.3. Adding a game character
- 8.4. Platform collision
- 8.5. Adding more interaction
- 8.6. Blit scrolling
- 8.7. Using sprites in a tile-based world
- 8.8. Storing extra game data in arrays
- 8.9. Collision maps
- 8.10. Other broad-phase collision strategies
- 8.11. Summary
- 9. Pathfinding
- 10. XML and External Data
Product information
- Title: AdvancED Game Design with Flash
- Author(s):
- Release date: September 2010
- Publisher(s): friends of ED
- ISBN: 9781430227397
You might also like
book
Real-World Flash Game Development
This book covers Flash for the everyday developer. The average Flash developer doesn't have luxurious timelines, …
book
The Essential Guide to Physics for Flash Games, Animation, and Simulations
Physics for Flash Games, Animation, and Simulations teaches ActionScript programmers how to incorporate real physics into …
book
Foundation Game Design with ActionScript 3.0, Second Edition
In response to the success of the first edition of Foundation Game Design with Flash, Rex …
book
Flash 3D
Push your creative ideas to the next level in content delivery. Use real and simulated 3D …