Minigame Monday: Cryptic

 Cryptic:

  • The concept:

This time, I wanted to make a game that flexed my creative muscles a bit more, even if that meant having a slightly lower coding intensity. I decided to make a text-based puzzle adventure, where you have to type an answer to a situation, with clues contained in the text, and also in simple pictures. As well as each individual prompt having a solution, I wanted it so that the final question (minor spoilers I guess :P) involved all of the previous parts, so required a bit of memory, or noticing the connection as you went along. 

  • The challenge:

Coding wise, this wasn't too complicated, but that doesn't mean there weren't chances to be efficient. I did this by seperating the game into two python files, a framework and a level manager. That way, the framework could handle input and drawing the screen, while the bulky text was seperated in a different class.

One issue I did encounter was that of word-wrap, so long strings of text would move onto the next line rather than run off the edge. Pygame doesn't have a native way of doing this contained within it, however I found a function at https://www.pygame.org/wiki/TextWrap that solved the immidiate issue. I did have to adapt this code; it doesn't handle newline '\n' characters, so I added to the function to cut these characters out and move to a new line, allowing me to have returns in the text. 

  • The result:

Cryptic screenshot
I'm quite pleased with how this game turned out; obviously as a minigame the scope was quite small, but the result is (what I hope is) a short but enjoyable game. If I was to put more time into it, I'd obviously put more time into the pictures (I'm still not an artist). I'd also like to add more responses to potential answers, though there are a few in there for you to find already. Coding wise, the next step would be to isolate the text into a seperate file, and have the manager class read from the file. Seeing as typing out the text was the main time sink here, I think doing that from the start wouldn't have really saved any time, but it would produce a neater result and make it easier to edit in future. The game can be found at https://reddragonmakesgames.itch.io/cryptic, and the code is on github (It will contain spoilers, or the answers if you really need them!)

Comments

Popular posts from this blog

Minigame Monday: Covert Behaviour

Armageddump (Boss Rush Jam 2023)

Moles in Holes