To start this week off, our presentation went better than last week and we had very good progress compared to the previous weeks & got a green.
During our learning class we went over fuzzy logic and various other game AI wherein we reviewed games that use it tend to be more realistic in terms of how it may look as it relies more on a percentage for events to happen rather than a definite yes /no and in doing so creates a more realistic looking AI to understand this further I have looked it up online and found a very helpful explanation of fuzzy logic wherein the author used the light/dark side scale from the Knights of the old republic game to demonstrate how fuzzy logic would work, although it is not a AI related answer it does help one understand a fuzzy logic a bit better. I have also referenced it below. (Quora, 2016)
We also worked on fine-tuning the game controls wherein we will not have the mouse rotating the cube and the weapon can fire in a 40-degree area of the mouse as seen in the video below. There were many changes needed in the movement code in order to clamp the position of the barrel.
Another thing I worked on was smooth rotations using a co-routine which seems to not be the right approach after playtesting the game mechanics, I will probably need to work on the rotations more. Right now the rotation can stop mid-way if it is not completed which is not how the mechanic is supposed to work. To fix the smooth rotation I am going to implement animation for the movement or do it manually via code.
While testing out the controls we found out that the 40-degree clamp started jittering the mouse control which can be seen in the video below. I will be attempting to fix this using math to offset the local rotation of the gun barrel & hopefully be done before week 3 has ended.
https://www.youtube.com/watch?v=vwhpyGMe_aw
Working on the shooting mechanic I have made sure that there aren’t multiple projectiles shooting in the scene by implementing a timer between each shot to limit how often the projectile is fired. An optimization made to the mechanic was destroying the bullet after n amount of time to make sure there aren’t too many objects on the scene.
For the rest of the week, I will be focusing on finishing the smooth rotation and fixing the jitterbug after which I will be focusing on the other mechanics of the game such as destructible obstacles and possibly an AI if I have enough time left for the week.
References
Quora. (2016, November 5). 4 answers: How is Fuzzy Logic used in game development? - Quora. Retrieved from https://www.quora.com/How-is-Fuzzy-Logic-used-in-game-development
Comments
Post a Comment