Spectral Universe is now Open-Source!

After a year of research and development, I've decided to change plans and release the source of both the game and engine. It's been a long path where I've learned a ton of things, but my initial plan was way too ambitious and I had to cut out a lot of cool features, ultimately leading finally to my decision to go the way of open-source software.

Posted by on

Inspiration
This project started out as a learning process for myself, as well as being a possibility to generate an income for my life later on. I've always had great fun playing games which were based on your music, like for example Audiosurf and Beat Hazard (which are great inspirations for me). However, it felt to me like these games weren't action packed enough or didn't do enough with the musical data they were given. Beat Hazard was the closest to being a thrilling action packed game, but I did not have the feeling that the AI was adapting to the music as much as it should be, and that your music was just some background music for an decent game.

Research
That's the point where I started to do research about what you actually -can- do with musical data for a game. I knew that sound (and thus music) was made out of a composition of audio waves along the audio frequency spectrum from 20Hz-20.000Hz. I had the feeling I needed that data in order to come up with a dynamic user experience, so I tried to figure out how to extract a frequency spectrum from music. This lead me to learn about Discrete Fourier Transformations and in particular the Fast Fourier Transformation algorithm. This math was way above my league, so I had to revise my old calculus skills from high school, had to learn about complex numbers and integration all over again. Once I finally got my skills on level again, I looked into the FFT algorithm for a second time. After a lot of studying I finally grasped the idea of the algorithm and thought I was getting there. No I wasn't.

Apart from a simple 2D snake game, I've had never ever created a 3D game before. Because I was eager to learn, I decided to create my own engine alongside the game. I've had to dive deep into OpenGL and computer graphics in general, had to learn about OpenCL in case my FFT was too slow for the CPU for a steady framerate and had to learn about OpenAL if I wanted to do anything with audio at all. It didn't end there though, because OpenAL was pure bitstream operation only library, and I still had to decode the audio files. As for OpenGL, what good is rendering 3D objects when there is no backend system sorting everything out?

Now all this had to be multi-platform (PC, Mac, Linux), as I was a primary Linux user myself I feel that Linux could use a boost in gaming. It took a very long time to put the pieces together and finally have a good prototype working. A very long time indeed.

Open-Source
My initial goal of learning was a great success. I've learned more in 1 year than I have ever learned before in my life with that timespan. It was taking a toll as well though. Spectral Universe was far from finished, and at the current rate of development, it would never ever see the daylight. I had to the tough decision of cutting down the features of my game. I restricted myself to one weapon type and one enemy, together with a lot of other cool and neat features like for example dynamic terrain. This would mean that in the end, the game would not be worth any other price than to be free. A free game may look cool, but I decided to make it part of my personal portfolio. On top of that, I did not want the game to die merely after release, and thought that any help from outside would be greatly beneficial. Therefore, the only correct decision I could make was to make the entire engine and the game itself open-source. And there we are. The game is far from finished, but it's been almost a year since I've started brainstorming, and decided to release the entirety of the code into the open anyway.

While the release did nothing in terms of code, it was the major mental milestone I needed.

Don't forget to clone your copy from Github.com ;)