Easter Week 3
This week I worked on character tweaks and lighting stuff.
Visuals
Last week E-Jay had suggested that the damage sprites of the characters be altered. He suggested that instead of having specific animations for the characters when they take damage that instead, they should simply flash a colour to indicate they’ve taken damage. This was a proposition I had considered before. Currently, the way the damage animations worked, is they would play and effectively overwrite other animations while the gameplay carried on. For example, if the player character took damage and the player was moving at the same time, the damage sprite would override the movement sprite, so it would appear as if the player was sliding across the map. This left us with two possible solutions:
1. The character artist would create a damage sprite for every possible configuration (one for movement, one for while the character is attacking, and in all directions). And the game designers (probably me) would have to write code and work with the Unity animator to make certain that all these animations were functioning properly. This solution would be incredibly long and tedious.
2. Program in a script that simply flashed a colour to indicate damage. This would be far simpler and significantly more efficient.
We naturally picked the latter option. Now, at this point, I had done a lot of work regarding the character implementation so I asked the primary character artist if she would care to undertake this task. I felt that at this point I had done quite a lot outside my role, not that it was too overwhelming, but that I felt that I may have been making work and getting extra credit for something someone else could have done. So I asked the artist if she wanted to do it and unfortunately she had personal issues that dictated that she couldn’t, as such I undertook the task.
I followed a tutorial I found online for this specific task:
This tutorial showed me how to make and use shaders, how to add some extra lighting effects, and how to write code for the specific objective of having a colour flash when a character receives damage. The one issue with this tutorial was that this individual’s character was composed of multiple sprites in child objects, as a result he used an array within the code. This resulted in me just tweaking one line of code to accommodate my character object (as my object had the sprite material as part of it and not as a child object). This solution worked however I felt the code was now unnecessarily complex so I tried to figure out how to shorten and change it and remove the array. Due to my limited knowledge of C# I had a very difficult time reducing the code, thus I beseeched chatGPT to assist me in thinning the code, which it did with minimal issues. Of course it made some mistakes with the names and changed some of my function and variable names for no real reason, but I just ignored that aspect and rewrote the code as normal. By the end I had a functioning script and the characters would all have their sprites flash the colour red when they would take damage.

This tutorial also showed me how to use Post-Processing in Unity to create a bloom effect. This really made the lighting in the game pop. Currently it is in the game and functioning, my group and I may tweak it a bit depending on how we feel it affects the visuals, in my opinion it really advances them a lot and makes them feel much more impactful than before.