Game Dev in Progress… Day 11

Cristian Aspacio
3 min readNov 5, 2020

--

Photo by Jake Hills on Unsplash

Hello and happy Wednesday to you!!! Hopefully the election day hasn’t stressed you out as much as me, don’t worry we’ll get through it! Anyway I have made some progress today going through Phase II: Core Programming and got at least 25% of it done (yay!!!) There were some challenges that I came across and some things that I learned from them. I’ll go through what I did today as a general overview of the things I learned.

The first challenge was to implement a new enemy movement routine. My implementation had them go from side to side while also moving downwards to create a sort of zig-zag pattern. My code wasn’t very complicated at all and borrow most of it online. Essentially what I did for this is that I created an if statement that if true would move the enemy ship right. Then I had an else statement that did the opposite. Afterwards, I would have another if statement that checked if the enemy reached the right border or left border and changed the boolean variable that I was using for the code above. This way the enemy will keep moving the direction I wanted it too before switching when it reaches the left or right border.

The second challenge was pretty easy because I already had a sort of implementation set up on the previous phase. So I just tweaked that a bit in order to show the max ammo count.

The wave system which was a my third challenge, was a bit harder to implement then the other two. The challenge required me to create a wave sequence in which the enemies would spawn in waves and as the game progresses, the waves get bigger. The way I solved this challenge was to create a Coroutine that increased the amount of enemies to spawn every 20 seconds. This Coroutine would change a variable that determined the amount of enemies to spawn. This was an easy implementation but was hard to get to because I was overcomplicating it a bit. Also a lot of the implementations that I found online were complicated and were meant for bigger projects compared to what I had.

The last challenge was the same as my second in difficulty. I had to implement a negative powerup pickup that would have a negative effect on the player. I did pretty simple one where if picked up, reduces the player’s speed. For the code, I just reused the old powerup code and created a new Sprite for the pickup. The only problem that I ran into was that I had to switch around one of my powerups because of how I handled rarity spawns.

Anyways that’s all the things I did today and hopefully I’ll have more tomorrow as well. Again, thank you for reading and have a nice day.

_

Cristian Aspacio

--

--

No responses yet