Monday, May 11, 2015

Mechanic Blueprint - Physics Engines

Space Engineers - Piston powered lift
Finally made a piston lift for a ship.

Physics Engines are really fun to play with. The more you can move around and interact with, the better. They have their faults though, and when those faults show up, they become really noticeable.

Space Engineers - Flailing arms
I'm pretty sure arms don't go in you like that.

Only a few games try to have a physics engine; Space Engineers, Elite: Dangerous, and Skyrim to name a few that do. However physics engines don’t really exist, they are more of an illusion than anything. The reason they don’t is because physics is hard, like really hard. Not for people to program the equation, but for the processor to work out the math on the scale the game needs.

What they do have are smoke and mirror physics, or just plain fake physics. As my brother told me, everything the game does is usually a good trick to make you think what you do is real. For instance, have you went up to a bush and noticed it was flat when you got there? It’s not a 3-D bush, but a flat 2-D raster image told to rotate towards your character at all times to give the illusion of 3-D.

EverQuest 2 - plant life
Oh, what a pretty purple plant... wait a minute, it's FAKE!

An example of how game physics work would be a flight path for a trajectory out of a gun. With some games, when you shoot, the bullet or grenade path is calculated at the time of the shot and it then just follows the path, vs giving it a velocity and direction and apply gravity to it. The latter would take processing power that could be used elsewhere, this is usually more prevalent with mobile platforms. A more basic example would be collision. A game would almost never have collision down to the precise groove of the muscles of your character (mesh collision), they instead put in place a box that is close, or a sphere around your head. It’s a trick to save processing power

I love me some physics, even the illusion of it. Perhaps some day computers will have enough processing power to have full physics in a game and have great graphics too. By then, I’ll probably be a head in a jar plugged into the matrix filling out a bug report and sending it telepathically to the devs asking why the sky didn’t load in properly. It’s probably because I got the Madcats head plugin instead of the official Microsoft one for $5 more.

1 comment:

  1. There are a lot more tricks, such as gravity isn't always 9.81! Since early games to now, they haven't had to do as much trickery, but a game that lies about physics and makes them look right is still happening a lot more then games that have actual full on physics. I would imagine sometime in the next 10 to 20 years, that won't be the case any more.

    ReplyDelete