whatisgithub

What is box3d_demo?

sifuintheshell/box3d_demo — explained in plain English

Analysis updated 2026-07-26

3GDScriptAudience · developerComplexity · 4/5Setup · moderate

In one sentence

A Godot 4 demo project showcasing Box3D, a 3D physics engine, with full source code. Watch structures fracture, explosions ripple out, fire spread, and bridges sway, all driven by real-time physics.

Mindmap

mindmap
  root((repo))
    What it does
      3D physics engine demo
      Fracture and explosions
      Fire and water sim
    Tech stack
      Godot 4.7
      GDScript
      Box3D engine
      C source code
    Use cases
      Study physics integration
      Build destruction games
      Learn C engine embedding
    Audience
      Game developers
      Physics enthusiasts
    Features
      Ragdolls and cables
      Glass shattering
      Deterministic replay

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Explore how to embed a C-based physics engine into a Godot game project.

USE CASE 2

Study realistic fracture, explosion, and fire effects to adapt for your own game.

USE CASE 3

Learn how to expose a native physics API to GDScript for bodies, joints, and ray casts.

USE CASE 4

Experiment with deterministic physics replay for recording and debugging game sessions.

What is it built with?

Godot 4.7GDScriptBox3DC

How does it compare?

sifuintheshell/box3d_demodevantler-tech/world-at-ruinnorthforge-interactive/adaptive-music-godot
Stars333
LanguageGDScriptGDScriptGDScript
Setup difficultymoderateeasymoderate
Complexity4/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 5min

Prebuilt Windows libraries are included so it runs immediately, building from source on other platforms requires a C compiler and manual compilation steps.

So what is it?

This Godot 4.7 project is a demonstration of Box3D, a 3D physics engine created by Erin Catto (who also made the widely used Box2D). The engine is included as full source code, so you can build the physics libraries yourself on Windows or Linux and see how a C-based engine gets embedded into Godot. A fresh copy runs immediately on Windows because the prebuilt libraries are committed, so you can try it before building anything. The project extends the Godot binding for Box3D to expose nearly the entire engine API. From GDScript, you can create bodies, joints, and shapes, apply forces and impulses at specific points, change material properties on moving objects, cast rays, run overlap queries, and record a physics session for deterministic replay. The engine itself supports static, kinematic, and dynamic bodies, multiple collider types, continuous collision detection, and a multithreaded solver that produces identical results across platforms. On top of the engine, the demo builds several physics-driven systems. Structures fracture into irregular shards when struck, with debris finest at the impact point and coarser farther away, and pieces can break again on subsequent hits. Explosions deliver radial impulses that fracture everything in range, paired with visual effects like fireball shaders, shockwave rings, heat haze, camera shake, and slow motion. A fire simulation spreads deterministically between flammable objects based on distance, wind, and contact, with moisture boiling off before ignition and burning structures weakening until they collapse. Additional systems include glass panes that shatter from blast overpressure, impact, or thermal shock, producing shard patterns that crowd toward the break point. Water uses force-based buoyancy with drag so wood floats and dense objects sink, alongside a compute shader that generates interactive surface ripples. The scene also contains detailed structures like an industrial district with smokestacks and water towers, a tower crane with cable physics that sag and snap, a suspension bridge, and articulated human ragdolls. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using the Box3D_Demo Godot project as reference, help me set up the Box3D physics engine in my own Godot 4 project and create a dynamic body with a box collider from GDScript.
Prompt 2
Based on the fracture system in Box3D_Demo, write GDScript that splits a 3D object into irregular shards when hit by a projectile, with finer debris near the impact point.
Prompt 3
Using the explosion and fire simulation from Box3D_Demo as inspiration, help me create an explosion that applies radial impulses to nearby objects and deterministically spreads fire between flammable items based on distance and wind.
Prompt 4
Help me build the Box3D C source libraries from this repo on Linux and link them into my Godot 4 project so I can use the native physics bindings.
Prompt 5
Using the water buoyancy system from Box3D_Demo, write GDScript to make wooden objects float and dense objects sink with drag-based physics.

Frequently asked questions

What is box3d_demo?

A Godot 4 demo project showcasing Box3D, a 3D physics engine, with full source code. Watch structures fracture, explosions ripple out, fire spread, and bridges sway, all driven by real-time physics.

What language is box3d_demo written in?

Mainly GDScript. The stack also includes Godot 4.7, GDScript, Box3D.

How hard is box3d_demo to set up?

Setup difficulty is rated moderate, with roughly 5min to a first successful run.

Who is box3d_demo for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.