Above you can find a link to the repository for my original OpenGL Galaga project, however the code for the PS4 Port of the project is gated
Sony's student NDA, and cannot be viewed.
OpenGL Galaga was a project I started during my fifth semester at school, originally as something fun to do to learn OpenGL more. Over time, it
grew into my final project for the course, and included much more than I ever thought it would when it started (it was originally just Pong, which
you can also find in the repository). In my ninth semester however, I would return to the project to use it as a base for a Porting assignment in
a Console Development course, specifically working with the PS4 architecture. It was a pretty hefty undertaking, and taught me alot about the Porting
process (as well as how much you can improve at coding over the course of two years).
Applying algorithms
The reason I choose to port my OpenGL Galaga project was because I was pretty proud of the algorithm application within the project, and thought alot of
the logic would be pretty easy to port to the PS4 architecture. This was sort of true (more on that later though), and thankfully I remembered the algorithms
I had used to be able to transfer them to the PS4 quite easily, being narrow and broad phase collision detection, as well as binary spatial partioning. This was
to improve the overall efficiency of the game, and to allow me to have a background that emulated the original game (but added my own flair). In the gif above, you
can see what I was able to achieve. I had implemented A* in projects previously, but this was the first time implementing algorithms I learnt on my own accord.
Overall, the project helped me to understand how to take concepts and implement them into my own work.
Porting to PS4
Now into the actual porting part, or rather talk about my overall experience with porting while carefully not talking about specifics. Porting was a far
heftier job than I had originally thought, for a multitude of reasons. First and most obviously, was syntax differences between the OpenGL version of the
project and how the PS4 architecture works. In loose terms, there was a good amount to change outside of the direct game logic. Secondly, was the fact of
my work not being as scalable as I would have liked. Since it wasn't intended for the purpose of being ported to another API, alot of it was specific to OpenGL,
and some of the tricks I had learned to make OpenGL bend to my will. The tricks I once had found useful, were now biting me in the bum, and had to be reinterpretated
to be able to work on the PS4. There was also researching many of the different techniques I needed to be able to port all the aspects of the game over, such as the
background, but the nice part of researching in documentation is once you find something, you don't usually forget where it is. So once I got over the first couple
hurdles of getting started, alot of the project started to be ported VERY quickly.
Refactoring older work
So I'd say my biggest issue with porting the project was the fact that a lot of my implementations were... Not great. Having come quite far in my coding ability
in the last few years, I've been able to learn a lot of new tricks and developed better coding habits. This led me to absolutely DESPISING my old code, and
needing to change a lot of it to be more workable. It was pretty enjoyable to be able to update it all, and taught me alot about what techniques I used to
think were efficient, and why they were NOT. I got pretty good at being able to tell when entire portions of code needed to be refactored, or when only a few lines
had to. For instance, when working on the background, a lot of the logic just had to be adapted for a larger window, and upping the amount of stars scrolling down the
screen. However, some other aspects of the stars had to be entirely refactored, due to the change in architecture.