Hey again everyone! Since the last post much has happened and I've encountered MANY issues. This update will mostly be about behind the scenes changes but there are some visual and gameplay updates to talk about near the end of this post!
I found the main cause of the issues to be the new physics and collision systems, which annoyed me immensely. So, over the course of the past week I have rewritten the collision system, along with various parts of the physics, so that things work better. I had to do this twice because the first rewrite caused unintentional problems that only affected the Flop Shark.
For those who are interested, the collision now works by firing 2 ray casts in each axis that change direction depending on the object's velocity. If the ray comes into contact with a collider, the velocity of the object is stopped depending on the axis the collision occurred. Here is a GIF to demonstrate.(the actual rays are much shorter than the debug rays you can see here)
Thankfully, the new system for collision and physics seems to be working well. Phew.
Unfortunately, that was not the end of the setbacks. Since testing things with more than one shark in play, I have noticed that game will occasionally 'glitch' sending physics objects flying around the screen, particularly the shark tails. I used Unity's Profiler to find the culprit. - I cannot emphasise enough how useful this tool has been!
The Flop Sharks use an A* pathfinding function to find a path to the player. This was having a huge impact whenever it was called and producing the 'glitch' I've been seeing. I have spent most of today optimising the pathfinding method and reducing the amount of messy code involved in it. While I have not fixed the issue, or perfected the code, I have managed to greatly reduce the impact it has on the game. Yay!
So I've managed to surpass all but one of the setbacks over the last week. The last issue is a framerate independancy problem which I will address over the next week and talk about in the next post.
Now, onto the gameplay updates!
This week I had a chat with the team about the wall scaling capabilities we want the player to have. Up until now, I've set it so that you can directly climb walls. However, we've decided to replace this with wall jumping, which still allows the player to scale walls but in a different way. So now when you are on a wall, if you move in it's direction, you'll slide down slowly allowing you to scale a wall by jumping. I cannot say if this mechanic will stick around, there's a pun in here somewhere, but at the moment I like the way it works.
Something else you might notice about the above GIF is that Blobby now has eyes and mouth parts (mandibles maybe?) that move to create a 3D effect. I'm not sure if they work well yet but we're going to do some early play testing soon and I hope to find out through that.
Lastly, I've setup a simple death sequence and respawn mechanic. I'll be tweaking the amount of slow-mo but I think this is a good start!
Wow, this is a pretty big post but I think that's everything! The next post will be up next Saturday as I'm going to the MTG Guilds of Ravinca prerelease on Sunday!
By the way, if you'd like to see some small code snippets in these posts, leave a comment and I'll see what I can do.
I'm the game developer for Squillamorph! I'll post here on the devlog as often as I can.