In Depth Blog Post 3

What went well during mentoring sessions?

Our sessions are very centered around me, and what I would like for my project. My mentor does not try to impose a rigid set of rules for what I do and is not picky with the ways I do them. While he is very open-minded, he also uses his experience to ensure that my goals are realistic and achievable in the time frame provided. He also warned me of the dangers of perfectionism: there is a certain point where good enough has to be good enough, or else you will spend all your time on a single aspect, leaving everything else unfinished. It is better to have an imperfect whole product than to have a singular aspect of a game, regardless of that aspects quality.

He is usually patient with me when I need help with scripting (coding), and thoroughly explains WHY the code works, and all of the terminology necessary, as well as the code in question. As of yet, there hasn’t been a Unity function that I could not grasp. Thus, scripting is the only thing I’ve needed help with, which my mentor has given me ample help with.

What learning challenges emerged?

I have trouble asking for help. I have an obstinate tendency to try to figure it all out by myself, which has led me to my first time-sink: the melee attack. I spent an exorbitant amount of time trying to implement mouse position directional attack, rather than a movement-directional attack, and as of this blog post, I still have not figured it out. What is even more frustrating in retrospect is that I could have simply asked my mentor for help. He made it clear that he will try his best to answer my questions and help me with any challenges I had, but my pride prevented me from asking. With the project deadline steadily approaching, I will have to take great care to avoid any potential time-sinks and to utilize the full help of my mentor. As this pesky game mechanic has proven to me, while Unity is relatively beginner friendly, it is still quite difficult for a total beginner to learn all on his own.

As of yet, I have not taken accountability for this issue because the time to do so has run out, but in our next meeting and weeks prior, I surely will. I will ask him how to script the various components of the melee attack, and any other tips I need.

What logical challenges affected your communication?

Unfortunately, my mentor (my dad) is taking medications that can cause him to be irritable and impatient. In the last mentorship session, he got a little bit frustrated with me because I did not understand, as a result of the medication. With the vast gap in knowledge and experience between us, it may be a little frustrating to have to explain every little detail to someone else. Still, I learned everything that I asked, and it was still a productive session. When he is off the medications, the mentorship should greatly increase in effectiveness. In addition, I could also prepare questions and write down any questions I have while working so I don’t forget.

Progress Report:

In the past week, I have started the very first fragments of my own game.

It doesn’t look very good yet, as I only made a few placeholder sprites and tiles to help me visualize certain game mechanics.

So far, I have added collisions and player inputs to my game, including one that registers every time a player clicks a mouse. This will help me create combat that is not reliant on player directional movement, allowing for a faster-paced combat system.

I also added a few free sprites into my game, with the vending machine acting like a destructible crate, that will drop collectibles for the player to replenish their supplies with. The bottle is the collectible that replenishes the player’s health. As you can see here, I created multiple walls to demonstrate the collisions. The player will not be able to walk through the walls, and should not jitter or shake. The jittering would have been caused by the player sprite being constantly being teleported in tiny increments, giving the impression that it is moving, then hitting a wall, and being teleported back to compensate. While it does stop, it detracts from the player’s sense of immersion, as the jittering can be quite distracting. The fix to this bug is actually quite simple: in order to add the physics system necessary for collisions, you must add the rigidbody2D component to the moving sprite. This allows you to use the rigidbody component’s position instead of the regular game’s position. By using the rigidbody position to move the sprite, it slides the sprite along instead of teleporting it, and can instantly recognize that the sprite is being moved into a wall, therefore stopping it from moving entirely.

In this block of code, it would be like this:

Unfortunately, in the past two weeks, I experience my first time-sink. I spent over half a week trying to figure out how to add a melee attack using a variety of tutorials, and unfortunately, I couldn’t even figure it out by the end of the week. In retrospect, this was a question I should have raised to my mentor, but my obstinate resolve to do it myself stopped me from doing so.

To code the melee attack, I need to get the position of the mouse to detect where the player is aiming. Unfortunately, something has gone wrong in the scripting, and the debug log doesn’t give me enough information to identify the problem. With my limited experience, it looks as if nothing is wrong. I have tried several tutorials, all of which require custom installments and assets from other tutorials they made, rendering them completely useless. Other tutorials give me a block of code with no explanation, and which don’t work in my context.

In the next two weeks, I plan to add my first weapon into the game, as well as add those pesky melee attacks. The first weapon will shoot singular, hitscanning projectiles, and the melee attack will hit things only in a certain direction and deal knockback. I also plan to add a new resource for the player to manage, which will be ammunition. If I have enough time, I will try to add my first enemy, which will pathfind towards the player and deal damage to them.

Here is the link to the game, so you can experience the progress yourself:

InDepthGame

This concludes the 3rd blogpost.