Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Ptg

This node.js package transposes some of the core mechanics in ImpactJS to be usable within Node.js.

The features that are re-created are

* Module system
* Class system
* Native javascript object extensions

The main motivation behind this is multiplayer games - being able to re-use the same code on both client and server side is very important, especially in server authoritative games. Being able to run the same logic on both client and server side with no code changes is very powerful, and opens up many possibilities:

- Validate high-scores - after a game is completed, send the inputs over to your server where it can re-play the game server side with the same logic, and work out their true, honest high score rather than trusting the client.

- Multiplayer game logic sharing - Receive inputs from clients, play out the same movement or action logic, validate their position and other attributes etc.

- Expose your game objects via an API or embed them into other parts of your web site

Link: https://github.com/deakster/node-impact-emu

1 decade ago by ooker

This seems cool. I tried the example, and that worked. As soon as I try to require a module that uses impact (e.g. game.entities.player) I get this error:


node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
ReferenceError: window is not defined

Am I doing something wrong? With your setup, are you able to get this to work?
I'm using the latest drop of Impactjs.

Thanks!
Page 1 of 1
« first « previous next › last »