I forgot to write a blog post last week, so this blog post is about that week as well.
I threw out the splitscreen and implemented a camera that always has the two players in screen. The only problem right now is that it snaps when one of the players respawn.
I also had to fix controller input again, hopefully for the last time.
This week, I presented the idea of a base for each player. If you put in enough resources, the base charges a laser that destroys the other player’s base, and any planets in it’s path! For now, the planets just disappear without any effects, but I hope we can make it more spectacular in future updates.
How it works now is that both players spawn at their base. They can win the game if they destroy the other player’s base. This can be done by simply shooting at it, quite often. Or placing the factories to gather resources, and using these resources to power the death ray, which destroys the base instantly.
Once this fully works, we plan on expanding the base’s functionality by allowing the player to upgrade their weapons at the base. The base will also require a bit of tweaking and testing to see how much resources it requires, and whether it destroys the other base in one go, or does maybe only half damage.
I had two final deadlines this week so I didn’t do as much as I wanted to, but this week I implemented a buildshader that constructs factories when you build them. While they are being constructed, the player does not receive the production yet. Build time is set on 10 seconds. The buildshader is not implemented in the build yet, because a new build was made with refactored code.
I also fixed the arrow, which now always points towards the other player without doing weird stuff
This week I implemented a resource pickup drop when you kill a pirate or a turret. This pickup randomly adds to one of the three resources.
I also programmed an arrow UI element that Lorenz made, this arrow rotates around each player and points towards the other player. It is currently being affected by gimbal lock so I hope to have that small issue resolved by next week.
Building a ferite factory on the new ferite planet yields more production now and I have also made a UI element that displays each players’ score (based on killcount)
This week I implemented the coding for planet type. When you build a crystal factory on a crystal planet, you produce more then when you would’ve build a crystal factory on a gold planet. This adds an extra layer to deciding what you will build where.
I also added a gradient that displays which planet is captured by which player.