Well, currently, with the puzzle game, I have around 13 levels, 11 of which are actually completed. One reason why this is the case is because I had to fix each level.
Because of a bug. Then because of issues.
Well, let’s actually talk about things. The main character in the game can, well, jump. Jumping is essential to survival for some levels. And your jump ability should remain consistent. However, this was not the case with the very first character controller script. It was, in a nutshell, awful. The 2nd and 3rd versions weren’t that great either. However, I believe the 4th one is the one that was the one I started to use for levels.
This character was pretty cool. He would move and jump when I told him to, and it seemed like a match made in virtual heaven. However, there were times when I had a level running and looked away for a few moments in time. The player was supposed to jump during certain times, and if the player jumped, the level would be over with words of success written all over my screen. Unfortunately, from time to time, the end result was the beginning of the level (when you die, the level quickly starts over). This lead to testing to why the player was dying. I then booted up my test level (where I test all the elements that I want to include, such as traps or environmental tools), and had my player jump 21 times in a row. And what I saw was normal. The player jumping 21 times in the row, the first jump similar to the 21st jump, and everything else in between. This put my worries on the back burner, until it happen again when I wasn’t looking. So, I tested again and again and again. This time, I saw the problem. Approximately 5% of the jumps were much higher than they should have been. Inconsistency, something that I pretty much need in this game, was not occurring.
After many sessions of debugging, I decided to switch to an animation for jumping, instead of playing with positions. And this was a problem. My player animation would always start in the same spot. No matter where the player was. So, let’s say the player was at y = 50, once the animation started, it would start at y = 0, something I did not want to happen of course. This was eventually fixed, by doing something I find silly (parenting the player to an empty object which has the animation attached), but it seemed to fix the problem. Because of this, the timing of the levels were off by a bit. I had to go back to level one and adjust the player’s starting position, and the timing of some traps and environmental objects to fix the levels. All seemed grand, and the player’s jump was consistent. The animation wasn’t want I wanted it to be, but I was too annoyed to fix it. But there was another problem.
The animation always ended at zero. Which means that if the player was on a moving platform that moved up, but the player needed to jump, the player would move through the platform in order to finish the animation. There were a few ways I could have gone about fixing this. I figured, I could detect if I landing on an object, and if I did, stop the animation. But, I wanted to give the previous code another go. This meant ditching the animation, which I didn’t like in the first place, probably the reason why the animation was ditched so quickly.
After even more sessions of coding, I fixed the problem and saved my changes. And the player no longer jumps 20 feet higher than they should during random jumping moments. That was good. The annoying part was tweaking all my levels again.
However, I’m down to fixing 3 more levels, as some of them didn’t require too much of a change (yay). Let’s up this is the last of the player edits, as this is taking too much time away from other development. I was actually planning on spending this evening making music. Instead, I need to fix levels. It’s okay, I guess.
But that’s it for now.