Skip to content

richard-oden/animal-crossing-radio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Animal Crossing Radio

Plays real-time music from Animal Crossing: New Horizons, synced to your location and weather. You can also request specific songs from K.K. Slider and there's a slingshot mini-game.

How it works

Location data is gathered in two ways: the browser's built-in gelocation function and Google's Geolocation API. That location is then displayed using reverse geocoding (also through Google). The time is displayed in the correct timezone using Google's Timezone API and formatted using the browser's language property. After that, weather data is gathered from OpenWeatherMap API and displayed. Finally, specific audio files are requested from ACNH API using the user's local time/weather or search criteria.

The mini-game is built using the Matter.js physics engine.

The app is built using Node.js with Express and is hosted on Heroku here. Just give it a few seconds to load, as it will "sleep" after 1 hour of inactivity.

Code Louisville - January 2021 JavaScript Features

  • Retrieve data from an external API and display data in your app (see getMusic in app.js and server.js, which uses node-fetch)
  • Create and use a function that accepts two or more values (parameters), calculates or determines a new value based on those inputs, and returns a new value (see calcMusicId in app.js)
  • Build a conversion tool that converts user input to another type and displays it (see getWeather in app.js)
  • Calculate and display data based on an external factor

Additional Features

  • Create a web server with at least one route and connect to it from your application using ExpressJS

More credits