Cheeky Checkpoints
|
This week I’ll be talking about the cause of my headache last week and the waste of many hours, checkpoints. They’re not entirely the cause though, it’s more because of stubbornness, tunnel vision and probably some idiocy. Where the problems startedIn our game you’re progressing through a level left to right, and as the level is a little lengthy we want checkpoints so the player doesn’t have to redo all of it. This was to be my main task for last week, but ended up bleeding a bit over to this week. I started out with doing some research online to see what are some good practices when doing this, which I usually do when starting out with something. My problems started when I got set on an idea I had using enums and arrays. I won’t go into too many details, because it was over complicated in a bad way, and not very thought out. But basically every checkpoint would have an enum, and the player would change it’s “spawn” to that enum if it passed the checkpoint, there was some other stuff, but not to important. The main issue was that I ran into issues with referencing, and instead of trying to rethink the system, I did a bunch of unnecessary work researching solutions and in general not being very productive. SolutionOver the weekend I took a break and got back to it the following Monday, I looked over what I had been doing with fresh eyes, and decide to scrap it. I instead went with a simpler design that works fine for our game, now the game controller has a spawn position stored, and whenever the player passes a checkpoint the spawn position is set to the checkpoints position. ConclusionSimpler is sometimes better, and it’s important to stay agile, and not get to hung up on ideas if they don’t work. Even though I wasted a ton of hours on this, I feel I learned some good lessons that I can take with me. |