- Box2D for Flash Games
- Emanuele Feronato
- 138字
- 2021-08-05 18:44:26
Chapter 2. Adding Bodies to the World
Bodies are what make Box2D games possible. Anything you can move or interact with, is a body . Birds, pigs, and crates in Angry Birds are bodies, as well as the idol and the totem bricks in Totem Destroyer.
During this chapter, you will learn to create every kind of Box2D body, in addition to some other important features, including:
- Creating circular bodies
- Creating rectangular bodies
- Creating any kind of polygon
- Using debug draw to test your simulation
- Defining body types: static, dynamic, or kinematic
- Setting material attributes: density, friction, and restitution
- Units of measurement
- Creating compound objects
By the end of the chapter, you will have your first Totem Destroyer level ready to play with. This will be a long chapter, so let's drive straight to the point.
推薦閱讀
- 數(shù)據(jù)庫應(yīng)用實戰(zhàn)
- 大數(shù)據(jù)可視化
- iOS and OS X Network Programming Cookbook
- Oracle高性能自動化運維
- 深入淺出MySQL:數(shù)據(jù)庫開發(fā)、優(yōu)化與管理維護(第2版)
- 數(shù)據(jù)架構(gòu)與商業(yè)智能
- 中國數(shù)字流域
- SQL Server 2012數(shù)據(jù)庫管理教程
- Mastering ROS for Robotics Programming(Second Edition)
- MySQL技術(shù)內(nèi)幕:InnoDB存儲引擎
- SQL Server 2008寶典(第2版)
- 大數(shù)據(jù)時代系列(套裝9冊)
- 數(shù)據(jù)中心經(jīng)營之道
- SOLIDWORKS 2018中文版機械設(shè)計基礎(chǔ)與實例教程
- 數(shù)據(jù)庫技術(shù)與應(yīng)用:SQL Server 2008