Physics in Games
The Invisible Rules of Reality
The Invisible Rules of Reality
Gravity pulls objects down at different rates depending on where you are. Watch how a ball falls on different worlds!
Super Mario Bros uses a gravity of about 75 m/s² - over 7x Earth's gravity! That's why Mario feels so "floaty" on the way up but falls fast.
Games need to know when objects touch. Most use invisible boxes (hitboxes) that are simpler than the actual shapes. Toggle hitboxes to see what's really happening!
Use Arrow Keys or WASD to move the character. Try to collide with the other objects and watch the collision counter!
Fighting games often have different hitboxes for attacks (hurtboxes) and vulnerability (hitboxes). That's why some moves can hit even when they look like they miss!
Friction is the force that slows things down. Different surfaces have different amounts of friction. Compare how the player slides on different surfaces!
Press Left/Right Arrow or A/D to move. Notice how the character slides differently on each surface!
Ice levels in Mario games use friction values around 0.98 (almost no friction!). Normal ground uses about 0.85. That small difference completely changes how the game feels!
Momentum is mass times velocity. When objects collide, momentum transfers between them. Click and drag to shoot the white ball and watch physics in action!
Click and drag on the white cue ball to aim. The longer you drag, the harder you shoot. Release to strike!
In a perfect elastic collision, momentum is conserved - the total before equals the total after. Real pool balls lose some energy to heat and sound, which is why they eventually stop.
Now put it all together! Adjust gravity, bounce, and friction to create your own physics world. Click to spawn balls and watch them interact!
Click anywhere in the sandbox to spawn a ball. Try different physics settings to see how they change the behavior!
You've discovered the invisible rules that make games feel real.
Accelerates objects downward - different planets have different gravity
Simplified shapes that make collision detection fast
Controls how quickly objects slow down on different surfaces
Transfers between objects when they collide
Designers tune these values to create the perfect experience
Put your new knowledge into practice!