Take the Money and Run: ICM Final!

Published December 06, 2017

Simon Jensen (link) and I made a game in which you generate and control a personalized bot which travels the world (in your stead).  The project can be found here and the code can be found here.  Below is a run-down of the various elements that went into the project in terms of both technical and design choices:


Our node.js server performs several functions:

  • serving the game pages to the clients using Express.js,

  • communicating with those clients, relaying player login and saved game information between the client and the database using Socket.io,

  • pushing player and saved game information to Firebase database and querying for saved information.


We are using Google’s “Firebase” database as a service to store game information.

Saving Images:

I had some trouble figuring out exactly how to save images to the database using the p5.js library.  At first, I tried passing the p5 image object to the database directly.  This didn’t seem to work, which I think was because the object

This stored several

Because the built-in p5 save() function automatically downlaod


This project brought up a number of questions about how javascript executes in time and how p5.js interacts with DOM elements:

  • Because our game would dynamically query the flickr API for photos from cities where the player-avatar was visiting, we were making loadJSON calls throughout the game.  As such, we were unable to place this loadJSON call inside of the …….. confusion about function execution order…