Awesome Open Source
Awesome Open Source


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 );


Using it

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

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

linux addons/hldsv8/ v8

Run hlds as usual.


JS source:

function ClientConnect(params)
	console.log('A client connected! 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.

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Js (1,061,136
C Plus Plus (239,108
Plugin (113,829
Google (36,781
Hlds (72