Skip to content

Dev Diary #4 – Physics & Collision Detection

by on April 4, 2014

Hope you’ve brought your Wrenches and Screwdrivers. This time round we’ll be taking a look at some of the more technical sides of Stars of Icarus.

As stated in previous entries, one of the major features of our game is its deep combat system and we don’t just keep saying that. We believe that deep mechanics are strongly underrepresented in most games, where they are usually swapped with easier but not necessarily better complexity. Extra Credits has more to say on the subject, if you’re interested. Instead of a dry numbers game with ever improving stats, we want players to be able to hone their combat skills by mastering the mechanics.

An easily understandable and consistent physics system is an essential part of our combat mechanics. “Easily understandable” means that the system needs to be based in reality. Players should perceive the game’s physics as working as they expect, the same as their real life counterparts. “Consistent” means that all objects have to be bound to this set of rules. Any object involved in combat, be it the player ship, enemy fighters, capital ships, shots, missiles or explosions, all need to follow these principles.

AAACollision1
There goes the paint-job…

A game’s physics become most apparent within its movement system. In Stars of Icarus, changes in velocity and rotational speed are done correctly through acceleration and deceleration, with a goal of making space flight feel natural and fun at the same time. The rotation of objects works only through this system, and since there is no friction in space, ships can speed up their turning, but then also need to slow down when finished.

Luckily the player ship has a built in system, which takes over most of the manual work, but the mechanics still work in a physically correct manner. The player isn’t shown each and every single part of these mechanics, since it would make movement look strange and confusing. Other space games, such as Star Citizen, work in a similar way. The math mostly takes place behind the scenes.

AAAADrehen1

Weeeeeee!

World rules in games have always been a tricky matter. On the one hand, we want our games to feel realistic and consistent. On the other hand, we want our games to be fun. The physics in Super Mario Bros. for instance, resemble those of the real world to a certain extent, e.g. you jump up and gravity pulls you back down. However, if the protagonist were only able to jump about half his body size, the game would not be very entertaining (and you would almost definitely be killed by the very first Goomba).

Similarly, we wanted spaceflight in Stars of Icarus to feel smooth and weightless as it might feel in a Newtonian system. But more importantly, we wanted the player to always have good control over the ship. As veterans of the classic Frontier – Elite II will know, controlling ships in a purely Newtonian system can be fairly tricky. Our solution to this was to add a slight constant drag to movement, which, although less realistic, makes combat maneuvering more controlled and frankly more fun.

flyingphysics2.1
Space-drifting

As stated before, all objects in our game world have mass and velocity, and thus also momentum. Collisions between them are handled by the physics engine and follow the Newtonian laws of conservation of momentum. As we’ve established previously, parties involved in collisions may be ships, asteroids and debris, but also explosions, missiles or projectiles.

This means that there are many ways the player can interact with the environment. For instance, changing the battlefield and using the changes to one’s advantage can create emergent gameplay and offer more depth in combat, which is exactly what we’re going for.

Asteroidshot1
And Pop! goes the Asteroid

That’s how our physics work on the outside. If you’re interested what happens under the hood, stay tuned on Facebook and Twitter for our coming updates!

Advertisements

From → Stars of Icarus

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: