Skip to content
Bouncy Yak
Bouncy Yak

How the crane in Junkyard Magnet works

Junkyard MagnetPhysicsGame design
Junkyard Magnet: a crane magnet carrying a van toward the crusher

Junkyard Magnet is a free physics game where you swing a crane magnet over a scrapyard, grab wrecked cars and drop them into a hydraulic crusher. The whole game lives or dies on one thing: does the magnet feel good to move? Here is how we built it.

A real rope, a level magnet

The yard runs on a 2D physics engine (Matter.js). The magnet is a physical body hanging from the crane trolley on a cable constraint, so it lags behind when you move fast and swings when you stop. That swing is the fun: you learn to lead your movements and let momentum carry a wreck over the crusher wall.

One trick matters a lot. The magnet is given infinite rotational inertia, so it swings on the cable but never spins. A spinning magnet looks chaotic and makes cars slide off. A level one reads instantly, even on a small phone screen.

Wrecks hang where you grab them

When you power the magnet, every car touching it gets its own short constraint, anchored to the exact spot on the car's surface where it made contact. Grab a wreck near one end and it hangs at an angle; grab it in the middle and it hangs level.

You can also grab several wrecks at once. A car stuck to another car that is already on the magnet hangs a little below it instead of snapping up through it. That small rule is what makes a dangling stack of three cars look and feel right.

Why crushing several at once pays more

Crushing is where you earn. Each wreck pays its base value times the yard multiplier, and crushing a group adds a combo multiplier: 1.5x for two cars, 2x for three, 2.5x for four (each extra car adds 0.5x). Golden wrecks show up about 3% of the time and pay 10x.

  • 7 wreck types, from a 4-point hatchback to a 110-point armored truck
  • 5 yards with multipliers from 1x (Backlot) to 16x (Mega Yard)
  • Heavier wrecks need a stronger magnet, so Magnet Power gates the best cars

All the numbers in one file

Every balance number (car values, yard costs, upgrade prices, combo and golden odds) lives in a single economy file. Tuning the game never touches the physics or the drawing code, so we can rebalance quickly after watching real players.

Junkyard Magnet is coming soon to CrazyGames, free to play in your browser.

← All devlog posts