3ternal Divide Wiki
Advertisement


Links

Git for the lazy

Shared Object Information - Static And Dynamic

Dynamic Class Loading for C++ on Linux

Calling C++ Class Method From C

Linux Tutorial Posix Threads

POSIX Threads Programming

Reattaching to stdin

Server Setup

  • Fedora Core
  1. chkconfig sshd on
  2. service sshd start
  3. chkconfig httpd on
  4. service httpd start
  5. yum install yum-plugin-fastestmirror
  6. yum install telnet
  7. yum install git
  8. yum install gcc
  9. yum install gcc-c++
  10. yum install glibc
  11. yum install mod_mono
  12. yum install monit
  13. <installation of boost instructions needed>
  • Debian
  1. vi /etc/network/interfaces
  2. ifdown <interface>
  3. ifup <interface>
  4. apt-get install git
  5. apt-get install gcc
  6. apt-get install g++
  7. apt-get install monodevelop
  8. apt-get install mono-mcs
  9. apt-get install libboost.*-dev libboost-doc libboost.*1.42

Checking Out

git clone git@3ternal.com:3d.git

git clone git@3ternal.com:area.git

git clone git@3ternal.com:public.git

Compiling (*nix)

Game Engine

g++ -ldl -lboost_thread -rdynamic Driver.cpp Engine.cpp ModuleManager.cpp ThreadManager.cpp ThreadData.cpp Module.cpp Command.cpp Parameters.cpp Parameter.cpp Attributes.cpp Subscriptions.cpp -o 3ternalDivide

Modules

  • Command Line Interface
g++ -fPIC -shared CommandLineInterface.cpp -o libCLI.so
  • Core
g++ -w -fPIC -shared *.cpp chat/akey.c chat/allkeys.c chat/chatmain.c chat/eliza.c -o libCore.so
  • Logger
g++ -fPIC -shared Logger.cpp -o libLogger.so
  • TCPManager
g++ -fPIC -shared TCPManager.cpp Socket.cpp -o libTCPManager.so
  • Unit Tests
g++ -fPIC -shared UnitTests.cpp -o libUnitTests.so

Bridge Server

mcs -r:System.Data -r:System.Drawing -r:System.Windows.Forms ChatServer.cs Program-cli.cs -out:bridgeserver-cli.exe

Running

Game Engine:

./3ternalDivide <port> &


Bridge Server:

mono bridgeserver-cli.exe <bridge ip>:<bridge port> <engine ip>:<engine port> &




Fedora Note:

library files need special permissions, run the following command on fedora:

chcon -t textrel_shlib_t *.so

Debugging

Memory Leak Detection:

valgrind ./3ternalDivide


Thread Timing Issues:

valgrind --tool=helgrind ./3ternalDivide

Advertisement