Installation
Instructions for Fantasy Engine
Environment
FantasyEngine was made on a Mac running OS 8.6, a Mac running OS X, Linux,
and Windows. It is written in Java and is provided as a Java package, com.FantasyEngine.
For compilation and documentation, standard Sun Microsystems tools were
used, including javac, jar and javadoc. To help in creating some of the
user interface classes, a product called Visaj was used. Visaj is free
for academic purposes.
FantasyEngine can be built and used on any system with Sun Microsystem's
JDK 1.3.x.
FantasyEngine should run on any system that fully supports Java 2; this
excludes running the engine on any Mac OS below X, as Apple is not planning
to provide Java 2 support for those systems.
To get the files, see the download page.
User installation:
This installation is for those who want to play
a game created with FantasyEngine, using the compiled FantasyEngine.jar
file.
For those
without the Java 2 Runtime Environment, v. 1.3
-
Download the Java 2 Runtime Environment, v. 1.3 for
the appropriate operating system from the Sun website: http://java.sun.com/j2se/1.3/jre/.
Install following the installation instructions given on the Sun webpage.
-
Next, make sure that the PATH environment variable
is set correctly to include the directory where you installed the Java
2 Runtime Environment. In Windows, for instance, you would want to add
the following line to your autoexec.bat file: "path=%path%;C:\jdk1.3.0_02\bin;",
where you replace "C:\jdk1.3.0_02\bin" with the directory where
the java.exe executable is located. For Unix or various flavors of Linux,
you can set the environment variable PATH in the file configuring the shell
that you are running. For instance, if you are running csh, you edit the
.cshrc and add a line like the following: "setenv PATH ${PATH}:/usr/bin"
if the java executable is located in "/usr/bin". If using a different
operating system platform, consult the documentation for that operating
system on how to set the path variable
After installing
the Java 2 Runtime Environment, v. 1.3
-
Unzip the zipped game files into an appropriate directory.
-
In Windows, open an MS-DOS prompt and switch to the directory above where
you unzipped the Classes and type the following command: "java -classpath
FantasyEngine.jar;Classes com.DoomVariant.DoomVariant", where you
replace DoomVariant by the name of the game. In Unix/Linux, follow the
same instructions, except open up a terminal window and replace the semicolon
between FantasyEngine.jar and Classes with a colon. If FantasyEngine.jar
is in a different directory than where you unzipped the classes, put in
the full path for FantasyEngine.jar. It is possible that the file name
may be different, depending on the revision - so use the appropriate name
in place of FantasyEngine.jar.
Developer installation:
This installation is for those who want to develop
a game using FantasyEngine, or for those who wish to play a game created
with FantasyEngine but who do not have the compiled .jar file.
For those
without the Java 2 SDK and Runtime Environment, v. 1.3
-
Download the Java 2 Runtime Environment, v. 1.3 for
the appropriate operating system from the Sun website: http://java.sun.com/j2se/1.3/.
Install following the installation instructions given on the Sun webpage.
Next, make sure that the PATH environment variable
is set correctly to include the directory where you installed the Java
2 Runtime Environment. In Windows, for instance, you would want to add
the following line to your autoexec.bat file: "path=%path%;C:\jdk1.3.0_02\bin;",
where you replace "C:\jdk1.3.0_02\bin" with the directory where
the java.exe executable is located. For Unix or various flavors of Linux,
you can set the environment variable PATH in the file configuring the shell
that you are running. For instance, if you are running csh, you edit the
.cshrc and add a line like the following: "setenv PATH ${PATH}:/usr/bin"
if the java executable is located in "/usr/bin". If using a different
operating system platform, consult the documentation for that operating
system on how to set the path variable.
After installing
the Java 2 Runtime Environment, v. 1.3
-
Download the appropriate files for your system
architecture and unzip the zipped files into an appropriate directory,
making sure to specify that the unzip program that you are using places
the files in the folder that they were originally stored in (for instance,
in WinZip, make sure that the "Use folder names" option is checked.
-
To compile FantasyEngine, use the appropriate compiling tools provided
with the engine. For Unix/Linux, use the makefile and type "make FantasyEngine".
In Windows, use the WinCompile.bat file.
-
Now it's time to create the game implementation.
Refer to the Internals file for more information
on implementation and finding help using JavaDoc webpages.
-
Next, create a makefile (in Unix/Linux) or a .bat
file (in Windows) where you have the following command: "javac -d Classes
com/DoomVariant/*.java", where you change the "Classes" directory
to reflect where you installed the FantasyEngine classes, and you change
"DoomVariant" to the name of your newly created game.
-
Run the game with the command: "java -classpath
Classes/ com.DoomVariant.DoomVariant" from an MS-DOS prompt in Windows
or a terminal window in Unix/Linux.
-
For easy distribution, use the "make jar" command under Unix/Linux in order
to compress FantasyEngine into a .JAR file, and provide that with your
compiled implementation of the game.