Phase II

Kristin
2 min readDec 15, 2020

It feels like it’s Finals Week at GameDevHQ, otherwise known as Phase II: Core Programming. I lucked out and got a “freebie” on the Phase II Ammo Count requirement, since that happened to be the Phase I UI visual component that I chose to do for the ammo limit requirement- it’s already coded and functional. Once I complete the other 13 requirements, my Space Shooter 2D game will be complete :-) Woohoo! My first game completed game as a Unity Developer- so cool :-D

When I looked at strategies to code Boss AI over the weekend, I ended up decided to work up to that and start smaller for now. To start off with, I worked on the requirement New Enemy. First off, for the unique movement, I decided to make the new enemy zigzag. This is achieved through using Mathf.pingpong for the x position and using the same motion for the y position, so that the x-pingpong travels while y’s position moves up (if the y was constant, the x-pingpong motion would just go back and forth. Second, the unique projectile will be “heat seeking.” The logic I’m using is that it will give the illusion of heat seeking behavior by only being activated to shoot lazers when the player has “heat” on it, when it is damaged by having a thruster on fire, not including the bottom thruster. The condition for the new enemy being able to shoot a project will occur whenever the player’s lives are less than 2- using an if statement. Third, since the enemy must damage the player, i’ll just use a standard laser prefab and take advantage of the fact that lasers are designed to minus one player life for damage.

I also decided for New Enemy Movement Requirement, to make the regular enemies come into the field at an angle. To do this, I just adjusted the transform.position to instead of down, which is a short hand for Vector3 0, -1, 0 (increasing the y position without the x component), to be instead Vector3 1, -1, 0. This addresses the x component in addition to the y giving it a slope.

Positive Affirmation: Coding C# and Unity come easily and effortlessly to me, that I can understand it quickly, teach it to anyone and create anything I want. I think of new, fun, creative, expressive, unique ideas easily and am inspired by the universe. Coding is fun, relaxing and extremely enjoyable for me.

Stay well friends,

Kristin

--

--

Kristin

Astrologer turned Software Developer who is aiming for the stars to land on the moon. Kristin the Developer is the Celestial Sleuth.