Skip to content

Third project of Intermediate JavaScript Nanodegree Program. This is a racing game called UdaciRacer Sim, which allows a user to race a simulated racer. This racing game runs as a Node application.

License

Notifications You must be signed in to change notification settings

karlajaramillo/racer-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the Hedgehog Simulation Game

Project Introduction

Let's choose a track and your hedgehog to start the race! You will need to accelerate your racer by clicking an acceleration button. A live updated leaderboard will show player positions and their progress on the track. You still have time to win, just accelerate to be the winner! Finally, when the hedgehogs finish the race, the results will be displayed and you will know who is the winner!

Aim of the Project

This is the final project of the Intermediate JavaScript Nanodegree Program from Udacity. The main purpose of this is to use Asynchronous Programming with JavaScript. Promises are the primary method for dealing with API responses in this game. And Async/Await syntax are used with API calls and internal logic to handle game processes.

Start race


92FA7665-AF50-4D03-A8B3-393E351D46A7

Select racer and track


183BD7B7-28EA-499C-9DB3-78718C9788A3

Get ready for the race


Screenshot 2021-03-10 at 10 07 21

Leaderboard and progress


Screenshot 2021-03-10 at 10 07 54

Results and start a new race


Screenshot 2021-03-10 at 10 09 39

API provided by Udacity


A pre-built API provided by Udacity will create the race selected by the players and return a stream of information lasting the duration of the race, resulting in a final ranking of racers. The API is provided in the form of a binary so that you can run it on any system. Because of this, you cannot edit the API in any way, it is just a black box that we interact with via the API endpoints.

Getting started

  1. The first step you need to do is clone this repository.

  2. To run the server, locate your operating system and run the associated command in your terminal at the root of the project.

Your OS Command to start the API
Mac ORIGIN_ALLOWED=http://localhost:3000 ./bin/server-osx
Windows ORIGIN_ALLOWED=http://localhost:3000 ./bin/server.exe
Linux (Ubuntu, etc..) ORIGIN_ALLOWED=http://localhost:3000 ./bin/server-linux

WINDOWS USERS -- Setting Environment Variables

If you are using a windows machine:

  1. cd into the root of the project containing data.json
  2. Run the following command to add the environment variable: set DATA_FILE=./data.json

Note that this process will use your terminal tab, so you will have to open a new tab and navigate back to the project root to start the front end.

  1. Top start the frontend, open another terminal tab and being at the root of this project, install the dependencies by running npm install && npm start. So, you should be able to access http://localhost:3000.

About

Third project of Intermediate JavaScript Nanodegree Program. This is a racing game called UdaciRacer Sim, which allows a user to race a simulated racer. This racing game runs as a Node application.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published