Half Life Dedicated Server with Google V8 JS Engine (a metamod plugin)
C++ C Shell
Switch branches/tags
Nothing to show
Clone or download
Latest commit 17c4443 Jul 8, 2015



Half Life Dedicated Server with Google V8 JS Engine (a metamod plugin)

! Abandoned, see hl.js (node/io.js + hlds as a metamod plugin)

How to build

Get files


# tar zxfv hlsdk-2.3-p4.tar.gz
# tar zxfv metamod-1.20-linux.src.tar.gz

Build V8

v8# make dependencies
v8# make ia32.release i18nsupport=off library=shared

Installing the package provided by your linux distro could satisfy the dependecy. Eg. apt-get install libv8-dev.

Modify hlsdk source

Compiling HLDS-V8 with untouched hlsdk will throw an error message:

... error: extra qualification ‘CBasePlayer::’ on member ‘TabulateAmmo’ [-fpermissive]

To fix this, hlsdk-2.3-p4/multiplayer/dlls/player.h line 295 should contain:

void TabulateAmmo( void );

Run build.sh

Using it

Copy libv8.so from v8/out/ia32.release/obj.target/tools/gyp to one of the LD_LIBRARY_PATH directory (preferably in the root of the hlds instance you test/use with).

Copy (or symlink) hldsv8_i386.so to cstrike/addons/hldsv8/ directory and append the following line to the cstrike/addons/metamod/plugins.ini file:

linux addons/hldsv8/hldsv8_i386.so v8

Run hlds as usual.


JS source:

function ClientConnect(params)
	console.log('A client connected! Name: ' + params.name + ', ip: ' + params.address);

Server log:

L 03/06/2014 - 08:19:01: "deejayy<1><STEAM_0:...><>" connected, address ""
L 03/06/2014 - 08:19:01: A client connected! Name: deejayy, ip:

Very-very WIP

As you can see in the source, the JS path is built in and only few dllapi callbacks are used to demonstrate the conception. Feel free to fork or contribute the project.