Introduction RPG-Project Introduction
Introduction
News
Features
Source
POV-Ray
Sound
Game Basics
Screenshots
Download
Forum
Contact
Credits


Realization of living creatures

All creatures are realized fully object oriented. This means, that every creature is a separate object (in this case better "life-form"), which interacts independently with all others.

To clarify this procedure, let's look at a little example.

example

Every creature in a game (like player's characters, monsters, non-player characters) has a function generate() which is called, when the creature is created after start of program. When the game runs, later on, the function action() is called 30 times per second. This is all the main program does. All other actions of the interacting creatures are done by themselves. If one creature, e.g. a monster, decides to attack a player's character, this decision is made in function action(). It then calls another function of the monster's object called attack() which calculates the necessary parameters and then calls the function attacked() of the character's object. This function then calculates, whether the attack was successful or not (e.g. whether the character is able to block the attack, or how many damage he takes).

This concept is used for all actions a creature can do. There are a lot of functions which are called by action(), such as wait(), walk() and so on.

For player's characters there are some more functions called by the main program. They are used to accept the players tasks for his characters, e.g. walk somewhere or talk to a non-player character.

If you are familiar with object oriented programming and like to develop a part of the virtual intelligence of our creatures, just mail us and you will get all informations and sources you need.

The RPG-Project