Get24 is a competetive real-time multiplayer math game that I wrote as a Spring 2013 semester project for a game development course at Auburn University. Check out the live demo running currently on a cloud instance from my good friends at Nodejitsu!
Get24 was built on Ubuntu Linux using nothing but open source software and libaries. The back-end was developed in Node.JS and has the following dependencies:
- Express 3
- Popular web application framework for Node.JS similar to Sinatra.
- Socket.IO
- Websocket API for real-time networking, includes fallbacks to use Flash, long-polling, etc, if Websockets are not available.
- Javascript Expression Evaluator
- Arithmetical expression evaluator/parser written in JavaScript.
- [node-uuid][node-uuid]
- Node module for creating both random and time based UUIDs.
The client is a simple HTML web app which uses only the following:
- KineticJS
- Framework for abstracting the HTML5 Canvas API. Offers simplified drawing, buffering, layering, grouping, animations, etc.
Get24 is based on the 24 Game. I enjoyed playing the card game
in my fifth grade classroom with my favorite grade school teacher. The card
game comes with a deck of cards each with four numbers on the face (1-9). There
are easy, medium, and difficult cards. The object of the game is for players
to attempt to manipulate the four numbers shown in an arithmetical expression
which evaluates to 24. The following image shows a sample card from the 24 game
which has a possible solution of 4*(4+1+1)
.
The game consists of multiple players being shown the same set of four digits
(0-9)
and are put on a timer. The first player that can craft an arithmetical
expression using all four of the digits once and only once is the winner.
Players may use the four basic arithemtical operators (along with parenthesis
to force precedence) in their expressions (+ - * /)
and may use some of them
more than once or not at all.
Here is a YouTube video of testing being done on the server and game client during development.
In order to build the project, you'll need to have both Git and Node.JS installed.
Clone the GitHub repository with the following:
$ git clone https://github.com/CoryG89/Get24
Change to the new repository directory, use npm
to install the dependencies
and start the server.
$ cd Get24
$ npm install
$ npm start
The server runs on port 3001 by default so you may access it in your browser by pointing it to the loopback address via the hostname 'localhost' via:
http://localhost:3001/