Book description
Create amazing and realistic physics Flash games using Box2D
- Design blockbuster physics game and handle every kind of collision
- Build and destroy levels piece by piece
- Create vehicles and bring them to life with motors
In Detail
Physics games are getting more and more popular, and Box2D is the best choice if you are looking for a free, stable and robust library to handle physics. With Box2D you can create every kind of 2D physics game, only coding is not the fun part, but the game itself.
"Box2D for Flash Games" will guide you through the process of making a Flash physics game starting from the bare bones and taking you by hand through complex features such as forces, joints and motors. As you are learning, your game will have more and more features, like the physics games you are used to playing.
The book analyzes two of the most played physics games, and breaks them down to allow readers to build them from scratch in a step-by-step approach.
By the end of the book, you will learn how to create basic primitive bodies as well as complex, compound bodies. Motors will give life to cars, catapults and siege machines firing bullets, while a complete collision management will make your game look even more realistic.
If you want to make full Flash games with physics, then Box2D for Flash Games will guide you through the entire process of making a Flash physics game.
Table of contents
-
Box2D for Flash Games
- Table of Contents
- Box2D for Flash Games
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Preface
- 1. Hello Box2D World
-
2. Adding Bodies to the World
- Your first simulation – a ball falling on the floor
- Creating a circular shape
- Creating a fixture
- Using debug draw to test your simulation
- Creating a box shape
- Different body types – static, dynamic, and kinematic
- Density, friction, and restitution
- Creating a Totem Destroyer level
- Creating compound bodies
- Creating an oriented box shape
- Creating any kind of convex polygons
- Summary
- 3. Interacting with Bodies
- 4. Applying Forces to Bodies
- 5. Handling Collisions
-
6. Joints and Motors
- Picking and dragging bodies – mouse joints
- Keeping bodies at a given distance – distance joints
- Making bodies rotate around a point – revolute joints
- When Angry Birds meets Crush the Castle
- Controlling joints with motors
- Controlling motors with keyboard
- Don't let some bodies collide – filtering collisions
- Putting it all together
- Summary
- 7. Skinning the Game
- 8. Bullets and Sensors
- Index
Product information
- Title: Box2D for Flash Games
- Author(s):
- Release date: November 2012
- Publisher(s): Packt Publishing
- ISBN: 9781849519625
You might also like
book
Learn cocos2d 2: Game Development for iOS
Create compelling 2D games with Learn cocos2d 2: Game Development with iOS. This book shows you …
book
Cocos2d for iPhone 1 Game Development Cookbook
Over 100 recipes for iOS 2D game development using cocos2d Discover advanced Cocos2d, OpenGL ES, and …
book
Developing Games in Java™
If you already have Java programming experience and are looking to program games, this book is …
book
Unity 3D Game Development
Create ready-to-play 3D games with reactive environments, sound, dynamic effects, and more! Key Features Build a …