Wednesday, July 9, 2014

Dev Blog 11 - Final Riddle Systems

Today, after adding the rest of the 20 riddles into the game as well as some new artwork, I decided to bang out the bulk of the Final Riddle implementation today. I have to say, I'm pretty satisfied with the results.

I implemented a series of fading text animations using coroutines. This text congratulates the player on beating the first 20 riddles, tells them only 3 Final Riddles remain, and instructs them on how to solve the Final 3 Riddles (along with an example).

I then wrote the code for the first Final Riddle (FR). At first I thought using an array of KeyCodes would be the simplest way, but I quickly found that due to C#'s lack of dimensional arrays, it would prove overly complex to try and use an array. I instead rewrote it as a List<KeyCode> which proved much easier to work with. This way, I could easily check if the correct keys for the answer to the riddle are being pressed in order. Initially with my array implementation I thought I'd need to write some additional code to check if the keys were being pressed in order, but with a List it was as simple as popping the first element of the list after it was correctly pressed.

Now the FR implementation isn't completely done, I still have to hook in the death counter so that wrong key presses increment it. And I of course also have to implement FR 2 and 3 (but those will be straightforward now that the groundwork was laid with FR 1).

Admittedly I did ignore some goals for the upcoming milestone in order to implement FR's. I'm going to try to play catch-up and implement all of the new features planning for the upcoming July 15th milestone, but if it doesn't happen I'm OK with falling a little behind. I think the addition of FR's definitely make Enigmatic a much, much better game, and I'm glad I got the bulk of the work done for that today.

Below is the FR 1 screen, with the riddle and word bank of previous answers blurred out of course ;)




No comments:

Post a Comment