Here is where I'm keeping information on writing programs that interface with the Creatures program or modify Creatures files. Any links that go to programs at external sites are mentioned in the comments and these links will go to the home page of that site. I don't link to individual files.
Most of the code below has been compiled using Microsoft Visual C++ V5.0 Service Pack 3. It appears that some of the code may not compile under previous service packs - the changes to get it to compile are relatively minor but I would recommend installing the service pack anyway. Thanks to Cameron Paine for drawing my attention to the problem (and for noticing the memory leak in the DDE code!).
Creatures 3 and Creatures Adventures Shared
Memory Interface
The new Creatures games, Creatures Adventures and Creatures 3, use a different
means of interfacing with third party programs. I've been able to work out how
to send and receive data to the game and describe how to do it. Example source
code is available.
Creatures 2 OLE interface
Creatures 2 has an OLE 2 interface that enables access to Creatures using standard
OLE calls. This should enable easier access to Creatures from many programming
languages instead of using the relatively difficult to use DDE interface.
C++ DDE Code (Version 1.3 - 9KB - 25/6/98)
C++ code to access Creatures using the DDE mechanism. This code was written
using Visual C++ V5.0. It should be fairly portable to other compilers like
Borland. Let me know if you need help.
Version 1.1 updated to include the Brain classes in Brain.h and Brain.cpp. These are simple helper classes for decoding data from the brain lobes. I've also added the ability to receive data from the BrainActivity DDE topic. This code has been updated to be the same as that distributed in the Creatures directory of all the other utilities source code. Everything is now on a common code base.
Version 1.2 updated to compile with Visual C++ V5.0. Fixed bug in ExecuteMacro() method in CreaturesConversation.cpp which caused a small memory leak every time it was executed.
Version 1.3 has various bug fixes.
Creatures Command Line
Source Code (Version 1.0 - 5KB - 28/11/1998)
An example of using the DDE interface to Creatures using Borlands C++ Builder
product. This program and source code was kindly provided by Ernest
Julyan and it is also available at his own
web page. Thank you Ernest. Note that this source code requires a bug in
the Borland C++ Builder DDE code to be fixed. A public
domain fix can be applied. The compiled executable is available in the utilities
section.
LobeStudy Source Code (Version 1.4
- 38KB - 13/7/98)
The source code to the LobeStudy program. Also written using Visual C++ V5.0.
See the Utilities page for information on LobeStudy. It provides a slightly
more complex example on how to use the DDE code above.
BrainCellMonitor Source Code
(Version 1.6 - 41KB - 13/7/98)
The source code to the BrainCellMonitor program.
Written using Visual C++ V5.0.
BrainActivity Source Code
(Version 1.5 - 38KB - 13/7/98)
The source code to the BrainActivity program.
Written using Visual C++ V5.0.
ChemMonitor Source Code
(Version 1.2 - 38KB - 13/7/98)
The source code to the ChemMonitor program.
Written using Visual C++ V5.0.
Setting up your development environment
Unzip the selected file into a project directory with whatever option is required
to ensure that directories are extracted with the correct directory name. You
should get a 'Creatures' directory and a directory for the particular project.
The source code in the 'Creatures' directory is the same for all files above
so there should not be a problem with overwriting when unzipping.
Open the workspace file for the project (eg. BrainActivity.dsw). Each project adds the source code files from the 'Creatures' directory in to files section of the project. I think Visual C++ V5.0 hard codes the paths rather than using a relative path. If this is the case when you compile you may get an error saying that 'D:\Projects\Creatures\Brain.cpp' was not found or something like that. If so, delete Brain.cpp from the project (or any other file it complains about) and re-add it from wherever you unzipped it to.
Visual Basic 5.0 code
The source code for a simple Visual
Basic 5.0 project that uses DDE to send a command to Creatures and return
a result is available. Note that this is a very small example and doesn't do
much at all but should be enough to get you going using Visual Basic. The basics
of VB DDE were:
Run the program, enter the macro code in the text box (try 'inst,dde: getb cnam,endm') and press the button. The result should appear in the same text box (in this case, the currently selected norns name).
Hope that helps!