The tenth game development post, can you believe it? Two months shy of a full year. It's been a crazy time for me this year, especially so these past few months. Recently, a house move took most of my time away from doing anything outside of work. But luckily I was able to fit in some time. Didn't finish this part of the course, but I definitely will now that things are less hectic.
Last time, I had said that I created and updated two levels for this rocket project. If you died on the second level, the game would automatically take you to the first level. Most of the progress was made with the scripts and less so with the game interface and design. This time the back-end and UI were enhanced to make the game a little bit better. Let's break it down.
The game was made a bit unique (and less glaring) by lowering the lighting. This gives it more of that 'cave' aesthetic that I was going for with my level using basic shapes. But this made the rocket a bit hard to see. So lights were added to the outside of the ship to have it stand out. I also added a headlight to the front of the ship to light the obstacles. A light was also added to the green landing pad to signify that this is the goal.
The ship also has particle FX for added flair and to tell you when the ship is thrusting forward. In the UI Editor on the right, you can see there's a Rocket script interface. "Main particles" is the animation for the thrust. But you can also see two others: "Next Particles" is the celebration effect that plays when you reach the landing pad to start the next level; and "Death Particles" is self-explanatory. Because these options are seen by the UI Unity editor, I can easily swap different animations without changing the code.
The other neat thing I did was to add movement to a couple of obstacles, as shown by the red arrow. The script to do this involved is a bit over my head. I understand what's going on, but the concepts involved goes much deeper than what was explained. The actual math isn't hard. It's more so I'm the jerk who always needs to know how and why something works. I legitimately want to know the deeper concept - like what the funtion Mathf.Sin is about or sine waves . It's like going into the Wiki rabbit hole - you want to know about one thing, but wind up clicking link after link in every article an explanation. In the end I know I won't need to know everything - if I end up taking a detour on every little new concept being introduced, it'll be years before I make a game. Nope, I just need to know that: the math works with my game, and the overall gist of it.
Also, did you know the word tau is the double brother of pi?
The script above allows my objects to move back and forth. The variables at the top - movementVector and period - are labelled [SerializeField] so the Unity editor can "see" it and make it available to me. When I change the values from the Unity editor, the speed and the size of the area the objects cover will change too. Anytime I want to have obstacles, I can add this script to the object and simply set the values from the editor. But it's not just for obstacles, I also added this to the landing pad to make the finish a bit more challenging. I can see myself using this script later on in other games outside this. The hard work comes first, but you set yourself up for easier work later on.
That's it! I really wanted to have my course project finished by the time this update post went up, but we all know life finds a way to make life suck even more. But hopefully, hopefully (you hear me, Life?), I will have the rest of this project done and will be on my way making a game on my own. Things seem to be looking up for now both with work and my personal life. But now if you'll excuse me, I have a backlog to get to. Laters!