Games and partyPhysics Drawing

Physics drawing games: how drawn lines become ramps, funnels and bridges

How physics drawing games turn your lines into objects: rigid bodies, gravity, time steps and why some shapes work. Plus tips for solving drawing puzzles.

3 min readBy Zarkon

On this page
  1. How does a physics drawing become an object?
  2. How does gravity work in a physics game?
  3. Why does the game run in small steps?
  4. Tips for solving physics drawing puzzles
  5. Questions people ask
  6. Where Physics Drawing helps, and where it does not
  7. Sources

How does a physics drawing become an object?

Physics engines for 2D games simulate rigid bodies. Box2D, which describes itself as a 2D physics engine for games, calls rigid body simulation its primary feature. In its documentation, rigid bodies have a position and a velocity, and you can apply forces, torques and impulses to them.

Box2D sorts bodies into three types:

  • Static bodies do not move under simulation and behave as if they have infinite mass. Think of the floor and walls of a level.
  • Kinematic bodies move according to their velocity but do not respond to forces. They suit moving platforms that follow a fixed path.
  • Dynamic bodies are fully simulated and move according to forces and torques. They can collide with every type of body. A line you draw that is meant to fall or roll behaves like this.

So when you press Play, a game like this has to decide which parts are fixed and which move. Depending on the puzzle, your drawing may be a fixed wall or ramp, or a free moving object, and the engine then takes over.

How does gravity work in a physics game?

In Box2D you set gravity for the whole world as a direction and strength. The documentation’s example uses a gravity vector of 0 sideways and minus 10 downwards. Every dynamic body in the world then accelerates in that direction unless something stops it.

Box2D also notes that it is tuned for metre, kilogram and second units, and works best with moving shapes between 0.1 and 10 metres, which it describes as anything from soup cans to buses. So a game has to scale its world sensibly, whatever size things look on screen.

Why does the game run in small steps?

A physics engine does not calculate motion continuously. It moves the world forward in small slices of time. Box2D’s documentation says you should generally use a time step of 1/30 of a second or smaller, and that 1/60 of a second usually gives a high quality simulation. It can also divide each step into sub-steps to improve accuracy.

Tips for solving physics drawing puzzles

A few ideas that follow from how gravity and collisions work:

  • Think about where things will land. Anything dynamic will fall straight down until it hits something, so draw supports and walls first.
  • Make containers deep. A cup or bowl with low sides lets falling pieces bounce or roll out.
  • Slope your ramps. A track needs a slope for gravity to do the work.
  • Try, watch, adjust. Press Play, see where it fails, and change one thing at a time.

Questions people ask

What is a draw physics game?

A puzzle game where your drawn lines become objects that move under simulated gravity and collisions.

Why does my drawing fall over or sag?

If your drawing is a moving object, it is a dynamic body under gravity, and if its weight is not supported it tips, falls or sags. Give it a wider base or something to rest on.

Where Physics Drawing helps, and where it does not

Physics Drawing is our Android drawing puzzle game. You draw glowing lines with your finger and press Play, and real 2D physics takes over. Solid ink stays put as a ramp, funnel, wall or stopper for falling drops, a rolling ball or a crate. Goo ink becomes a soft rope that sticks to walls, hooks and solid ink, so you can hang bridges and slides. You can see every drop, ball and crate before you draw, and the game runs its physics in small, fixed steps, so the same drawing always gives the same result. If a run misses, it tells you why and you edit your lines and try again. Levels 1 to 24 are free; a one-time Pro unlock adds 36 more levels with bouncy walls, ice, crates and see-saws, plus a Sandbox desk. It works offline with no account, and your progress stays on your phone.

What it is good for: short, satisfying puzzles where you can see the physics work, or fail, straight away, with stars for doing it with less ink.

What it will not do: it is a game, so it shows you what happens without showing the numbers behind it.

Questions or bugs: Email us.

Sources

  1. SimulationBox2D documentation box2d.org
  2. OverviewBox2D documentation box2d.org