Collisions fixed (mostly) and levels made


This week I fixed the collision detection system, turns out it was caused by the fact that the normal and up vectors were the same, but due to the way floating point numbers are stored in computer memory, they were slightly different, causing them to register as not equal in some cases. I fixed this by checking if they were approximately equal instead of exactly equal, and this works perfectly.

I also added a background texture to the scenes and added a few levels to actually play rather than just test mechanics and features. the transitions between levels are broken at the moment and I'm not sure why, as the code looks like it should work properly, but instead of moving to the next scene, it reloads the current scene 19 times out of 20, which makes me more confused as it does occasionally work, but I can't notice any discernible pattern. I'm going to ask for help from my tutor on this as I am genuinely stuck.

I also added tutorial text to the levels by having an empty gameobject with a text mesh component attached to it. I also tried to make these levels increase somewhat in difficulty so that the player can learn how to play before being challenged too much. I also made a darkness tile that I can place at the bottom of pits to make them look more obvious and deeper, and I did this by using paint.net and making a 64 by 128 pixel sprite that had a gradient from black at the bottom to transparency at the top.

I also added a placeholder player sprite, it's not one that I'd want to use for the final game, but I wanted something that I can animate to at least get that functionality in and then be able to just swap the sprites later. the animation is a bit janky looking at the moment, so I aim to make it look better next week. I also think that in adding the player sprite I somehow messed up the wall sliding mechanics, as the player just gets stuck to the wall now without sliding down. I aim to redo this and the wall jumping  mechanics though, as the code is starting to get really messy and hard to read and follow, so I'm hoping that a complete rework of it will fix all 3 issues.


Now that I've added the player sprite to the game, the only artwork I need is the hole sprites for the mini objectives as well as the end of level hole. I'm going to try searching for these after I've fixed the previously mentioned issues, but I won't worry too much if I don't find any suitable artwork, as these most likely won't be animated and so will not require any extra work beyond swapping the sprites. also if I have time I'd like to find and put in window sprites to make it obvious that this game takes place in a castle under the water, but I don't see this happening as there is still a lot of work to do.

Leave a comment

Log in with itch.io to leave a comment.