I began the day intent on correcting yesterday’s code in which I had gotten my enemy waves working, but the spawn enemy script could only call one enemy type prefab.

I had inadvertently caused myself some confusion on the spawn manager script because I was hesitant to strip/rewrite large blocks of the existing code. Instead, I had commented out many of the working lines and replaced them with new variable names, methods, etc. In doing so, I had created quite a bit of a messy network of names, and this was preventing my script from working completely.

Today I was…

Very interesting day on the Core Programming front today… Ultimately, I was able to implement the enemy spawn wave feature, as required toward course completion. Here’s a brief rundown of how I did it:

  • Move enemy spawning behavior into a coroutine
  • Introduce a wave number variable, to be incremented each time a wave is finished
  • Implement a SpawnState variable, which can be set to COUNTING, WAITING, or SPAWNING
  • Utilize the existing method for spawning, and call it during SPAWNING state
  • Add a boolean check to see if all of the spawned enemies have been destroyed
  • Implement an IEnumerator to increment…

From a space shooter project standpoint, today I accomplished another checklist item towards completing the Core Programming section.

I implemented a “collect” feature for the player that pulls any powerups on screen to the player’s location at an increased rate. Although this took me a few tries, the solution I came up with is relatively straightforward and simple.

I established a Vector3 called _target and a variable for the player’s position called _position. In Update(), _target is updated as _position.x, _position.y, _position.z. Since this is on the powerup script, this keeps the powerup clones “looking” at the player’s position.


Well, what a morning! On a whim, I wanted to change the appearance of my laser/ammo refill powerup, so I used GIMP to fabricate something I liked. GIMP — another software with seemingly endless possibilities! Glad to have spent some time getting used to it’s layout and features.

After the prefab and animation, I then set out to implement a behavior in which the player would “pull” powerups toward itself when the user presses the “C” key.

Seeming straightforward enough, I introduced some code to my powerup script. While — no pun intended — checking for the target’s position, I…

In game development, as in life, we often overly complicate our problems. In a game development sense, I especially did this today. Welcome back a particularly successful mantra: Keep It Simple “Silly”

I’ve been developing various enemy types to be spawned during game play, and these differing types will have different movements, weapons, behaviors, and appearances. One in particular — the shielded enemy — was proving to be a sticking point for me.

I was confident that I had arranged everything properly: the visuals, the boolean operators to turn the shield on and off, the game object variable to store…

I’ve determined that my next several objectives will be contingent upon creating new enemy types (for differing enemy behaviors) and solidifying my knowledge and use of Raycasting. At a minimum, I will be creating three new enemy types:

  • Aggressive — moving rapidly toward the player when within a threshold distance in space
  • Smart — firing a weapon or laser toward the player when the player is behind the enemy
  • Shielded — able to absorb at least one hit before being destroyed

I feel comfortable fabricating the enemy types and altering their appearances if desired, so first I’ll focus on the…

I decided that my primary objective today would be to create a new enemy movement. My intention was to have the enemy seek the player when the two were within a certain distance of one another.

First, I declared a public transform called “target” on the enemy script as well as a float value for the “focus distance” between the enemy’s transform and that of the target. In the Start() method of the enemy’s script, the target is defined as the player’s transform.

Within the enemy’s CalculateMovement() method, which is updated every frame, I added code that says (in pseudo)…

Today I began digging in to phase two of the completion of my 2D space shooter game. This Core Programming section is comprised of various challenges, each valued at two points for completion, with a certification score requirement of minimum twenty of twenty-eight points. I was able to take a step back today and truly appreciate the scope and progression of my learning in just over three working weeks. It’s a testament to the design of the GameDevHQ program, the teamwork and camaraderie; I’m proud to be an intern.

Okay, that said, on to phase two. To this point, all…

Tomorrow, I’ll actually move on to the core programming section. Because this morning, I noticed that I had to implement one more feature to complete the framework matrix with enough points. So I dove into implementing a secondary fire powerup. It needed to replace standard fire for five seconds and spawn its powerup rarely.

I decided on a “clearing” horizontal laser powerup. When the player collects the powerup, it gets a single shot (on the next fire) of the special variety. The clearing laser spans the width of the game screen, and traverses vertically, eliminating all enemies in its path…

Today was a very productive and satisfying day working on my game. I edited several sections of my script to more directly apply the parameters of the speed boost functionality. I achieved the desired effect by revising the calculate movement method of the player script, in that when the user presses the desired key (left shift, in this case), the bool for speed boost is turned to true.

I combined this if statement with a parameter that a variable called thrust be greater than zero; if so, the player gets the speed boost via a new method. In that new…

Benjamin Lihn

Coding my future as a software developer; // if (attitude > 0) {progress ++;}

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store