Super Awesome Space Game! is a not-so-faithful recreation of the classic game Asteroids. The game allows you to fly around in a spaceship and shoot asteroids. The game is won when all the asteroids on the screen are gone.This game was written in GoLang utilizing a port of OpenGl (Open Graphics Library). OpenGl is a low level, open source graphics api common among many programming languages. Using this interface, all objects were created by defining vertices as arrays of floats and converting them into Vertex Array Objects. In this format, OpenGl then renders each object in line mode, by drawing lines between the coordinates. Everything from translation, rotation, asteroid generation, laser angle calculation, and other functions were all done in terms of these vertex array objects.
The asteroids in Super Awesome Space Game! are somewhat randomly generated by creating points at a random interval in a circle around the origin. The distance from the origin for each of these points is also somewhat randomized, generating asteroids of various shapes and sizes. Additionally, the asteroid class also features a split function, which is called upon collision with a laser, resulting in the creation of 2 new, smaller asteroids. These asteroids are also randomly generated, but are always smaller and faster than the original asteroid. Collision with an asteroid results in a death animation, and game over. The game can be seen in action here:
The repository can be found here: https://github.com/ttalexander2/csc372-final-project
This game has 2 dependencies. OpenGl and GLFW must be installed for the program to run. The following commands can be used:
go get "github.com/go-gl/gl/v4.1-core/gl"
go get "github.com/go-gl/glfw/v3.2/glfw"
Cd to the directory with the files, then use the following to run:
go run *.go