Please enable JavaScript to use CodeHS

Meteor Galaxy Game

Welcome to Meteor Galaxy! CodeHS student, Eric Hoelscher, created this tutorial as a step by step guide to develop a fun and dynamic game that will take your JavaScript skills to the next level! In his words, "Students following the series will learn how to use more of the CodeHS graphics library as well as how to write organized and structured code, use trigonometry to do rotated movement, set up basic game physics, and make menus with clickable buttons... My hope is that this will be a compelling resource that will encourage other students to be excited about programming and help them take their programming skills to the next level." He did a great job and we are super excited to share this on CodeHS. Enjoy this awesome tutorial!

By Ryan Hart

Video Introduction
Video Part 1: Keyboard Inputs and Animation
Example Part 1: Variable References
Exercise Part 1: Your Turn!
Video Part 2: Loading Web Images
Exercise Part 2: Your Turn!
Video Part 3: Game States
Example Part 3: Enumerators
Example Part 3: Switch Statements
Exercise Part 3: Your Turn!
Video Part 4: Random Stars
Exercise Part 4: Your Turn!
Video Part 5: Velocity and Rotation
Exercise Part 5: Your Turn!
Video Part 6: Adding a Force Field
Exercise Part 6: Your Turn!
Video Part 7: Adding Meteors
Exercise Part 7: Your Turn!
Video Part 8: Adding Laser Beams
Exercise Part 8: Your Turn!
Video Part 9: Collisions
Exercise Part 9: Your Turn!
Video Part 10: Finishing Touches
Exercise Part 10: Your Turn!
Challenge Challenge: Make it Your Own!