If you are visiting this page, you must be interested in contributing to ai-planet. The thing to keep in mind is, since this is an OpenSource project, your imagination is your limit. Any idea you have, you can make possible. All you need to make it happen is time and effort!
Contributors
Aaron Hochwimmer
Dushan Tcholich
Dennis Murczak
Matt Snelling
Kaufmann Thorsten:
Dan Bartlett and Nik
Eric Grange and GLScene
Matt Weaver
Developing
If you can understand Delphi code, you can develop features, add creatures, fix bugs, profile the code, anything you want.
There are many tools in use for aiplanet. These include:
- Delphi - Object Oriented Pascal
- GLScene - 3D OpenGL graphics library
- GLBass - 3D Positional Audio library
- GpProfile - Profiling tool to optimize Delphi code
- Sourceforge - Opensource website
- CVS - Version control system to manage code changes
- OpenFX - Opensource 3DS model builder
- Frontpage - Web building
- ODE - physics library (currently phased out)
You will need CVS access and a SourceForge account.
You will also need Delphi and the latest GLScene from the CVS. To do this, read this tutorial.
Creatures
If you wish to add a creature to aiplanet, the first and most important thing you need is a 3DS model. If you want an octopus in aiplanet, the only way to get one is to either find a free octopus model, or build one yourself. Once you have one, then it is simple to add to the planet. You can also add suns, moons, explosions, etc, in the same way you would add a creature.
Using Octopus as an example, you can add a creature with the following steps:
CREATURES STEP ONE - Create cAIOctopus.pas:
Find a creature you like and copy and paste the code. For example I chose to take a Fox and replace it with Octopus. After you have this file made, you have to add it to the project, by using the "Delphi..Add to Project" button. You should call this file "cAIOctopus.pas" and copy it into the "aiplanet/Code" directory.
{
ai.planet
http://aiplanet.sourceforge.net
}
unit cAIOctopus;
interface
uses Classes, cAIBaseObject, cAIOccupations, cAIThings,
cAIPosition, cAILife, cAILink, cAICreature;
type
// ============================================================================
// an individual Octopus
AIOctopus = Class(AICreature)
public
Constructor Create(aParent: pointer);
Destructor Destroy; override;
procedure Fuel; override;
end;
implementation
uses
cAIReality, SysUtils, cGlobals, cAIVibes, cUtilities;
// ----------------------------------------------------------------------------
Constructor AIOctopus.Create(aParent: pointer);
begin
inherited Create(aParent);
Kind := cOctopus;
Health := 5024;
Position.SetSize(2, 2, 2, false);
Position.SetProperties(5, 0.1, 0.25);
Health := 4000;
Desire := cDesireWander;
end;
// ----------------------------------------------------------------------------
destructor AIOctopus.Destroy;
begin
inherited Destroy;
end;
// ----------------------------------------------------------------------------
// the fuel procedure is called once a round. put ai code in here
procedure AIOctopus.Fuel;
begin
inherited Fuel;
// example code to eat fish
Forage(cFish, 0.4);
if Grabber.Holding then
if Eat(128) then Noise(cNoiseEat, 1);
end;
end.
CREATURES STEP TWO - Adding to cAIThings.pas:
CREATURES STEP THREE - Adding to f3DEnvironment.pas:
CREATURES STEP FOUR - Adding an interface to your creature in vInterfaceClasses.pas, fImages.pas, and f3DEnvironment.pas
You are done! You can now run AIPlanet, use the Octopus tool to add an octopus to the water. Then add some fish and watch the octopus eat the fish.
CREATURES STEP FIVE - Adding optional sound effects, animations, and features to your creature.
Animation instructions will be posted upon request. For simple
animations, please look at the UpdateBird function in f3DEnvironment.
You will need a model for each pose of the creature. You can also use
skeletal animations, however you are on your own for creating the animations,
but I will help you integrate the animations into the engine.
Art
While the heart of aiplanet is the code, that code is pointless without art.
And as you can see, we need more art. If you can draw a 3D model, then aiplanet needs you!
Imagination is your limit. You may improve the current art, or create new art.
Most models are in the range of 20-50 polygons. This is to improve speed when many objects are on the screen at once, for example a flock of birds. High poly models can also be used, when the user zooms in close to a creature, the high detail model will be shown.
Sound
AI-Planet uses GLBass to create full 3D sound. Sounds may be created anywhere, at any time, even inside the game engine. To do this, you emit a "Vibe". These are found in cAIVibes.pas. Every creature has the ability to make a Noise, which is a Vibe of type cEffectNoise.
If you have any sound files (.WAV) that you would like to contribute, please send them to me, or add them to the CVS.
Marketing
Help spread the word about AI-Planet. Link to it on your site, or tell other sites.
Ideas
If you aren't a programmer or have no time to code, you can suggest something to add into aiplanet. Who knows, maybe it will be something easily added in!
Features
There are many things that would be great to have in ai-planet. You may want to build one, or provide an idea to add to this list:
There are also endless improvements to be made. If you can think of a better algorithm, data structure, then please suggest it or add it in:
Funding
If you wish to fund aiplanet or a similar project then contact David Kerr. About Dave: Dave is a broke Canadian who never stops working, money or no money. If you support Dave he can make things you like faster and better. So if you are rich please lend Dave a hand! For example a model of a fish costs $30.00. Donate a bit and boom there could be a nice looking fish swimming around.
Also available are AI Planet t-shirts and stuff!
Last updated: September 5 2003.