Final fixes ready for testing


This week I fixed up the issues I was having last week, starting with the level loading issue. this turned out to be more complicated than I expected, as the cause behind this issue was that while the new scene was being loaded, something happened that caused the player from the original scene to be outside of the worldbounds collider from the original scene, which then triggered the player death script and reloaded the scene instead of finishing loading the next one. the solution to this that I implemented was to have a static boolean called loadingLevel, and then set it to true whenever the program started to load the next level, then set it to false when it finished. I then made the player death functions only run if loadingLevel is false, and this worked perfectly.

on the topic of level loading, I also added a nice visual feature where if the player is not holding the trident and tries to end the level, the trident will be automatically recalled then the next level will be loaded. this didn't add much, but I thought it was a nice change for the sake of continuity and immersion, and it was fairly quick and easy to implement, so I though "why not?".

I also cleaned up the player animations and made them look smoother and nicer, and this was also surprisingly easy. all I had to do was mess around with the animator settings, but the most important settings I made was to turn off exit time and fixed duration for the animation transitions, now they change instantly to the required animation, whereas before it had to play the animation out completely first.

I also fixed the wall jumping and wall sliding issues. the wall sliding issue was dead easy to solve, the player material had somehow been removed from the BoxCollider2D component of the player, and this just made it stick to the wall, but as soon as I put it back in it worked again. the wall jumping was a bit harder, but after a bit of a rework of the code it's working again, and I'd say it's working better than ever now.

I then added another level to the game and now it's ready for testing. I didn't add any UI elements as I don't think they're needed; the player has no health or stats to keep track of. Maybe sometime in the future I'll add an indicator arrow to show where the trident/player are when they're outside of the camera's view, but this would take more time than I had this week, so I didn't do it this week.


Leave a comment

Log in with itch.io to leave a comment.