Dev Diary 33: Demotivation
Currently, the state of Lab 77 is as follows:
179 of 183 bugs have been squashed. Of the remaining four bugs, two require further testing and two require more work.
Artwork, music and sound design are being worked on.
There is nothing that demotivates me more as a game dev than working with Unity. I can not believe how painfully frustrating this piece of software is.
To explain further, in the last two weeks I have attempted to add a fade effect to the game when the player respawns. I decided to do this first and foremost by adding a UI panel that I'd fade from opaque to transparent. Now, I know this is not the most ideal way of doing this, but I intended this initial implementation as a test of the effect. Attempting to implement this has been one of the most frustrating experiences in my personal recent memory.
I decided to implement this through using my pre-existing in game UI prefab. My reasoning for this was that I didn't want to make an extra prefab if it wasn't needed, and as it was just one panel that I wanted to implement so the addition to the prefab should not have been a massive change. This is where my problems began. When I added the panel to the prefab I set the colour of the panel to be black, and the alpha to be transparent. I then wrote a quick piece of code that would make it fade out, and I set this to be called when the player reset from a death. Then I clicked play in the editor, and was immediately greeted by a black screen. And I was quite confused.
My confusion stemmed from the fact that I knew I had set the properties to be transparent. Or at least, I thought I knew. "Well, no bother. I'll just check and make sure my code is not reversed of what I thought or see if there is anything I forgot to do" I thought to myself, and off I went to check. As I checked I found that I had indeed set the transparency correctly in the prefab and as I checked my code I found that it was not reversed. I found this odd, but I thought I could just set the transparency in the Start() function and then test my implementation, and so I did. And then I clicked play in the editor again.
Having made my way through my in-game menus I was once again greeted by a blacked out screen. And I was perplexed. Now, to avoid rehashing the entire story I ended work on it that day with my implementation not working and me being annoyed and perplexed by this behaviour. I didn't necessarily think this was an issue with Unity yet, but I was very confused as to why my implementation had failed. Also, I should mention that there were times where it seemed to work in my testing, but it was not consistent and I was not able to determine what caused this change in behaviour. After this I let it rest for a day or two before gathering the energy to have another go at it.
When I loaded up the editor some days later I went right to testing and found the problem was still there. I know this may seem a bit sill to do, but Unity sometimes fixes itself after being closed and opened again. Anyways, I digress. I spent this day trying several things I thought would fix it, and talking to several people who all suggested various things that didn't end up working. I eventually realised that the state of the prefab was not the same in the hierarchy in the level scenes as in the prefab preview, so I opened the preview and moved some things around and that seemed to fix the issue. This allowed me to do some more testing, during which I found that my implemented fade effect was quite annoying to me. I also used this chance to test on a level that I knew would provide the worst edge-case scenario which informed my decision not to implement the fade. But, I had not quite made the decision as I did want to try a snappier, but harsher effect and maybe some other ones that could sway my opinion. So I closed down the editor for the day and decided to come back to it a few days later.
As I opened the editor again, I thought I had resolved the previous issues and that I would be able to test some different fades. I was wrong. When I tried to implement a snappier fade, I found that the effect was not happening at all. This was odd, and after several attempted changes and a long conversation with someone who has much more game dev experience than me I was still not able to resolve the issue. Though I was able to discern a few things about Unity and this prefab. Mainly, I believe that there is something quite broken in this system. It is quite possible that this is something I have caused, but I do doubt it as I didn't attempt anything completely new or very unusual. I am more inclined to say the issue lies somewhere in the communication between scripts and prefabs in Unity, or with prefabs in general. What I can say for certain is that this has really, really annoyed me. No, it has angered me.
Now, I already have plenty bad experiences with the Unity Game Engine but this one feels particularly bad. I think the main reason for this is how it seems there is no way of resolving this, and nothing I have done seems to have made any improvements. Even if I were to completely erase the prefab and re-make it I have no confidence that this issue would not re-emerge, and re-making the prefab is not really a task I want to undertake as it is a rather convoluted one. Working with this engine just feels hopeless, and this being yet another issue in an ever growing list of issues does not help.
I can say with certainty that I will never use Unity again after Lab 77. Never. It really feels as if 90% of the engine is 50% implemented at best, and if you dig even a bit under the surface you realise there are so many systems you have to make yourself because the ones in the engine don't work. I find it really difficult to understand how anyone who works on the engine can be happy with the result, and that's not even counting the terrible business practices that go on there.
In short, this means that I will be switching completely to Godot for all future projects. This is not to say Godot is a perfect engine, as I find the workflow unintuitive and I don't yet love the way signals work but it is leagues better than Unity currently is. At least the features that are in Godot work. If I wanted to have to re-do as much of the engine as I fear I would if I kept going with Unity, I would make my own engine, and I don't want to do that either.
All in all, I think I have decided not to implement the fade. I know and understand that the snapping of the camera may be jarring to some players, but given the edge cases and my intention to maintain uniformity across all teleportations, respawns or placements I don't believe the fade effect would work. Additionally, I do not wish to interrupt the flow of the game which means that I didn't want to stop the player moving during the fade. I also found the fading annoying as a player, which also informed my decision.
That is all for this extra large Dev Diary, well rant. Anyways, more to come in two weeks.
-Olav
P.S. Just came back to read this and for one thing I'm still angry and for the other I have kind of enjoyed writing this one as a bit more of a story. Though I can't say that'll be the case for all upcoming ones.