| Submitted by , posted on 05 July 2002 |

Image Description, by I've always wanted to post an IOTD, and today is my time. Just as how I like to hear myself speak, I like to read myself write so this description is gunna be long :P. The image you see are various screenshots from my OAC (grade 13) computer science ISU. The project was a wide open project and me and my friend chose to do a simple AI engine. We called it sdAI, and it goes with my sadism library i'm working on. ( http://mars.spaceports.com/~sedition -- you may _soon_ find info on sadism there)
I had no experience with before starting on this project, and I didn't do too much reading before I started to design sdAI, so its architecture prolly isn't the best. There are two parts to the AI engine, low-level components : generic finite state machine class with messaging and message interception, an MLP, and a 2D influence map (the influence map supports searching functions! and the ability to add different types of influences on the influence map, like conical, doughnut shape etc.). The other part is the highlevel, meant for a real-time strategy game, or even any game with a top down, run-a-base/empire game like civilization, command and conquer yadda yadda. It uses 4 main objects: goal, subgoal, underling and priority rule. Priority rules are used to reprioritize major goals. These goals are like: base production, offensive, defensive, resource collection etc. These major goals create and manage subgoals. These are like harvest x number of resources, or protect unit "x" or destroy unit "x" etc. Subgoals are assigned to underlings. Its all nice and beutiful right? Well I'm pretty sure my teacher woldn't be very impressed with just the sdAI .lib file, so I made a test game: StarKraft.
In starkraft you are the NDI (national defense initiative) and you are fighting an enemy who are green, barbaric people (very orc-like) called the orgs. You collect tEberium, to fundyou war efforts. There are only the basic units/structures in the game: mine, engineer,attacker, defender, defensive tower and factor. So it can simulate a real game fairly acurately. I implemented the most simple goals and subgoals for the game, yet it works quite beautifully. I _would_ put the game up for download but its a whopping 20mb compressed.
I would like to direct your attention to exhibition "A". Here you see the beautful use of ASCII art. Undoubtedly the best part of the game. In exhibition "B" you see the beautfifully rendered main menu screen (at least part of it, i had to cram alot of shots in the allowed space). At C you see the lightning towers (not to be confused with tesla towers) shooting the engineers. Over at D you see the AI engine's dump of the underling states and the sub-goal states, attributing much eye-candy to the iotd. At E You see another tower shooting, but also the "power" influence map rendered in the radar. And I had to put at least one development shot in, thats the attacker object being textured.
For the stuff you can't see, the game has music and sound effects, i used SDL_mixer, and the music is ogg vorbis. I used my sadism library for terrain a quad-tree CLOD terrain engine, cytisus for the xml, errorhandling, GUI, texture management. I also used SDL, Freetype, and it uses OpenGL for the 3D graphics.
Wallaba
P.s. If there are any similarities in the names in StarKraft, are _purely_ coincidental.

[prev] | Image of the Day Gallery www.flipcode.com | [next]

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.