Table of Contents
If you are reading this file, you probably already have the sources. Nevertheless, you can checkout them from SourceForge CVS using the following commands:
cvs -d:pserver:anonymous@cvs.massiv.sourceforge.net:/cvsroot/massiv login
cvs -z3 -d:pserver:anonymous@cvs.massiv.sourceforge.net:/cvsroot/massiv co massiv
cvs -z3 -d:pserver:anonymous@cvs.massiv.sourceforge.net:/cvsroot/massiv co demo_data
cvs -z3 -d:pserver:anonymous@cvs.massiv.sourceforge.net:/cvsroot/massiv co demo_install
The first line logs you as an anonymous user to the CVS - hit enter when asked for a password. The second line checkouts the source codes. You need to use the last two lines only if you want to run the Demo. The third one enables to download simulation data (textures, models, etc.) and finally the last line checkouts some stuff that could help you create installers for Windows.
Download Cryptopp
Download Cryptopp (a cryptography library) from http://www.eskimo.com/~weidai/crypto42.zip. Unpack it into src/ext/cryptopp (under Linux use the -a option to covert CR/LF newlines properly). Don't compile Cryptopp separately, i.e. using the provided dsw project.
Download the SDL libraries
Download and install the following libraries:
SDL (http://www.libsdl.org) - a portable library for graphics, sounds, etc.
SDL_image (http://www.libsdl.org/projects/SDL_image) - a portable library for loading/saving images from/to files.
Download OpenGL and the GLU library
Probably the OpenGL is already installed on your system. If not, refer to http://www.opengl.org for information how to install it. Note that besides the OpenGL you need also the GLU library. Even this one is probably already preinstalled; seek for more information on the same website.
![]() | Note |
---|---|
Requirements: MSVC 6.x or 7.x with a command-line compilation support installed. |
You have to accomplish the following steps to compile the Massiv Core library from source code under Windows:
Download Perl
A working possibility is ActivePerl (http://www.activestate.com) or the Perl of Cygwin (http://www.cygwin.com/setup.exe) for example. ActivePerl seems to be the more effective choice bringing less problems. Note: In case you decide installing Cygwin, you should choose "Default text file type: unix" during the installation.
Download STLPort
Download STLPort (a STD C++ library implementation) from http://www.stlport.org/download.html. Massiv relies on an ANSI-conformant STD C++ library. You are required to use STLPort under MSVC 6.x. If you are the lucky one and own MSVC 7.x, you can use the Dinkumware STD C++ library which is shipped with it.
Compile STLPort if you want to use it.
If you chose to use the STLPort library, compile it with the iostream support according to instructions included within the distribution:
You should go to the src directory of the STLport and run
nmake /f vc6.mak clean all
command if using MSVC 6.x or
nmake /f vc7.mak clean all
if using MSVC 7.0.
Generate makefiles
Run
configure.cmd
from the Massiv root directory to generate makefiles and some other stuff. Re-run each time you add or remove sources, change #includes, etc.
Configure compilation
Copy mkgen/config/msvc.config.example to mkgen/config/msvc.config and edit it. Especially you need to edit msvc.config to choose between the Debug/Release build and to set paths to your STL and SDL libraries. All you need to do should be obvious when you see the file contents.
![]() | Note |
---|---|
You don't have to regenerate makefiles when msvc.config is changed. |
Compile auxiliary utilities
Compile makedir.c, runin.c and touch.c in mkgen/win32 and move it to somewhere in your PATH.
![]() | Note |
---|---|
This compilation is as simple as the following command: cl {utility_name.c}
|
Compile Massiv
Run
nmake /f makefile.msvc
from src/core to compile the Core library.
![]() | Note |
---|---|
You should have no troubles compiling the Demo executables now. The Demo is located in src/demo directory. In each server, client and service subdirectory there is a config.h.example file. Copy it to config.h and edit it. You have to set the path to the main configuration file appropriately. After that, just run nmake /f makefile.msvc from each of the server, client and service subdirectory. |
![]() | Note |
---|---|
These are an instructions to compile not only the Massiv Core, but also how to make the Demo running. These instruction are already available in a simple text file massiv/doc/INSTALL in the source tree. It may contain more up-to-date information. |
![]() | Note |
---|---|
Requirements:
|
You have to accomplish the following steps to compile the Massiv Core library from source code under Linux/GCC:
To configure Massiv for your development environment, run
./configure
script in the massiv directory (the one containing doc and src subdirectories). If it fails, try running
./configure --help
to find out how to fix the problem. You also might examine the configure.log.
Compile and install
To compile the Massiv Core library, demo game client, server and data service and various utilities, run make in the massiv directory which contains the configure script from mentioned in the first step.
![]() | Note |
---|---|
The Demo is located in the src/demo directory. In each server, client and service subdirectory there is a config.h.example file. Before you start the Demo compilation, you have to copy it to config.h and edit it. You must set the path to the main configuration file appropriately. |
To install the Core library, demo game and utility binaries, demo game data, setup script and basic documentation into directories specified in the Configure step, run
make install
in the same directory. If you only want to install the demo game client, run
make install_client
To setup a demo game server, run the massiv-setup script from an empty directory. If you run it from empty ~/.massiv with no parameters, the default setup (three simulation servers, master data service and client with default privileged account, all on localhost) will be used. You can then run the data service, simulation servers and the client using the run-* scripts generated in the ~/.massiv directory. If you want a different setup (run servers on multiple machines, use different number of simulation servers, store runtime data in different directories, etc.), run
massiv-setup --config=FILENAME
Contents of the setup configuration (FILENAME) is documented in the default config which is used when no --config option is used. Run
massiv-setup --help
to determine location of the file. It is possible to configure for example the following:
How many simulation servers will be used
IP addresses of the master data service and simulation servers
Paths where run-time data (i.e. contents of subdirectories created by massiv-setup in current directory) will be stored on server machines.
Running the Demo Game Servers
Distribute contents of directories corresponding to run-* scripts generated in the previous step to all the server machines (their addresses and locations of the run-time files have been and configured before). Use run-* scripts to run the servers. The master data service must be running before simulation servers can be launched.
Running Demo Client With Root Account
Configuration of the client has already been generated. Copy contents of the client directory to the directory specified by massiv-setup config. You can use this config on any machine as long as it's stored in a correct directory. Use run-client to run the client. Use default as login name and no password.
![]() | Warning |
---|---|
This is pretty insecure, make sure that no one can read contents of the client/login/default file). Or you can reencrypt this file using massiv-decrypt (with no password) and massiv-encrypt (with new password). |
Provide the Client Installation Package
To run the demo, the massiv-client binary and libmassiv.so library is required. To create the initial run-time environment for the client, copy contents of the client directory created in step 3 without login/default file, anywhere, and modify config/paths.conf. Distribute contents of this directory to clients.
Users can then run Massiv client from the same directory on any computer, or optionally edit config/paths.conf if they want to store config files and run-time data in other directories. As the first step, they must create a new account. Any client can create accounts from the login dialog in Massiv Demo. However, unlike the "default" root account, new accounts created from the login dialog can't be used to edit the world terrain and entities, unless their privileges are modified by user with root account. If client wants to use her account on other computer, she can simply copy login/LOGINNAME to corresponding directory on the new computer.