Community Challenge #6: Box2D scripting 📦

Hi!

It’s time for another Defold Community Challenge! This time we invite you to try Defold 1.13.0 beta and play with the new and improved Box2D scripting API! :gear:

:bullseye: Goal

Create a Defold project that showcases Box2D scripting.

Last time we also had a physics related challenge, but this time it is all about controlling physics from Lua: querying the world, creating and modifying shapes, using joints, changing materials, casting rays or shapes, inspecting contacts, triggering explosions, building tools, debugging physics, or making small gameplay prototypes powered by the new b2d.* APIs.

Your entry should use Lua Box2D API to directly control, query, inspect, or modify the physics simulation. It does not need to be a complete game. A small toy, tool, prototype, puzzle, sandbox, editor, debug visualizer, or interactive demo is perfectly fine.

Examples of what you can build:

  • Small physics playground
  • Runtime terrain made from chain shapes (like in this example)
  • Springy bridge or hanging chain toy
  • Grappling hook with raycast + joint creation
  • Click-to-inspect physics objects
  • Explosions and destruction
  • Physics vehicle with wheel joints
  • Dynamic material playground: ice, rubber, mud, metal
  • Tiny level editor that creates physics geometry from points
  • Sensor/contact event visualizer
  • Shape-cast based controller

:brain: Learning Goals

The goal is to learn the new APIs, test them in real projects, and create useful open-source examples for the community.

  • Learn how to use the b2d.* scripting APIs in Defold.
  • Experiment with runtime access to bodies, shapes, joints, chains, and worlds.
  • Try raycasts, shape casts, overlaps, sensors, hit/contact events, explosions, and debug data.
  • Explore the differences between Box2D v2 and Box2D v3 where relevant.
  • Help test the new Defold 1.13.0 beta physics scripting features.
  • Share small, readable, open-source examples that others can learn from.

:gear: API overview

B2D API was vastly enhanced for 1.13.0:

Note, that there are significant differences between the old V2 legacy version and V3. You can mention in your submission which APIs you used and whether your project uses Box2D v2 or Box2D v3 (or supports both).

:stopwatch: Time

28 days

From: 2026-06-14T13:00:00Z2026-07-12T13:00:00Z
(with a grace period if needed for late entries)

:memo: Submission Requirements

Submit your entry in this thread with:

  • The title and a brief description
  • A playable build, preferably HTML5 or desktop
  • A link to a public GitHub/GitLab repository
  • Optional visuals: GIFs, screenshots, videos, debug views

Entries must:

  • Be built in Defold 1.13.0 beta (or stable, when it releases)
  • Use Defold’s built-in Box2D scripting APIs in an essential way
  • Be self-contained and open source

Community or your own extensions and assets are fine for visuals, UI, audio, tooling, or support code, but the physics scripting showcase itself should use Defold’s built-in b2d.* APIs.

:trophy: Rewards

Defold sponsors 3 awards for the challenge: €25 Steam Gift Cards!

The Defold Team will select winners in these categories:

  • :gear: Best Box2D API Showcase - the clearest and most interesting use of the new scripting APIs
  • :test_tube: Best Physics Experiment - the most fun, surprising, or creative interactive physics prototype
  • :hatching_chick: Best First-time Entry - the best entry by someone who did not participate in previous community challenges

We will announce and contact the winners after the challenge ends. It would help when you win, if you could provide us your Steam ID and sent defoldengine an invite on Steam :wink:

:light_bulb: Inspiration & Ideas

Past challenges:

The challenge is not about building the largest project. Small, clean, readable demos are very welcome, especially if they help other developers understand how the new API work.

Have fun, break things, and share what you discover! :rocket:

12 Likes