simonprickett / light-rail-game

Maps based guessing game for Nottingham Tram stations. Runs on Cloudflare Pages/Workers.
https://tramgame.simonprickett.dev
MIT License
1 stars 0 forks source link
cloudflare-pages cloudflare-workers game leafletjs

Light Rail Game

This is a light rail station name guessing game using Cloudflare Pages and Workers, the Bulma CSS framework and Leaflet maps with tiles from Stamen.

GIF showing the tram game working in a browser

TODO - write a full README... meantime, try it out in the following locations:

You'll need a recent version of Node.js installed to run this game. I've tested it with version 18.18.2.

To run this project locally, first clone it and install the dependencies:

git clone https://github.com/simonprickett/light-rail-game.git
cd light-rail-game
npm install

The game exists for a few different locations, and has to be built with a specific location target.

For the Nottingham Tram system:

npm run build nottingham

If you want to play with the Glasgow Subway data:

npm run build glasgow

The Edinburgh Tram system can be built like this:

npm run build edinburgh

And Austin MetroRail:

npm run build austin

To use the SF BART data:

npm run build sfbay

Now start the local server:

npm start

The URL that the game is running on will be displayed in your console output. Example: http://127.0.0.1:8788/