Pulsedrive - Physics and Flags
2 replies to this topic
Members - Reputation: 418
Posted 14 April 2012 - 10:52 AM
We released many news about assets and the style of Pulsedrive. Now we are ready to start with the core of our game: Gameplay
There were some obstacles for the ship physics which slowed down the production. As you know we are using the Bullet-Physics Engine in [w]tech which worked already well for standard collision. However, Pulsedrive will be a very fast experience and our collision hulls refused to block very fast objects. In addition, our ship had problems with staying on the ground. But now we have solved this problems and we want to give you a short overview about our concept:
Most important decision was to use three objects to represent one track-segment.
First one is the only one rendered in the later game. Second is a simplified collision hull, which is used for standard physics. The third object is a special surface for the ship to keep a certain distance and the right orientation. At first we tried to use the collision hull for this purpose too but the we ended up flying at the wall and drifting into infinity. This three objects are combined in one 'MeshSet', which can be handled in the editor as if it were one object.
So this 'Ray Mesh' is used by the "springs" - keep in mind that they only exist in our script as invisible rays - beneath the ship for collision.
Whereas this springs are just a illustration, it will give you a feeling like the ship is really hovering above ground. Additional we shoot a extra ray into this 'Ray Mesh' to keep the right orientation for the ship.
Another problem was breaking through the walls of our track. First thing was to fix some bugs of the Bullet implementation but this was not a full success. Therefore we decided use invisible rays as distance keepers.
Now you should have rough overview about our ship physics. At the moment we are fixing smaller problems and add more features. Be prepared for a video!
Again a presentation of something visual for Pulsedrive. Today many games use cloth physics for flags to create a realistic look. But this would be an overkill for our use, so we decided to use a combination of normal map and vertex shader to animate our flags.
To avoid boring repetition in the animation we use the world position of the flag model in the shader to get some randomization. This enables us to have unique flag animations for every flag without any effort. The flags benefit a lot from the new LOD-System of [w]tech. If you are far away from them, their polygon count is very low. But when you come close it increases in several steps and allows the vertex shader to do its work on a smooth way.
Click here to view the iotd