Pages

Wednesday 6 May 2015

Week 31: The Dark Side

Full Speed(?) Ahead!

A lot of stuff happened during the last week and the weekend, which is why this blog is once again a bit late. We finally got the dark world sorted and it looks amazing. There is still quite a few tweaks that need to be done, however it is implemented and I had the chance to finalise the level switch script. This was the first thing I have done during the week and also turned out to be a major challenge. Mostly due to the fact that I had to manually save every single variable that I wanted to save during the level switch. This meant that I had to consider every possible outcome that might be the case when the player switches the level. Has the player found any collectible yet? If so, how many? Has the player done the rabbit puzzle yet? Have they even started it? And if they have, how far did they get with it? Everything needed to be saved, so that when the player returned they would be at the exact the same stage as they were when they entered the dark world.

Near the end of this long process I then discovered that I could've just saved the character blueprint itself as a variable instead of every single bit... great! At least I learned something new. Another factor which greatly increased the time that I had to spent on this was testing and engine stability! UE4 has a tendency to crash and with that you would lose a lot of work, unless you save regularly. This is a major issue on the PCs in the computer labs as it takes absolutely forever! I'm not kidding, one time we nearly sat there for a whole hour waiting for it to save. So every time I changed something I first had to save everything I have done to prevent loss in case of a crash and then after an average of about 20 minutes saving time I would then have to load up the level (which also took about 5 minutes at times) and then walk down to the hole to test everything. I can safely say that about 50% of the time I spent on scripting the level switch into the game was spent waiting for the engine to save/load/play.

Our team members after saving the level for the 10th time in a row.
Nonetheless, the level switch was done and with that I was ready to tackle the next hurdle: The Mad Hatter puzzle (or Tea Party puzzle). We wanted the Mad Hatter to give the player a riddle describing a particular object and then have the player go and find said object, pick it up and bring it to the Mad Hatter. I already implemented the picking up mechanic earlier so that wasn't too much of a problem and it was mostly just writing dialogue. Denise wrote the riddles for this puzzle and I implemented them and scripted the logic behind the puzzle (such as detecting which object the player brought to the Mad Hatter and then deciding whether that's the right or wrong object).

Later on during testing with other people we found that there is a problem with the objects having physics applied to them, which can cause the objects to either be shot out of level bounds or even under the floor, causing them to fall indefinitely into the abyss. This can be fixed by resetting the object once this happens though and I already had to implement a reset function as part of the puzzle so it's not too concerning.

Wonderland Playability

Going back to our original world there was still a couple of things that I needed to finish for it to be fully playable. Starting with this, I first finished the key puzzles by implementing a card guard NPC that would control that quest. I then also had to finish the rose puzzle, for which again I had to create a card guard NPC. Although they are both very similar, they required different scripting so it took me a bit to get both of them working. Finally I spent some time working on the final cutscene and the credits, when I realised that we still needed a main menu, so that when the player finished the game and the credits played we could reset the game back to the main menu, so I also worked on getting that done. At this point it is important to notice that all of the following components are only temporary placeholders for the DMU hand-in of this project: Any dialogue (except for the riddles), Credits, Start Menu, Final Cutscene. We wanted to have our level be fully playable in time for the DMU hand-in, however we don't have enough time to get those components to the stage we want them to be at, so for now they are really just simple placeholders that "do the job".

Finally a full game!

I am glad to say that we have finally reached a point where the level is fully playable from start to finish. This is what we wanted to achieve and we did get there. There's still a few bugs in the game that need fixing (although mostly just aesthetic bugs, there's unfortunately also a few game breaking ones) and we have loads of other things we want to change and add, but as it stands the level is pretty much done for the DMU hand-in. It was a long ride (the longest project yet), but it will be nothing compared to our FMP next year. Next-up will be handing in the project and writing a post-mortem.

Stay tuned~

No comments:

Post a Comment