Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

freeCodeCamp

Code Asteroids in JavaScript (1979 Atari game) - tutorial

via freeCodeCamp

Overview

Learn to recreate the classic 1979 Atari game Asteroids from scratch using vanilla JavaScript in this comprehensive tutorial. Begin by creating the spaceship, then move on to generating asteroids and implementing collision detection with explosions. Develop the shooting mechanics for lasers and asteroid destruction, followed by adding levels, lives, and game over functionality. Implement a scoring system with local data saving, and finally, enhance the gaming experience by incorporating sound effects and background music. Access provided code snippets and resources for each section to follow along step-by-step, covering everything from basic game mechanics to advanced features in approximately 2-3 hours.

Syllabus

) Spaceship creation.
) Astroids creation.
) Collision Detection and Explosions.
) Shooting Lasers and Asteroid Destruction.
) Levels, Lives, and Game Over.
) Scoring and Saving Data Locally.
) Sound Effects and “Music”.

Taught by

freeCodeCamp.org

Reviews

Start your review of Code Asteroids in JavaScript (1979 Atari game) - tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.