Day 12– Phase 2 Halfway there!
Today was very productive. I was able to complete a new Elite Enemy that spawns on certain waves. It has 5 hit points and moves side to side while shooting down a long beam over and over again. When the unit goes to 4/5 hit points he will start flashing red until he dies
In addition to that I added a random small asteroid spawn that shoots down the screen periodically. It rotates while moving diagonally. I just added the asteroid for ambiance. The tricky part for the asteroid was that when I tried to rotate it while moving the front of the unit would move with the rotation so it would start doing circles instead of moving down and rotating. I came up with two solutions: either animate the rotation or create a child object inside the parent asteroid and put the sprite on the child and have it rotate while scripting the parent to just move in the direction I wanted which in this case was a random diagonal direction. I chose this latter solution and it worked out well.
I also enabled shields on some enemies. Over the weekend I spent some time doing a visual overhaul of my game. finding animations, lasers, ships, etc. I went for green theme on the player and warmer colors on the enemies. I picked out the BOSS Mothership which I will showcase later this week once it is fully programmed. I changed my UI colors to match my theme. I also redesigned the player ship to make it look more badass. See below for a quick visual. I used paint and Gimp to add engines/canons on the side and change the ship colors.
I also completed the Balanced Spawning for Powerups. I basically approached it in 2 stages. The first stage was to use a switch statement tied to the Enemy Wave number to determine how quickly the powerups would spawn. the next stage was to assign a percentage chance with if statements to determine what pickup you would get and randomize the numbers. I actually ended up with 0–130 but it doesn’t matter as we can just add to the random range we add more powerups.
Overall I got a lot done and have 14 out the 20 points done for Phase 2. I will probably go for all 28 points, although I might skip the backward laser as I have so much going in the screen right now its getting hard to kill my creations. That being said I did move the Main camera back to 12 instead of the 10 we started with, this gave more room to maneuver and accommodate more baddies. I also freed up the player movement to go all the way to the top so there is more maneuverability.
Overall I am very happy with the visuals and how the game plays…..its hard….lol! Next step is to learn Ray Casting. I read Dan’s medium article about it and watched a Youtube video from Jonathan talking about it for 3D and I want to experiment with it tomorrow.