Week 10 – Wrapping Up
May 12, 2023
Welcome to my tenth Senior Project blog, where I’ll go over some of the things I did this week. In last week’s blog post, I mentioned that the majority of my project was done, as I was able to create the system where the difficulty levels are automatically changed based on the user’s prior wins and losses. This week, I made a minor change to that, as well as spent some time working on my presentation for next week as well as trying to figure out a way to allow people to play the game without needing to install Pygame.
Changes To Difficulty Adjusting
Initially, the difficulty level would only be changed after at least 5 games played at the current level. If five or more games were played, the code would look at the most recent five, and increase the difficulty if 4 or 5 were wins, and decrease if 0 or 1 were wins. I changed this to sometimes update after only four games. If the user either won or lost all four of their most recent games, I would adjust the difficulty at that point, rather than wait for the fifth game. The purpose of this project was to adjust the difficulty level based on the user’s wins and losses in order to ensure that they find the game more enjoyable. Under the assumption that winning every time or losing every time isn’t very enjoyable, I don’t think it makes sense to force the player to play a fifth time at the same difficulty. Additionally, no matter the result of the following game, the difficulty would have been adjusted anyway. If a player was 0 wins after 4 games, they will end up with either 0 or 1 wins after their next game, and if they started at 4 wins, they will end up at either 4 or 5. In both cases, the very next game would have anyways adjusted the difficulty level.
While rewriting this part of my code, I also realized that I forgot to ensure that the difficulty does not go below 1 or above 8. This was fairly simple to fix, as I just needed to add an extra if-statement right before increasing or decreasing the difficulty in order to make sure that I should be changing it.
Playing Without Pygame
My program is written in Python, and runs using the Pygame library in order to handle graphics. As a result, you wouldn’t be able to just download the files and start playing, as you also need Python and Pygame installed to do so. I spent some time this week trying to see if there were ways to allow other people to play this game without needing to download Python and Pygame on to their own devices, but rather just download the game’s files. So far, I have not been able to find a way to get this to happen. However, I do know that it is possible, considering that there have been games made with Pygame that have been released on Steam, meaning users are able to play them without needing to install Pygame.
Leave a Reply
You must be logged in to post a comment.