MoveToWayPoint:  Simple actor behavior for Eclipse Gensesis RC1 and GeneWalker Application framework
	by:  	JJ Robinson II
		mkia1@geocities.com
		http://www.geocities.com/SiliconValley/Way/7155/



Notes for Modification version 1.0, 3.15.99

This demonstration shows the implementation of a simple waypoint tracking "behavior" 
for Eclipse Genesis RC1 actors ( I find the term "artificial intelligence" or "ai" 
personally insulting, especially after playing many games against automated opponents).  
This programming technique for automatic "puppetry" of Genesis actors should be helpful 
to the growing Genesis game development community.  I built this demonstration into 
Klaus Zerbe's "Genewalker" C++ application framework,  which is easier to understand 
and use than the very exciting but extremely complex "GTest" application example in C 
which is provided with the engine.  

The Eclipse Genesis RC1 3d game engine is available at:
	http://www.genesis3d.com/download.html
Klaus Zerbe's "Genewalker" C++ application framework is available at:
	http://home.rhein-zeitung.de/~kzerbe/

Demonstration 1.0
Preliminary Distribution notes:

Uses of this information:  You can use my example code in your own programs as you wish, 
but don't redistribute the executable or the complete source on the web or elsewhere yet.  
It's mainly for the benefit of other Eclipse Genesis programmers, and I'm talking with 
others about a fully integrated distribution.  

This preliminary distribution includes:

- The actor, Mannequin1.act.  This basic animation mannequin was exported from Hash        
Animation Master with the free Genesis export plugin developed by Martan Sant, available at:     
http://www.cstone.net/~martan/genesis3d/amgenesis.htm

- A minimal level, test1.bsp.  This is just the inside of a textured cube, developed in     
the Genesis level editor, Gedit, supplied with the engine.  If you view the entities in     
test1 with Gedit, you'll find four WayPoints laid out in a square, and two instances of     
Mannequin1, "Artefact1" and "Artefact2",  each set to start walking toward a different     
WayPoint .  You can also view the custom WayPoint entity, which is just an origin     
vector, and the additions to the "Artefact" entity which allow per-instance WayPoint     
processing.

- Source for the changes and additions to the GeneWalker framework:

genewrap.h:  
Includes the WayPoint entity and changes to the original Artefact    
entity for the tracking support.  Two new functions are defined in the CArtefact Class:     
CArtefact::MoveToWaypoint and CArtefact::FaceToDirectionVector.  

MovetoWaypoint.src:      
Source for implementation of changes to the CArtefact Class for the WayPoint tracking     
behavior.  This includes CArtefact::MoveToWaypoint, CArtefact::FaceToDirectionVector,     
and changes to CArtefact::Render to call the new functions. 

- The executable, MallWalker.exe.  I'll be expanding this into a really stupid and              
annoying demonstration game (hopefully with multiplayer network support and     
synchronization) as I learn how to make a serious game with the Genesis engine.  For the     
purposes of this demo,  I've disabled the command line processing in GeneWalker and     
coded in ..\art\test1.bsp so MallWalker will run by itself.  When you run the program,     
the two instances of Mannequin1 will start toward WayPoints 1 & 3, and then follow each     
other around the perimeter of the level.  Note that if you get in their way they will     
walk through you like ghosts (collision processing isn't in there yet).

Implementation Notes:

- I haven't found an efficient way to make FaceToDirectionVector coexist peacefully with       
the Orientation capability in Render.  I finally disabled the Orientation contribution    
to the rendering XForm and reoriented the model and its IK skeleton (face down, in this       
case) in the 3D modeler.

Please refer any comments or suggestions to me at mkia1@geocities.com.
JJ Robinson II, March 15, 1999

*****************************************
Notes for Version 2.0, May 13, 1999

This distribution updates the MallWalker demo to work with Eclipse Genesis version RC4, and 
adds several new features:

- Collision and Proximity detection.  I've implemented Actor-Actor, Actor-Player, and Actor-Level 
  collision detection, and a simple system to detect Actor-Player proximity.  Collision detection 
  uses fixed bounding boxes at this time.  Actor-Player collision uses geWorld_GetContents to check 
  for intrusion into the Player's box, and is omnidirectional.
- The world's worst lip-synch animation.  I've hinged the top of Mannequin1's head to make a mouth.  
  The actor is partially broken.  This is probably a temporary problem with the export plugin.
- Interactions between the Actor and Player on proximity and collision.  The actor will say a 
  warning message (with really awful lip-synch), as proximity range is detected.  It will say 
  another line after collision.  Note the use of geSound_SoundIsPlaying to cause the "mouth" to move 
  only while the message *.wav is playing. geActor_BlendPose is used to cause the "lip-synch" motions 
  to coexist with either the walking or toe-tap motions.  The sound clock takes its time counts from 
  the original animation clock, and insures that the collision message happens at about ten second 
  intervals (adjustable from the entity editor).

This should add up to an even more annoying  demonstration (not unlike traffic and shopping interactions 
in Houston, Texas) of Genesis capabilities.  It should be viewed as a demonstration of general ideas, 
rather than a point of departure for further development.  The implementation is a "C-ified" hack, 
which should really be organized into a Game manager class. It at least shows that there may be other 
things to do with game characters besides target practice.

The Eclipse Genesis RC4 3d game engine is available at:
	http://www.genesis3d.com/download.html
Klaus Zerbe's "Genewalker" C++ application framework is available at:
	http://home.rhein-zeitung.de/~kzerbe/

Distribution notes:  Uses of this information:  As above. 

This distribution includes:

- The actor, Mannequin1.act.  This basic animation mannequin was exported from Hash Animation     
  Master with the free Genesis export plugin developed by Martan Sant, available at:     
  http://www.cstone.net/~martan/genesis3d/amgenesis.htm

- A minimal level, test1.*.

- Full source code and MSVC++6.0 project files.

- The executable, MallWalker_RC4.exe. 

To Do:

- The Mall level, with a smaller *.txl file
- Network wrapper

Please refer any comments or suggestions to me at mkia1@geocities.com.
JJ Robinson II, May 13, 1999

