update readme

This commit is contained in:
Asraelite 2016-03-28 11:25:06 +01:00
parent ce5f5380e1
commit c5972031ac
2 changed files with 20 additions and 4 deletions

View file

@ -5,14 +5,26 @@ This is a stupid little game where you fly around and bump into asteroids and st
###Installation
Clone the Git repository, install node.js version 5.6.0 or higher then run `npm install` in the project directory.
Clone the Git repository, install Node.js version 5.6.0 or higher then run `npm install` in the project directory.
Make sure that the command `node` links to this Node..js version and not `nodejs`.
###Running
Run `node index.js`.
Run `node index.js` or `npm start`.
Port 8080 must be open for people to play across the internet.
Port 8080 is used by default and this must be open for people to play across the internet. To use a different port, set the `process.env.PORT` variable.
###Tests
To run tests, use `npm test`. At the moment it doesn't test very much though but it can be useful to see if a player is at least able to connect without you having to go and open a browser tab.
###Controls
WASD to move, mouse to aim and shoot.
WASD to move.
Mouse to aim and shoot.
E/Q to change weapons.
Enter to chat.

View file

@ -17,6 +17,10 @@ class ServerInterface {
}
log(msg) {
if (!fs.existsSync('log')){
fs.mkdirSync('log');
}
let timestamp = this.timestamp;
let output = msg;
Array.from(arguments).splice(1).forEach(a => output = output[a]);