Skip to main content

Week 3

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

Popular posts from this blog

week 11

For this week I will be learning some basic animation from one of the animators to understand the workflow of other fields and in doing so I have modeled some basic objects such as a table, chair and a few other things visible in the picture below. Another learning outcome I have been working on is around making a API wherein I decided to make a dll file , the reason I chose a dll file was because this is something new to learn and it is a good way to protect my code from being used by unauthorized users . To start off on learning how to make a dll, I started with looking at lots of guides but noticed a lot of them were not using monobehaviour which is something I needed to run my steering behaviors as they use man classes found in monobehaviour such as transforms and vector3. After some assistance from my lecturer I have been able to find the right resources and start working on the dll itself but more things are yet t...

Studio - 3 Week-5

For this week I have been working on setting up by SQL database on localhost but I know nothing about it and I will be researching on how to make a table, learning the right syntax to use in php to communicate with the SQL server. The PHP code necessary for connecting to the SQL database on localhost is pretty simple as all you have to do is declare in the information needed to login into the database such as the server name, database user, database password and the databases name which can be seen in the snippet below. Next, we need to form a connection to the database and check if we are connected before we can go ahead, this is a small optimization. In order to connect to the database, we declare a reference $conn which will equal to mysqli_Connect which is the syntax needed in the PHP script in order to form a connection. The if condition only checks if a connection is made and if it has not then it will kill the connection with a die functio...

week 12

This week we were going to start building our final builds however we found a new bug which was due to poor design from my end as a programmer, last week we fixed the issue with the player partially being the in the wall however this created a new problem wherein the shields did not take and damage and this is really bad as it is a major game mechanic. To fix this issue we tried many solutions , but they all seemed to be having their own flaws & drawbacks thus we eventually decided to keep the rigidbody on both the shields and made the main objects box collider bigger with the shields box colliders being slightly bigger than the main bodies , this made the collision work properly and was a simple enough solution however I feel like this situation could have been avoided if better tech design decision would have been made from the beginning  . Once all the problems were solved I started working in 3ds max again to cr...