This is a project I made with free assets but with my own code.
In Asteroid Rush, you play as a spaceship trying to survive while asteroids travel across the screen. If you shoot and hit an asteroid, there's a chance a power-up will spawn. You have 3 lives, and your goal is to achieve the highest score possible.
This is the first fully playable game I've made on my own.
This code snippet calculates the edges of the screen and uses that information to check if a game object is completely out of the screen. If it is, the object is teleported to the other side of the screen, similar to the mechanics in the game Asteroids.Â