Wave Announcement (Coding) – Week 4

This week, i am going to write about one of the latest additions to our game Selfish, which is the wave announcement.

One of the things written in our feedback, was that the enemy waves were spawning quite fast and without warning. With that in mind, we decided to make a wave announcement UI, that would pop into the screen right before the enemy wave appeared. While that was seemingfully simple, it turned out to become quite a headache. One of the things that would provide that aformentioned headache, was that i personally had not used a repeating function before. It took a while to actually understand how it works, but it was really going to be needed (now for this specific task and even more for any future tasks), since it needs to be working on repeat as well as have a certain delay on it. After consulting my teamates for the correct use of the previously mentioned function i was able to have some results. While that meant that progress was made, the results were not satisfactory, since the Announcement would linger on the first enemy wave, until you cleared it and the second wave would work normally, while the next ones would not. Apparently, part of the code written by me, would not work in the IEnumerator (which is the aformentioned repeating function).

After spending a bit too much time on it that week, i decided to drop the task as it was, just to be able to pull through with the rest of the tasks given to me. Result of that, was that i had to retake this task for the next week.

Luckily, this week we had our code reviewing with our teacher and i decided it would be a good chance to get another set of eyes on the code. Turns out, that all that needed to be changed for the announcement, was to send it to a gameObject. Basically, after adding one line of code to what had already been written, made it work properly. The only thing that was not resolved, was that on the first wave, the announcement would not go away after a the set time we had. It felt pretty silly to be told to add the function doing that to the starting function of the script, because the solution on that at least was pretty simple.

Well i did learn that i should probably get a fresh set of eyes, because a programmers worst enemy appears to be frustration.

eJwFwdENhCAMANBdGIDaEhBd5sIhQRK0hPa-zO3ue4_5zW52c6oO2QGOJpnnYUV5plpsZa69pNHEZr4gqaZ8XuVWAfKLWzCEGNCTj0gOKIbNb7Si8w6JIgb4dq6f0bIddzX_FycBIwM.png

2 thoughts on “Wave Announcement (Coding) – Week 4”

  1. Hello! Nice to read your blog. Me as a coder would like to know a little bit more about what you using. I think you falling between trying to make it simple so everyone understands and but also make the code readers to help.
    For next time maybe think about who is going to read you blogpost and adapt the post accordingly. I also would like to see what you mean with announcement Because right now I don´t know what you mean and why you need to use a IEnumurator.

    That said I think it´s well structure and you really follow the red line through the post. I will also make a note that I writing this post a little bit too late and it was easier to comment on the negatives. I think it´s really good that you implementing the announcement to the game. To clearly communicate what the games rules are is very important ❤

    Like

  2. Hello. Quite an interesting blog post.
    While I do get the “why, what, how” I do feel like you could elaborate a bit more in your explanations. Your explanations are a bit too generalized in their wording. For instance, even as a programmer, some people might not exactly know what an IEnummerator is or what it does.

    It would also be nice to maybe have a bit more context on how your code was structured or what the plan for it was. For instance, maybe you could add some sort of pseudo code explanation where you go through a quick step-by-step explanation on how you planned for your code to execute. It would really help the reader get a bit more of an understanding on how your thought process went in making the code. As well as get a mental image on how this code could look.

    I’m not saying that you should post the code in its entirety, but just short explanations on how a thing would work.
    For example, you end with the solution being that you just needed to send it to a gameObject… but which gameObject? Was it a completely new gameObject? Was it an already existing gameObject?
    This, again goes back to the text being just a bit to generalized.

    In short, your blog post does fill the criteria of “why, how, what” but it feels like it (at least in this particular post) just skims the surface.

    Like

Leave a comment