Inspiration 💡

My dad and I talk about cars during road trips in our electric car--the Chevrolet Volt. Inspired by the Volt, I delved deeper into discussions around future environmental challenges that the electric vehicle industry may face.

What it does 🎮

The EV Game aims to spread awareness of environmental issues associated with production and recycling of Lithium batteries, a core component of electric vehicles. To gamify this learning experience, players dodge obstacles and collect exclamation mark icons. The more exclamation mark icons collected, the more facts about Lithium batteries shown after GAME OVER. For further reading, an info sheet with a list of concerns surrounding the future of electric vehicles is included.

How we built it 🛠

JavaScript, HTML, CSS

Challenges 🧩

  • Creating animated sprites--I had trouble finding a "game loop" that was meant to continuously run in the background
  • I was stuck on how to efficiently and cleanly create paragraphs of text without having to use large strings that would clutter my code

Accomplishments 💪

  • Having an exclamation mark icon appear at random times on the screen for players to collect
  • Dynamically displaying facts based on exclamation marks collected. Initially, I wanted to use File I/O to accomplish this task, but there wasn't a library available. Then, I considered creating using a huge dictionary full of strings but this was messy so I looked into a more dynamic way which referenced text from another page, and I was successful!

What we learned 📚

  • Using CSS keyframes for animation
  • Adding/ removing classes to an element with JavaScript
  • JavaScript LocalStorage

What's next for The EV Game ✨

  • More accurate collision detector
  • Multi-player mode to race against friends and learn about Lithium batteries and the future of electric vehicles together

Built With

Share this project:

Updates