Skip to content

Javascript single page web application, utilising WebSockets to open client-server communication to enable real time multiplayer. Features dynamic searching to find customisable user created tracks.

Notifications You must be signed in to change notification settings

Shilcof/frontend-track-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

frontend-track-builder

Frontend code for track-builder, a javascript single page web application where users can build and submit tracks to a database handled in the backend by Ruby on Rails (git repo here https://github.com/Shilcof/backend-track-builder).

When viewing tracks, a 'car' is generated for each user that can be driven around the track. Using websockets, the location of the car is braodcast to any other user that is also viewing that track so that they can race each other on it.

The app is currently hosted at https://track-builder.netlify.app/, please visit it and encourage your friends to visit the same track to race!

Installation

track-builder was developed using Javascript and Ruby on Rails.

To run track-builder on your machine, you must first download the files from this repository and the backend. On the backend you must change into the main directory in your terminal.

Then you must use bundler to install the required gems.

bundle install

To set up the database for the application and seed it with dummy data, you must run:

rails db:migrate

Usage

To run the application on your computer you can host it with:

rails s

and then in the front end repository open the index.html page in your browser.

To stop hosting the aplication, simply enter control + 'C' into the terminal where it is running.

Also in the trackAPI.js file you must amend the port and websocket address to the localhosting that you use. Then open the index.html file in your browser.

From here you can create your own tracks, and if you use separate private browser windows, will be able to see cars moving in each page.

Contributing

Pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The application is available as open source under the terms of the MIT License.

About

Javascript single page web application, utilising WebSockets to open client-server communication to enable real time multiplayer. Features dynamic searching to find customisable user created tracks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages