- The 3D engine
- Global idea
- The physics engine
- Rigid body dynamics
- Water simulation
- Water and rigid body contacts
- Damaging rigid bodies
- Gameplay spécifications
- Game rules
- Techniques
The 3D engine is written in C++, using openGL. The main goal of this part is to understand how openGL work. In fact, the course we got hasn't got enough in depth for me.
The physics engine is really important for the gameplay. The goal is to have something complex, with plenty of possibilities, but intuitive. In this chapter, we will describe how it works.
A Rigid Body is a body without deformations.
It has a position (a 3D vector), describing the position of his center of mass. To describe his movement, it has a speed (a 3D vector) and a torque for each axis (a 3D vector). It has a mass (a scalar), and a mass moment of inertia (we will call it inertia) (a 3x3 matrix)
We have a rigid body
If
The new
If
("
N.B.:
It follows the same ideas. The unique difference is that we don't change the acceleration, but the speed.
This is one of the hardest part.
We have two rigid bodies colliding: A and B. We suppose they are colliding only in a point or a line. Their velocities before the contact are
We want to know the velocities after the impact.
Then, we can change the velocities of the bodies using the impulses:
(
For further reading: https://www.chrishecker.com/Rigid_Body_Dynamics.
Only with that, the rigid bodies are pretty slippery. In fact, we need to add friction during the collisions.
The first question is, how do we stock this ? Normally, we use a friction table that describe the friction constants between two materials. Here, in order to simplify,
we give some friction constants to each material. So, they have a staticFriction and a dynamicFriction, between 0 and 1.
It is a turn-based strategy.
There are 2 teams fighting. You control one of this two teams. Each team has 3 navigators and as many ships as they want (usually, there are 3 ships, one for each navigator). One of this ships has a gol, a little crystal.
There are multiple ways to win. One way is to destroy the gol of the other team, or let it touch the floor under the water. This method is less valuable, but easyer to do. The other way is to steel the gol, and place it in your base.
Each navigator is a wizard. Each navigator has a certain amount of mana. Using a power cost some mana. The cost vary proportionnaly to the distance with the caster, and the strength of the power used.
Each navigator can use this techniques
The navigator can apply a force to an object. Very useful to move the boat.
An alchemist can transform the elements.
A runist is someone who create and use runes.
An invoker can create things.