Getting Started v3

Stefano Balietti edited this page Feb 12, 2017 · 75 revisions
Clone this wiki locally
  • status: complete
  • version: 3.x

Preparation

  • Install version 4.x (or higher) of node.js for your platform.

  • Optionally, install git for your platform (necessary for nodeGame's latest version).

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

    node --version
    

    You should see something like: v4.3.2

    npm --version
    

    You should see something like: 2.14.12

    git --version
    

    You should see something like: git version 1.7.7

  • 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.

Installation

Stable version (latest version below)

Update: some users reported problems with the stable installer. If you experience such problems, please use instructions for the latest version below.

  1. Right click and 'save as' the installer for your operating system: Mac/Linux or Windows.

  2. If you are using Mac/Linux, open a terminal and type the following commands:

    • Navigate to the folder where you have saved the installer, for example in Downloads.

      cd Downloads
      
    • Make the installer executable, and start the installation.

      chmod +x install.stable.sh
      ./install.stable.sh
      
  3. If you are in Windows, open a command prompt and type the following commands:

    • Navigate to the folder where you have saved the installer, for example in Downloads.
    cd Downloads
    
    • If the installer was saved as a text file, you need to rename it first.
    rename install.stable.cmd.txt install.stable.cmd
    
    • Start the installation.
    start install.stable.cmd
    

Latest version

  1. Make sure you have a recent version of git installed (see Preparation above).

  2. Right click and 'save as' the installer for your operating system: Mac/Linux or Windows.

  3. If you are using Mac/Linux, open a terminal and type the following commands:

    • Navigate to the folder where you have saved the installer, for example in Downloads.
    cd Downloads
    
  • Make the installer executable, and start the installation.

    chmod +x install.latest.sh
    ./install.latest.sh
    
  1. If you are in Windows, open a command prompt and type the following commands:
  • Navigate to the folder where you have saved the installer, for example in Downloads.

    cd Downloads
    
  • If the installer was saved as a text file, you need to rename it first.

    rename install.latest.cmd.txt install.latest.cmd
    
  • Start the installation.

    start install.latest.cmd
    

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
  2. Start the server with the command: node launcher.js
  3. Open one browser tab pointing to: localhost:8080/ultimatum
  4. Launch a bot connecting to: localhost:8080/ultimatum/?clientType=autoplay
  5. Check the monitor interface: localhost:8080/ultimatum/monitor

Next Topics

Next: Learn about how to create new games in nodeGame