Skip to content

unignoramus11/Pyzzle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyzzle

A puzzle game coded entirely in Python.

This is a school project.

The .exe file, created from the main.py script, is a short puzzle game with a plethora of little features and details.

  1. The moment you enter the game, it first checks if you are a returning player and displays a short tutorial accordingly. Even if the game has been played on your device once, it skips the tutorial.

    image

  2. It then asks for your name. If you are a returning player, it then displays your highest score yet, else it skips to the main menu of the game.

    Prompt for name:

    image

    Displaying highest score of the player:

    image

  3. In the main menu, you can select one option from 'Play', 'Tutorial', 'Scoreboard', or 'Quit', to perform the respective actions. This selection can be performed by typing in the required command. I have also made sure that case doesn't matter anywhere in the game, making the experience just a bit better.

    image

    • Selecting 'Play' launches the main game. This consists of a series of questions which you have to answer correctly. Some of the questions also have certain time limits and you are given points on the basis of the time you take. The quicker you answer, greater points you score. If you answer incorrectly or take too much time, you lose the game. Here, I have created a short answer checking algorithm so that it is not necessary to enter all the words correctly. If even a part (single word) of the answer matches the correct answer, then full points are given. (For example, 'an egg' is treated to be same as 'egg' or 'the egg').

      image

    • Selecting 'Tutorial' brings up the same short tutorial that is shown to new users.

      image

    • Selecting 'Scoreboard' brings up the scoreboard with a list of scores of all the players, arranged in descending order according to the respective scores. You are automatically returned to the main menu after 5 seconds.

      image

    • Selecting 'Quit' save the current progress and closes the game window.

      image

Troubleshooting Features

  • Right when the game starts and asks for your name, if you input 'reset' or 'restore', it will perform the respective actions. 'Reset' renames the score.txt file to old_score.txt, thus creating a backup of the previous score as well as resetting the game to the fresh-install state. 'Restore' searches for the old_score.txt file and reverts it back to score.txt, thus bringing back the old scores.

    image

  • While in the main menu, you can type 'reset' to perform the same action as in 1, except for the fact that in this case, the game also saves the current player's score in the backup and then closes the window.

    image

  • Sources

    All the questions and their respective answers were obtained from the following website(s):

    1. Reader's Digest
    2. Get Riddles
    3. Thought Catalog