The Next Steps

Jared Amlin
2 min readNov 21, 2020

Today was a little bit of a slowdown, but I think that is expected now that the training wheels are off. I am tasked with implementing a thruster system, which I got mostly working yesterday after some advice from my team lead. I am using an if statement to grab my shift key and give the ship a nice sliding scale speed increase as the shift button is held down, using _speed = _speed + 0.5f; and that worked great. There was an exception, being that I would quickly ascend to warp speed, because no one put a limiter on that engine! Once I was going too fast, the player came to a standstill. Infinity speed needs a cap. I implemented an else if statement saying that if speed is greater than 14, speed equals 14. It almost worked. I could still ascend to light speed if shift was held long enough, but upon release, I slowed to 14. Ok that was something. My lead suggested that I look at the order in which events are happening. She reminded me that my speed cap, doesn’t kick in until after the shift is release. Order of operations. I switched the order of the statements and just like that, I have a working turbo boost with a max speed. I just had to add another else if statement at the end to return speed to default after shift is released.

On to the Camera Shake when player takes damage function. This is still my current wall. I have a good code on the camera for shaking, and I know it’s connecting with my player script, but I am still missing something. I get an error for “NullReferenceException: Object reference not set to an instance of an object”. I have already began the research process to find a fix, but at least I can enter variables with my tool tip when I try to use my cameraShake. Just one missing piece, so hopefully I can get that figured out here soon.

I was encouraged to continue with the C# course material, as the knowledge in those tutorials could me the missing key to my current problem. Putting some of those pieces together will help me push forward. I do have some other elements to get started on if I can’t sort out the camera immediately.

We had a very inspiring all hands meeting today where out main Captain bestowed his Unity knowledge upon us. There was one thing that really stood out in my mind from that meeting today. When using GetComponent to find different well, components in Unity, we got an amazing visual reference of what the code is directing you to, visually on the Unity UI. I am definitely a visual learner, so that was a huge light bulb on moment for me. The Friday sessions so far have all been so very informative and creative, and I am so happy to get to be a part of it all.

--

--

Jared Amlin

I am an artist and musician, that is currently diving headfirst into game development with C# and Unity3D.