Skip to content
Stefano Balietti edited this page Oct 21, 2021 · 10 revisions
  • status: complete
  • version: 6.x

Preparation

  • Install version 10.x (or higher) of Node.js for your operating system (Win/Mac/Linux).

  • Install git for your operating system (Win/Mac/Linux).

  • Check that node and git are installed. Open a terminal or a command prompt and type:

    node --version
    

    You should see something like: v12.15.0

    npm --version
    

    You should see something like: 6.13.4

    git --version
    

    You should see something like: git version 2.22.0

  • Important: some Linux distributions install an executable named nodejs, and it might cause the installation to break. If this is the case, make a symbolic link from nodejs to node.

  • Important: for Windows, Git-Bash (installed with git) is the recommended command-prompt, and it can be opened as a normal program form the start menu.

Install nodeGame stable

  • Download the nodeGame installer (right-click, save as)
  • Open a terminal and navigate to the folder where you downloaded the installer
  • Install nodeGame v7 with the command: node nodegame-installer.js
  • Follow instructions on screen

Installing alternative nodeGame versions

  • Install the development version with the latest features: node nodegame-installer.js @dev
  • Install nodeGame v4: node nodegame-installer.js @v4
  • Install nodeGame v3: node nodegame-installer.js @v3

Note: If you are using Windows PowerShell V2+, @ is also the Splat operator. So, you need to modify the command slightly to escape it:

node nodegame-installer `@dev

Running Your First Game

NodeGame has an Ultimatum Game included in the default installation. To start the server and play the game follow these steps:

  1. Open a terminal and navigate to the nodegame folder (for Windows, Git-Bash is the recommended command-prompt)
  2. Start the server with the command: node launcher.js
  3. While the server is running, open one browser tab pointing to: localhost:8080
  4. Open more tabs, click "Play with Bots", or manually launch a bot connecting to: localhost:8080/ultimatum/?clientType=autoplay
  5. Check the monitor interface: localhost:8080/ultimatum/monitor

Next Topics

Next: Create a new game in nodeGame

Clone this wiki locally