Have you ever questioned about the physics behind your favourite videogames? Let’s take a look at what happens behind the map in Not Another Platform Game.
Building a realistic world is the main key to make a good game. But how? There are many ways to do that and one of these is animating everything and making it not repetitive: we are trying to add some little stories in the map that surrounds the player. For instance, in the Third Level, the player is put right between the Steel Mallet army and the Fallen partisans. We wanted the player to feel the battle and the same violence he would feel in a war game, so we started adding triggered events through the map.
When you see a wall being shot down or a tower falling, you’re not enjoying a well scripted animation. All of these things is physically simulated! Each one of the cubes you see is a physical rigid body simulated by the game engine.
Clothes, flags and stendards are as well, making the envirorment convincing, even if the characters style suggest a toony style.
Thanks to Nvidia Physix, physics implementation in the game engine is very simple and does not require hundreds of lines of code. Most of the implementations don’t require coding at all: clothes simulation is made inside the Unity Editor so we can edit all the proprieties from the Inspector, without accessing the code. However, more complex things such as explosions and building fallings required more work and code. In this cases the RigidBody class from the Unity API has come to our aid:
RigidBody.AddExplosionForce(power, position, upwordsModifier, mode);
We’re hard working to make all things realistic and a big span of time has been spent on polishing all of these particulars. While you wait for the game to be released, take a closer look to its first trailer!