Giter Site home page Giter Site logo

nodegame / nodegame Goto Github PK

View Code? Open in Web Editor NEW
115.0 13.0 18.0 4.22 MB

Complete nodegame repository with examples and documentation

License: MIT License

JavaScript 71.02% Shell 23.39% Batchfile 5.59%
nodegame javascript games online-games experiment behavioral science multiplayer synchronous game

nodegame's Introduction

nodeGame

Fast, scalable JavaScript for large-scale, online, multiplayer, real-time games and experiments.


The Good parts

  • Open source and open standard (HTML5)
  • Modular framework (server / client / window / widgets / games)
  • Low / medium level of programming required
  • Powerful API
  • Integrated NDDB Javascript database
  • Server can run multiple games at the same time
  • Powerful and customizible waiting rooms
  • Monitor interface
  • Works on mobile devices and tablets
  • Bots (for playing) and Phantoms (for testing)
  • Installation is required only for the server, clients just need their browser windows
  • Integrates smoothly with other libraries (e.g. jQuery, D3.js, etc.) and web services, such as Amazon Mechanical Turk

Quick Start

nodeGame comes with a default game taken from the academic literature of game theory. It is called the Ultimatum game. To play it follows the steps:

  1. Download the latest version of node.js for your platform
  2. Download the latest version of git for your platform
  3. Download installer, and install nodegame: node nodegame-installer
  4. Enter installation directory.
  5. Start the server with the command: node launcher.js
  6. Open one tab pointing to localhost:8080
  7. Select Ultimatum game
  8. Open more tabs, or start a bot through the waiting room interface
  9. Check the monitor interface at localhost:8080/ultimatum/monitor

Documentation

Complete documentation is available in the nodeGame wiki.

License

MIT

nodegame's People

Contributors

jdoerrie avatar philippkueng avatar shakty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodegame's Issues

Aliases in stages do not work if the steps to the referenced stage are added after the alias

Example:

This does not work:

  stager
        .next('instructions')
        .next('quiz')
        .repeat('game', settings.REPEAT)
        .repeat('game AS game2', settings.REPEAT)
        .repeat('game AS game3', settings.REPEAT)
        .next('questionnaire')
        .next('end')
        .gameover();

    stager.extendStage('game', {
        steps: ['bid', 'results']
    });

This works:

  stager
        .next('instructions')
        .next('quiz')
        .repeat('game', settings.REPEAT)

    
    stager.extendStage('game', {
        steps: ['bid', 'results']
    });
    
    stager.repeat('game AS game2', settings.REPEAT)
        .repeat('game AS game3', settings.REPEAT)
        .next('questionnaire')
        .next('end')
        .gameover();

When it does not work, node.game.plot.getStep fails because inside the sequence the aliasing stage has empty steps array.

W.searchReplace

Seems broken, or at least the API could be improved, with wiser defaults.

Suggestion for room names in data directory

It would be nice if the numbers on the subdirectories of the data directory were more digits (at least four, maybe even five or six), with leading zeros. For example, instead of room7 have room00007. This way they'd sort in tidier fashion.

Keep track of opened past opened files

Whenever a result file has been opened in the past, a warning should be shown when it is re-opened again, and possibly a list of actions that has been performed with that file.

Update build file

  • It should use cross-platform file naming (require('os'); os.sep; path.resolve)
  • It should make sure the version number is written correctly into the build

pull updates from nodegame website

Periodically, upon starting the server (or only by explicit request), current version should be checked against latest, and user should be prompted to update or not.

@dev installer fails in ubuntu subsystem of windows 10

Oops! The following error/s occurred:

{ Error: EACCES: permission denied, rename '/home/balistef/www/node_modules/nodegame' -> '/home/balistef/www/nodegame-v4.0.4'
at Object.renameSync (fs.js:589:3)
at someMagic (/home/balistef/www/nodegame-installer.js:387:12)
at execFile (/home/balistef/www/nodegame-installer.js:248:21)
at ChildProcess.exithandler (child_process.js:280:7)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Socket.stream.socket.on (internal/child_process.js:380:11)
at Socket.emit (events.js:182:13)
at Pipe._handle.close (net.js:599:12)
errno: -13,
syscall: 'rename',
code: 'EACCES',
path: '/home/balistef/www/node_modules/nodegame',
dest: '/home/balistef/www/nodegame-v4.0.4' }

Installation did not complete successfully.

Create a Levels Master File

At the moment players need to be moved manually across levels. A file could contain the order of levels and the criteria to be moved into them.

Maybe all levels should be inside levels (also the default one), although it would be nice to guarantee backward compatibility

SVOGauge add SVO Type

svoGroup = 1 if svo_degree < -12.04 // competitive
svoGroup = 2 if svo_degree >= -12.04 & svo_degree < 22.45 // individualistic
svoGroup = 3 if svo_degree >= 22.45 & svo_degree < 57.15 // prosocial
svoGroup = 4 if svo_degree >= 57.15 // altruistic

Installer seems to be broken with node 8

Installation for dev and latest fails because smoosh cannot install a sub-module.

The easy fix is to stop the installation under node 8 and show a warning.

I haven't try installing the stable version on node 8, maybe that works if does not require a smooshed file.

launcher compile and launch phantoms

Phantoms might fail if they are alongside compilation (receive incomplete or missing nodegame-full).
Example of command:

node launcher -b widgets -p ultimatum -n 2

Having a frameCb?

Maybe this is more a nodegame-window issue.
To consider, it would make (auto) bots and phantoms easier to write.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.