Instructions - Pottus/ColAndreas GitHub Wiki

Installing

  1. If you haven't done it yet, generate the ColAndreas database (ColAndreas.cadb). For doing this, run the Wizard executable (ColAndreasWizard.exe) and follow the instructions. Save the file in the folder scriptfiles/colandreas
  2. Add the server plugin:
    • Windows: Copy ColAndreas.dll to the plugins folder of your server and add "ColAndreas" to the plugins line in server.cfg
    • Linux: Copy ColAndreas.so or ColAndreas_static.so (see the note above) and add "ColAndreas.so" or "ColAndreas_static.so" to the plugins line in server.cfg
  3. Copy ColAndreas.inc to the folder pawno/include
  4. Use CA_Init() to load the SA world:
public OnGameModeInit()
{
  // Objects need to be removed BEFORE calling CA_Init
  CA_RemoveBuilding();

  // Load the SA map
  CA_Init();

  // Create objects and add them to the simulation
  CA_CreateDynamicObjectEx_SC();

  // Objects need to be restored AFTER calling CA_Init
  CA_RestoreBuilding();

  return 1;
}

Building

Windows

Requirements

Plugin

  • Compile Bullet from source:
    • Download the source code from here.
    • Extract it to any location.
    • Open the "VS2013 x86 Native Tools Command Prompt" (?)
    • Switch to the directory where you extracted the Bullet source code using the cd command.
    • Build the project:
mkdir build
cd build

# Choose a folder for installing the Bullet libraries and headers
# Change it to your preferred path
set BULLET=C:\libs\bullet

cmake -DBUILD_EXTRAS=OFF -DBUILD_BULLET3=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_CPU_DEMOS=OFF -DINSTALL_LIBS=ON -DCMAKE_INSTALL_PREFIX=%BULLET% -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..

nmake
nmake install
  • Generate ColAndreas with CMake:
    • Download the source code from here.
    • Extract it to any location.
    • Using the same command prompt as before, switch to the ColAndreas directory using cd.
    • Generate the solution:
mkdir vs
cd vs

cmake -DBULLET_ROOT=%BULLET% ..
  • Open the solution (ColAndreas.sln) using Visual Studio and compile it.

Wizard

  • Use the provided solution file: WizardApp/ColAndreasWizard/ColAndreasWizard.sln

Linux

Requirements

Dynamic version

  • Install the required packages:
    • Ubuntu: sudo apt-get install libbullet-dev:i386 cmake g++-multilib git
    • IMPORTANT: You require the 32bit version of Bullet, even if you're using a 64bit OS.
  • Get the source code:
git clone https://github.com/Pottus/ColAndreas.git
cd ColAndreas
  • Create a build folder and run CMake
mkdir build
cd build

# Replace "Release" with "Debug" if you want debug symbols
cmake -DCMAKE_BUILD_TYPE=Release ..
  • Build the project
make -j4
  • The compiled file will be placed in the build folder.

Static version

  • Install the required packages:
    • Ubuntu: sudo apt-get install cmake g++-multilib git
  • Compile Bullet from source:
# Getting the source code
wget https://github.com/bulletphysics/bullet3/archive/2.83.5.tar.gz
tar -xzvf 2.83.5.tar.gz
rm 2.83.5.tar.gz
cd bullet3-2.83.5

# Creating a build directory
mkdir build
cd build

# Make sure we generate 32bit code
export CFLAGS="-m32"
export CXXFLAGS="-m32"

# Running CMake
cmake -DBUILD_EXTRAS=OFF -DBUILD_BULLET3=OFF -DBUILD_UNIT_TESTS=OFF -DBUILD_BULLET2_DEMOS=OFF -DBUILD_CPU_DEMOS=OFF -DCMAKE_INSTALL_PREFIX=../output  ..

# Building and installing the project
make -j4
make install

# Going back to where we came from
cd ../..
  • Compile ColAndreas and tell CMake to use the version of Bullet that we just compiled:
git clone https://github.com/Pottus/ColAndreas.git
cd ColAndreas

mkdir build
cd build

cmake -DCMAKE_BUILD_TYPE=Release -DBULLET_ROOT=$(pwd)/../../bullet3-2.83.5/output ..
make -j4
  • The compiled file will be placed in the build folder.