SCHMUP - VOID SEA

I don't have alot of code for the previous games i've made, this one included. But the reason i showcase this game is because it's one of those games where i can point at something on almost any gif, or a screenshot and say "i made that".

Out of all the game's i've showcased on my portfolio, this is the game i made the earliest.

If you've seen my other code snippets from the other pages, you probably recognize Lerps::

In this project, i wanted to make a particle system, where the particles would lerp from their start size, to 0. I didint know where to put the lerp, so i made i lerp class. At the time, the lerp class only had 2 lerps.

Lerp with vector2 and lerp with float.

Every project after this one, i've taken the lerp class with me, and added more and more utility methods. It's not a lerp class anymore, it's more of a nice decorator class you can use for all sorts of things.

We can begin with the menu

when you hover over a button, it lerps to a larger size, and the color lerps to red. On the level select, the alpha channel lerps to be less transparent when you have a level selected.

This required me to add a vector4 lerp for the color.

There is quite a bit going on in this gif. The particles coming out of the player is from my particle system for this project.

For that particle system i pretty much looked at unitys particle system variables, and tried to copy as many as i could. for example

  • size over lifetime

  • color over lifetime

  • lifetime

  • speed

  • spread

  • emission over time

Every time an enemy is hit, their color goes to red, then lerps back to their original color.

When the player picks up an upgrade from the submarine, his sprite goes to blue, then lerps back to it's original color.

All of the collisions in this game are circle collisions, with one exception. To make the circle collision, i made a distance check in the lerp class. You use the distance to check the distance between for example the player and a bullet, and if it's below a certain radius, a collision happenes.

The only thing that doesnt use circle collision is the laser on the first and last boss. It uses OBB collision


When we were doing the boss, we wanted the laser to look at the player, but slowly. So i made an AngleLerp.

This lerp makes sure that the returned value interpolates correctly to wrap around 2 radians. Otherwise, it can rotate towards the opposite way that it is expected to go.