informa
2 min read
News

Feature: Super Mario Galaxy Demystified

Want to see how Mario Galaxy created its unique gravity-based physics effects for the in-game planets? In the first of a new series called 'Games Demystified,' Developer Jeremy Alessi
March 27, 2008
Super Mario Galaxy earned acclaim for emulating a sense of gravity and real-world figures, allowing gamers to walk upside down while feeling completely intuitive. But how did they do it? Even Isaac Newton might be perplexed: "In Galaxy, players are pulled toward each and every arbitrarily shaped planetoid they encounter. At this point all real world physics equations break down and tell us nothing about the gravity in the game, which as in most cases is a trick. Much like the magicians in The Prestige, game developers are always attempting to one up each other with new tricks. As we all know, Nintendo stole the show with its latest. To accomplish this "trick", the developers use the surface normals of whatever planetoid Mario inhabits to keep him running and jumping happily along. This is how gravity is distributed through completely irregular bodies. A surface normal is a ray or unit vector that runs perpendicular to a plane." And how does Mario adjust so smoothly to Galaxy's often oddball, irregular surfaces? There are a combination of factors: "irst and easiest to understand is that each planetoid in the game is fairly high polygon so the change from one surface normal to another isn't too steep. Additionally, interpolation can be used to smoothly transition from one orientation to the next. So, the surface normals in a Galaxy planetoid are analogous to the key frames of an animation in that regard. To demonstrate these concepts we'll be looking at some high-level source code we've created - written in Blitz3D, which is an excellent tool for prototyping concepts just like this. You'll need to download a demo or full version of Blitz3D to edit and re-compile the code. The full feature contains further details, with source code and a playable prototype (no registration required, please feel free to link to this feature from other websites).

Latest Jobs

Treyarch

Playa Vista, California
6.20.22
Audio Engineer

Digital Extremes

London, Ontario, Canada
6.20.22
Communications Director

High Moon Studios

Carlsbad, California
6.20.22
Senior Producer

Build a Rocket Boy Games

Edinburgh, Scotland
6.20.22
Lead UI Programmer
More Jobs   

CONNECT WITH US

Register for a
Subscribe to
Follow us

Game Developer Account

Game Developer Newsletter

@gamedevdotcom

Register for a

Game Developer Account

Gain full access to resources (events, white paper, webinars, reports, etc)
Single sign-on to all Informa products

Register
Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Subscribe
Follow us

@gamedevdotcom

Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more