UPDATE in our Game Systems and Bugs


So, in the begging of our project, we were making the game has we could. Seeing Unity tutorials on YouTube, resolving some bugs with help of some programmers in our school. And in some part of the development we find this concept of Managers, scripts that make the job of communicate with other scripts, recompiled information this sent, and manage all that to create events or some other things. And we fall in love some much with this idea that with ended up with 14 managers! Yikes… something a little bit contradictory for the concept of a manager. And like 35 scripts, but let’s talk about that later!

So, we have many managers for many things that were in actuality the same, and some other scripts that we can remember why there are and if there are in use. So, we dedicate a week in trying to unite some of the managers and other codes, resulting in resolving in a more simple way some of the bugs that we resolved in the last months

Eliminating "not in use" scripts.

The first step was to check, script for script, what each of them was doing, if they were important for other scripts, and if they were in use in the actual version of the game prototype. We ended up eliminating three codes in no use, the rest of them were divided in folders depending on the use.

United some of the scripts (reducing the amount of managers). 

The next thing I do was trying to incorporate the smaller scripts to other larger scripts, like the managers. Some problem I notice during a small test I do, was that if by mistake you press I'm the exact same place that the "OK" bottom was going to be when you complete the microgames, this interface didn't appear, this because the "OK" bottom was always there.


So, the thing here was that the panel always was active. Like was discussed in another devlog, the way we resolve this was making that level of the alpha was always in 0, and then at the end of the minigames sequence, this alpha went from 0 to 1. But this make that the panel was always active, and make the possibility of that this error can occur. So, I decide to pass the code from his original script in the MinigameConfirmImage, to the MicroGameManager, change the logic from being always existence but with a different level of alpha, to make the panel a prefab and instance this in the canvas of the scene, looking for the bottom "OK", and assign the function inside the same manager.


Since I was alredy working in the MicroGameManager script, I re-write some of the code, making three list of games, two full of the scenes corresponding to the places the player go (Clinic and Civil Registry), and one empty. This last one is fulled when the player enters to the clinic or the scenes of Clinic and Civil Registry with the corresponded list, the rest of the logic stay the same: the system takes one number for the list, load the scene with that corresponded number in the scene Index, and removed from the list. 

In this way, we only need to have one type of Micro Game Manager, and not two, with resolve some problems we have in the past about the incompatibility of having two objects with the same singleton.


Some bugs we still have.

Event if this new system makes more easy working with the Micro Game Manager in the future, we present the problem that, if the game was not initiating in the scenes of Clinic or Civil Registry, the list didn't fill. So, we need to find a way to make the Manager know in which scene they are, and actualize the list depending on this information.

We're going to still working from to make a more efficient game system. See you soon in another!

Leave a comment

Log in with itch.io to leave a comment.