官术网_书友最值得收藏!

  • Box2D for Flash Games
  • Emanuele Feronato
  • 246字
  • 2021-08-05 18:44:25

Chapter 1. Hello Box2D World

If you want to create 2D physics-driven games and applications, Box2D is the best choice available. Box2D is a 2D rigid body simulation library used in some of the most successful games, such as Angry Birds and Tiny Wings on iPhone or Totem Destroyer and Red Remover on Flash. Google them, and you'll see a lot of enthusiastic reviews.

Before we dive into the Box2D World, let me explain what is a rigid body . It's a piece of matter that is so strong that it can't be bent in any way. There is no way to modify its shape, no matter how hard you hit it or throw it. In the real world, you can think about something as hard as a diamond, or even more. Matter coming from outer space that can't be deformed.

Box2D only manages rigid bodies, which will be called just "bodies" from now on, but don't worry, you will also be able to simulate stuff which normally is not rigid, such as bouncing balls.

Let's see what you are about to learn in this chapter:

  • Downloading and installing Box2D for Flash
  • Including required classes in your Flash projects
  • Creating your first Box2D World
  • Understanding gravity and sleeping bodies
  • Running your first empty simulation, handling time steps, and constraints

By the end of the chapter, you will be able to create an empty, yet running world where you can build your awesome physics games.

主站蜘蛛池模板: 伊川县| 宜君县| 洛扎县| 绥宁县| 休宁县| 岫岩| 卫辉市| 塔河县| 大邑县| 夏邑县| 喀喇| 无极县| 茌平县| 商南县| 镇远县| 阳山县| 基隆市| 高安市| 和平县| 仁布县| 织金县| 通州区| 建始县| 广河县| 大埔区| 呼伦贝尔市| 洛浦县| 曲麻莱县| 浦东新区| 平原县| 聊城市| 北海市| 北安市| 新营市| 新丰县| 鹰潭市| 诏安县| 绥滨县| 临武县| 青冈县| 郓城县|