Box2d Physics Engine For Delphi XE6 Firemonkey On Android, IOS, Windows, And OSX

Delphi XE6 Firemonkey Box2d Physics EngineQianyuan Wang converted the Box2d physics engine to Delphi VCL a couple years ago and the source code for it is up on Google Code. However, the code was not cross platform and worked only on Windows. I hired an expert developer on oDesk to take the existing Box2d for Delphi project and convert it to Firemonkey so that it will run cross platform on mobile┬ádevices. The Box2d physics engine is now available for Delphi XE6 Firemonkey (plus Delphi XE5 Firemonkey and AppMethod) and it runs on Windows, Android, IOS, and OSX. The code is 100% native Delphi and there are no library files to include. The original code base has been refactored so that the VCL and FMX versions both use the same code on the back end. I’m sure there are performance tweaks that you can make yourself to optimize it but for now it is in a usable state. If you do make significant performance improvements I’d like to get your changes so they can be included with the download. There are over 60 different demo projects included in the Box2d conversion code archive. Everything from a car driving on terrain to a swaying bridge to a basic version of Arkanoid (or Breakout). Here is a list of the demo projects:

  • Add Pair(stress test)
  • Apply Force
  • Body Types
  • Breakable
  • Bridge
  • Bullet Test
  • Buoyancy Controller
  • Cantilever
  • Car
  • Chain
  • Character Collision
  • Collision Filtering
  • Collision Processing
  • Compound Shapes
  • Confined
  • Continuous Test
  • Convex Hull
  • Conveyor Belt
  • Distance Test
  • Dominos
  • Dynamic Tree Test
  • Edge Shapes
  • Edge Test
  • Explosion
  • Free Rope
  • Gears
  • Graviation Controller
  • Mobile
  • Mobile Balanced
  • Motors & Limits
  • One Sided Platform
  • Pin Ball
  • Poly Shapes
  • PolyCollision
  • Prismatic
  • Pulleys
  • Pyramid
  • RayCast
  • Restitution Test
  • Revolute
  • Rope In Wind
  • Rope Joint
  • Sensor Test
  • Shape Editing
  • Slider Crank
  • Sphere Stack
  • Terrain Box
  • Theo Jansen’s Walker
  • Tiles(stress test)
  • Time of Impact
  • Time of Impact2
  • Tumbler(stress test)
  • Varying Friction
  • Varying Restitution
  • Vertical Stack
  • Web
  • Wheel Joint
  • Ping Pong (Arkanoid / Breakout)

The Box2d physics engine has been extensively used in Adobe Flash’s ActionScript 3 (AS3) language. There is a site run by Emanuele Feronato which has over 160 easy to follow Box2d tutorials for AS3. You can easily follow the tutorials for building games using Delphi XE6 Firemonkey simply by translating the AS3 code to Object Pascal. The Box2d calls will be very similar between the two languages.

Download Box2d For Delphi XE6 Firemonkey v1.0.

Box2d Firemonkey source code also available on Github.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Box2d Physics Engine For Delphi XE6 Firemonkey On Android, IOS, Windows, And OSX by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

16 Responses to Box2d Physics Engine For Delphi XE6 Firemonkey On Android, IOS, Windows, And OSX

  1. Tran says:

    Thank you very much. I admire you and your site!

  2. Tiago Rodrigues says:

    I’ve been thinkin of doing the same a while ago but i did not had the time. I cant wait to try this out

  3. Nguyen says:

    wow,thank you so much. love it ­čÖé

  4. Pingback: Physics Engine Vehicle Simulation Demo For Delphi XE6 Firemonkey On Android And IOS | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  5. Pingback: Ten Tips And Tricks For Building Games With Delphi XE5 And XE6 On Android And IOS | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  6. Hi, It’ll be helpful if you can host the box2d source code on github.

  7. Pingback: Box2D physics engine in Object Pascal | Delphi4All

  8. Magno says:

    Any chance to work/port to XE5?

  9. Pingback: Topple The Tower Box2d Game Source Code For Delphi XE6 Firemonkey On Windows | Delphi XE5 Firemonkey, Delphi Android, Delphi IOS

  10. Pingback: Ten Tips And Tricks For Building Games With Delphi XE5 And XE6 On Android And IOS | Firemonkey eXplorer

  11. Flash Thunder says:

    Are there any examples on how to use TSprite with this on XE6?

  12. Pingback: Arkanoid Breakout Demo Source Code For Delphi XE6 Firemonkey On Android And IOS | Delphi XE5 XE6 Firemonkey, Delphi Android, Delphi IOS

  13. Pingback: Box2d Physics Demo For Delphi XE6 Firemonkey | FMX Demos

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE5 Firemonkey MonkeyMixer
Mix VCL And Firemonkey Forms In Delphi XE5 Firemonkey On Windows

Jim McKeeth has a blog post up from late 2013 about a utility called MonkeyMixer that allows you to have...

Close