» Edit Game Info

5 years ago by yatayata

hi -

was wondering if anyone has used node.js instead of the php server for just serving up whatever is needed for weltmeister?

there seem to be some threads here to do with using and node for multiplayer games, impsock etc, but i just need the much more basic case where i can dump apache/php.

if nothing is done already, is there a spec on what weltmeister needs, or is it a case of decoding the lovely php inside api/*.php , like:

$globs = is_array($_GET['glob']) ? $_GET['glob'] : array($_GET['glob']);



5 years ago by yatayata

turned out to be a temporary entity file. seems like the editor hoovers up everything in the directory, whereas the runtime only does as requested by the game.

5 years ago by dominic

Conner Petzold ported Weltmeister's backend to node. It's on Github:

Btw: this line
$globs = is_array($_GET['glob']) ? $_GET['glob'] : array($_GET['glob']);

makes sure that $globs is an array, as you can modify your lib/weltmeister/config.js to load entities from several directories:
'entityFiles': ['lib/game/entities/*.js', 'lib/some/other/dir/*.js'],

4 years ago by explor3r

I had the same issue and did try out node-impact but ended up having issues (PHP errors continued to crop up in Chrome Developer Tools debugging..) I am not sure if this is a version-incompatibility issue (I am using Impact-1.21).

I did find another github project that rebuilt Weltmeister as a Node service.

This one worked for me for simple examples though I am yet to dive into more complex usage.

4 years ago by drhayes

Heh. That would've been helpful to find before I started building it, too:

I wanted something that was as simple as http-server but I could use it globally across my system; no drop-ins to existing node apps.

4 years ago by Jaha

Yea I just extended node-impact to work using an express app that just loads the game assets from the "public directory" so you can access your game/wm at http://localhost:PORT/game1/ or http://localhost:PORT/game2/wm. Hopefully ill get a chance to post to github soon.

6 months ago by Bum

I've produced a full nodejs impact solution here:

Note, you need to buy an impact license to launch the game as the {/lib/impact} files are not provided
Page 1 of 1
« first « previous next › last »

Post Reply

Please login or register to reply.