#3 Enemies and Interaction
#3 Enemies and Interaction
This week, I focused on further developing the interactions between the player and enemies and adding additional depth. First, I added levels 2 and 3 and transferred all the relevant objects. I used the level 2 background for most of my work this week, as I also decided to use this for the testing in class to get feedback on a different scene and catch any unforeseen issues early on.
This week's primary focus was on further developing the AI scripting for the enemy fish and the enemy shark game objects. A problem encountered was the flee behaviour, which was affecting the enemy fish, causing them to flee and get stuck in the corners, as this is the furthest point for them to go, according to the logic of the code. To overcome this issue, I tried adding some logic to make them veer off via angles slightly so they don't follow a straight line, which did work. However, it felt a little bit predictable, so I went back to the practicals and attempted to apply a raycast method, which then would shift the angle left or right based on obstacles detected and allowed me to view the raycasting angles live, which helped me fine-tune it to a satisfactory result. An example of this behaviour is shown below:
I did notice a jittering behaviour that I need to look into when the fish get close to each other, which I will attempt to correct this week, alongside graphics. Next, I applied the same logic to the shark behaviour and enhanced the AI logic. While the player is small, the shark will hunt the player, but once the player becomes large enough to threaten the shark, it will change its behaviour to flee. This is shown below:
(Due to .gif limitations, scaled the fish size up to shorten the recording)
Next I added functionality to the shield by writing a script to control the logic upon picking up the the powerup a 5 second shield with a visual overlay with spawn around the player which scales with size (zeroisnotnull, 2018), I ran into some issues with size scaling with this that I haven't completely solved but was able to make it function. The problem was solved by scaling down the asset to match the size of the fish, which lowered the quality but made it render in-game. This week, I will revisit this issue once I replace placeholder assets with my sprite art assets for the fish and the shark. The shield pick-up is shown below:
Feedback:
The feedback I mainly received concerned the collision issue with the fish, as it impacted the gameplay. This is my main priority to fix tomorrow, and if it's still an issue, I will reach out to Ian and Lindsay. Also, I forgot to remove the crab as it had no scripting yet, so it was getting in the player's way. Good feedback on controls, feeling satisfying, and the new behaviours for the Shark and Fish were received well, and I also got some advice on adding a UI element for the shield once I get to the UI stage, which I thought was a good idea. Ian gave me a good idea that I will attempt to implement if I have enough time, eating small fish leaving blood behind that fades over time, and if the shark touches it, it will speed up into a frenzy, and the way to outplay this would be to hide behind the kelp until it calms down. And lastly, I was given an idea that u could have a surface level where u have to evade a shark and a bird, which I may look into if time permits. Overall, I got many ideas this week, a good result with my behaviour scripting and a priority on correcting collisions.
Weekly Goals:
Fix the collider issue with the player interacting with the fish
Look into removing the jitter that the AI is causing with Fish and Shark (potentially, tolerances for flee behaviour need adjustment)
Implement graphics and animations
Clean up shield scaling
Implement manipulation to make the camera zoom out with the player's size to ensure the map doesn't get small as you grow. Add new fish types to level 2-3
Reference List:
zeroisnotnull. (2018, February 8). Shield sprite [Digital image]. OpenGameArt. https://opengameart.org/content/shield-sprite
Files
Gone Fishin'
Status | Released |
Author | phandfield |
More posts
- #2 Basic Level Blocking12 days ago
- #1 Player Movement21 days ago
- Concept34 days ago
Leave a comment
Log in with itch.io to leave a comment.