These past few days, I’ve been focusing mainly on fixing visual bugs to prepare the game for the public. Until now, much of the base function worked but fine tuning things seems to be taking much longer than I expected. The PDA kept flickering and I couldn’t find why for about 20 minutes. Searched online everywhere and finally found something that made a little sense: floating point precision can cause flickering. So I looked at my PDA object to see if any values were changing, but nothing. It was not moving at all. Until I looked at the hierarchy. Since the PDA is a child object of Amanda, whose head and abdomen sometimes move a little to simulate reality and not have a static person standing there, the PDA was also moving a little bit. All it took was to stop Amanda from moving while she’s accessing the PDA. It’s not like the player can see her anyway when the menu is opened.
Then there were some more game play bugs I tackled. Deer are supposed to run away from the player when they sense him approach, but my deer actually went in the direction of the player, then backwards, then again towards the player… And so on. This behavior was a bit of a bad code on my part. Turns out that coding intelligent AI is in no way an easy task. There are so many use cases and trying to predict all of them is just impossible. That is why I expect to be improving the AI pretty much throughout the development phase until I’m satisfied with its behavior.
In other news, some balancing was done today: Amanda no longer runs twice as fast as any other agent in the game. Her bullets also deal a lot more damage so you don’t have to shoot 50 bullets into one chicken to kill it. It takes about 10 now… So I’m still thinking about a way to balance it.
Hmm I’m having strong thoughts about machine learning. I wonder if it’s possible to do it with Unity and how hard it could actually be.