This is a simple addon, that will launch a WebSocket server, recieves/sends data between an external WS app and the ARMA engine.
This mod is basically a .DLL/.SO file.
- client sends commands to the server
- ARMA gets the commands from the server
- ARMA executes the commands
- ARMA sends the result back to the server
- server sends the result to the client
- goto 1.
- server reads the commands at the start
- ARMA gets the commands from the server
- ARMA executes the commands
- ARMA sends the result back to the server
- server sends the result to all clients
- goto 3.
- copy "example/@arma-ws" directory to your ARMA root, then add "@arma-ws" to the "-mod" launch parameter
- include (and/or modify) the content of the "example/sqf/mode" directory in your mission
check if it's working:
- launch the "example/html/mode/arma-ws.html" and you can see your player's coordinates at live
modify the 'arma-ws.ini'
This is my first external lib for ARMA and I think it's fun to connect ARMA to the outer world.
get "boost" (http://www.boost.org/users/history/version_1_63_0.html)
set BOOST_ROOT enviromental variable e.g.:
Windows:
set BOOST_ROOT=n:\prog\C++\prog\boost_1_63_0
Linux:
export BOOST_ROOT=/home/gmb/prog/c++/boost_1_63_0
set BOOST_LIBRARYDIR enviromental variable e.g.:
Windows:
set BOOST_LIBRARYDIR=n:\prog\C++\prog\boost_1_63_0\lib32-msvc-14.0
Linux:
export BOOST_LIBRARYDIR=/home/gmb/prog/c++/boost_1_63_0/stage/lib
get "websocketpp" (https://github.com/zaphoyd/websocketpp)
set WEBSOCKETPP_ROOT enviromental variable e.g.:
Windows:
set WEBSOCKETPP_ROOT=n:\prog\C++\prog\websocketpp
Linux:
export WEBSOCKETPP_ROOT=/home/gmb/prog/c++/websocketpp
in linux (bash) type:
alias g++="g++ --std=c++0x"
cd build
cmake ..
Windows:
open the generated arma-ws.sln
Linux:
make
- crashes when the game is paused (use -noPause and Alt+Tab NOT Esc)
- the developers of boost (http://www.boost.org)
- zaphoyd for the source of websocketpp (https://github.com/zaphoyd/websocketpp)
- AsYetUnited for the source of extDB2 (https://github.com/AsYetUntitled/extDB2)
- killzonekid for the beautiful tutorials (http://killzonekid.com)
Use, modify at your will, just please mention me at the end of your README :)