How Often is Too Often?
Much more progress today.
Fixed an issue where the victory text at the end doesn't clear. I also added in pathways where you cannot build. This is to prevent players from walling off their structures entirely, which could leave them in a state with enemy Robos stuck without a path. If nothing destroys those Robos, the round does not end and you must close the application.
Another issue I have noticed is that sometimes multiple waves will spawn consecutively. If this happens, the round does not end because of the way I had it set up. I spawn the Robos at the end of the round, then turn on a variable to tell the game there is a wave active. Every time a Robo spawns, they add one to a counter of how many active Robos there are. When they are destroyed they turn that counter back down by one, and when it returns to 0, the round ends. The problem came in when the function to spawn Robos took a split second too long to actually spawn the Robo, and the script checking to see if all the Robos were dead would trigger before any of them even spawned. So I decided to increase the counter by 1 during the call to spawn them all and then, if there were two or more active, reduce the count by one to compensate for the offset. Should the function to send waves out get called twice (the root of the problem, I believe I have fixed that), each wave would increase the counter for a total of 2, but the compensator would only bring it back down by 1, thus the number of active Robos would not ever return to 0. I have taken a few redundant measures to address that and have not since been able to get the bug to manifest.
Tonight I am getting the software necessary to put this on Android, though I expect that will require some interface tweaks. If I am able to get it to run alright on my own phone, it shall be posted post haste.
I am uploading the latest build with the aforementioned fixes tonight.
Get RDG's BotBattle: The Prototype
Leave a comment
Log in with itch.io to leave a comment.