Artificial Intelligence Example
The Artificial Intelligence Example is actually a game that was created by me during
my last few terms at Westwood College. The controllable character (Ralph) in the
game is the large dot. And the NPC is the small dot (Timmy). I have several pages of
documentation and diagrams that describes the behaviors and logic. You can download
a word document with all this at the bottom.
Game Controls
Please take a moment to read through the controls and understand them:
- Left mouse click = move Ralph to point on map using collision avoidance
- Right mouse click = plot a path point at the current location and
draw a line to it, or create our path if we don’t have a previous point continually
clicking the left mouse button will add more points for Ralph to visit (using
collision avoidance of course)
- Left clicking after a path has been created will cause Ralph to
start following this path
- <Shift> + Left mouse click = plot one endpoint of our line
at the current mouse location. Continually clicking draws lines to the new points.
These lines cannot be crossed by Ralph or Timmy at any time. If Ralph is directed
to go to a point, but there is a line in his path, he will try to avoid it while
still traversing his path. There is also a limit to the number of lines we can create.
- <Ctrl> + Left mouse click = plot one endpoint of our safe
zone (grazing field) at the current mouse location. Clicking twice will plot the
opposite corner of the safe zone and cause it to be drawn to the screen. Ralph cannot
enter the safe zone, and he avoids it when traversing a path or going to a location.
If he happens to hit it, (usually as a result of getting too excited when chasing
Timmy) he will bounce off.
- "w" = toggle Ralph's ability to wander aimlessly
- "c" = toggle Ralph's natural desire to chase Timmy
- "+" = rotate Ralph counter clockwise
- "-" = rotate Ralph clockwise
- "Esc" = leave Ralph, Timmy, and our game world
Downloads
NOTE: All files here are verified and virus free.