- 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.
推薦閱讀
- Google Visualization API Essentials
- SQL Server入門經(jīng)典
- 數(shù)據(jù)驅(qū)動(dòng)設(shè)計(jì):A/B測(cè)試提升用戶體驗(yàn)
- 數(shù)亦有道:Python數(shù)據(jù)科學(xué)指南
- Hadoop 3.x大數(shù)據(jù)開發(fā)實(shí)戰(zhàn)
- Python數(shù)據(jù)分析與挖掘?qū)崙?zhàn)(第3版)
- PostgreSQL指南:內(nèi)幕探索
- Python數(shù)據(jù)分析與數(shù)據(jù)化運(yùn)營
- 跨領(lǐng)域信息交換方法與技術(shù)(第二版)
- 探索新型智庫發(fā)展之路:藍(lán)迪國際智庫報(bào)告·2015(上冊(cè))
- Mastering LOB Development for Silverlight 5:A Case Study in Action
- 聯(lián)動(dòng)Oracle:設(shè)計(jì)思想、架構(gòu)實(shí)現(xiàn)與AWR報(bào)告
- Learning Ansible
- 數(shù)據(jù)庫基礎(chǔ)與應(yīng)用
- 數(shù)字孿生