reset larger smallerenglishgerman
Black Prophecy's Game Physics: Interaction with the physics engine

Black Prophecy's Game Physics: Interaction with the physics engine

Welcome to part three of my developer diary. In the previous part I have outlined some important functions of the physics engine and will now show how the interaction with the physics engine happens.

Have a good read!

Interaction with the physics engine

The previously outlined physics update loop allows interventions within the procedure, especially before, respectively after a single physics tick. Simulation objects, which are also updated within a physics update loop, can be assigned to single dynamic objects. External forces, respectively torques are calculated within the scope of the simulation object update after the analysis of external parameters such as:

  • Maximal linear, respectively angular velocity
  • Maximal force, respectively torque
  • Player input
Space ship physics

It is easy to divine that there is a special implementation of a simulation object for space ships. Next to the specialized space ship physics implementation this includes a so-called controlling agent.

Alien NPC drones chasing a Genide fighterThe controlling agent is being used by the AI for NPCs to generate input parameters for the simulation. On the other hand it serves to override player input if the player decides to execute a tactic. Tactics are preprogrammed movements, respectively trajectories that a player can trigger to confuse enemies, escape from them or simply to have fun.  During the execution of a tactic, the player has no influence on the form of the tactic. The controlling agent completely takes control. I will go into detail about the input methodology at a later point when covering the network physics.

In the end the simulation processes three input variables each for intended linear, respectively angular target velocities. In principle this means that forces are available for forward, backward, sideward, up and downward flight.

The player cannot control the upward and downward flight. Possible forces there are rather being used for trajectory corrections, e.g. during a looping.  Rotation torques are generally possible on all three axes.

PAGE 1 - PAGE 2 >> - PAGE 3 >>

gamigo.de  
gamigo account system