Advanced topics

Unfortunately, for the last two topics, we only have time to give them an honorable mention. I included them because you are going to hear about these topics, and you need to know what these terms mean.

Game physics

Game physics are the rules that define how objects interact with other objects inside the game universe. For example, in SpaceRacer3D, the ship simply passes through the asteroids. However, there could be many other outcomes:

  • The ship and asteroid could bounce off of each other (rebound)
  • The ship could be sucked into the asteroid with the force increasing as the ship got closer (gravity)
  • The asteroid could push against the ship the closer the ship got to it (reverse gravity)

Each of these effects would be programmed into the game. Each of these effects would also create a different kind of gameplay. An entire genre of games known as physics-based games simply define the laws of physics for a game universe and then let things interact to see what will happen.

AI

AI, or artificial intelligence, is another set of rules that defines how characters or objects that are controlled by the compute behave. AI is typically applied to enemies and other Non-player Characters (NPCs) to give them a life-like appearance in the game. Some examples of AI include:

  • A mine that automatically detects that the enemy is close and blows up
  • A homing missile that locks onto a space ship and draws closer no matter how the ship navigates
  • An enemy character who detects that the player coming and hides behind a rock

AI is typically considered one of the most difficult areas of game programming. Some algorithms are quite easy (for example, the homing missile only needs the ships position to know how to track it), while others are very complex (for example, hiding behind a rock). Some games even provide an AI opponent for you to play against.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.171.52