Simple TKinter Python Game Design Doc


For this project I just jumped into the editor without any real plan in mind. The first thing I made was the splash screen. It’s a videogame, so why not make it look like a videogame? I clone-stamped the Legend of Zelda screen to clear a space for my own title, which I decided was Legend of Tkinter. I used the time.sleep method to create a little intro animation. I still had no plans. 


Next up I clone stamped a screenshot of a Legend of Zelda level to make it more open and uniform, and I drew a little stick man in there as a protagonist. I cleared off the UI so I could put my own in there, and I made a little life counter by finding a heart in Character Map and setting a label to "♥" * lives, then I made a hurt function with a button that would -= the lives.


Then I decided I needed a way to die. I made a game over screen, and I really, really wanted to draw a stickman doing the Family Guy death pose, but crossing his legs and feet like that created a very nasty symbol, so I decided that I would just use Peter Griffin. To avoid any copyright issues, I have renamed him John Family Guy. I put an if statement inside my hurt function that would display this screen if lives <= 0.


Now at this point, I could start up the game, die and get a game over, but I still had no real idea of what the game should actually be. I decided to start with an enemy. I wanted something I could have on screen easily, and the easiest thing to have on screen seemed like a button. So I made buttons themselves the bad guy here.


After having John Family Guy on my death screen for a while, I decided to make him the protagonist. I put together some intro screens with him, and placed him into the gameplay screen. Then I wrote the intro where he is attacked by the button. And after all this, I STILL had no idea what the actual game was going to be.


I’ve been studying for the Python Institute PCEP certification, an entry level cert that is deceptively hard, because some people clearly have a much different idea of what entry level means. Studying for this exam has taught me a number of concepts that I didn’t know before, so it has been useful. This gave me inspiration to make my game into a quiz, just like I’ve been taking for the last few weeks.


I started by making a notepad file of short questions that I liked. Then I renamed my gameplay function into question1, and made 4 buttons for the 4 answers. I considered different ways to randomize the answers or have them pull button text from a list, but in the end the most expedient way to make this seemed to be to just make a whole new function for every question. So the 3 wrong answers point to the hurt function, and the 1 right answer points to the next screen. 


I ran into a problem with question 3, the answers were a little longer than the buttons, so I shrunk the button font down, which meant that they were no longer perfectly covering up the previous buttons. So in question 3 I have to reload the whole screen to keep everything visually clean. After trying to get that working about a dozen times, I ran everything again and made sure it all worked. Then I decided that I needed a winning screen, so I cobbled together an image of John Family Guy punching a button, and then going home to his beautiful wife. 



Comments

Popular posts from this blog

My Active Directory DHCP Virtualbox Homelab