This is a generative art project turned into a game. The generative art (an example is above) is made randomly using a random seed that is chosen through applying hash function to an input file. The file is parsed and hashed into a random number. This determines the colors of the image, the direction of the lines, the shapes, etc. As for the game part, we chose to use these randomly generated images as enemies for the player to combat. We chose to implement the simple "shotgun" children's game as it is a simple enough game to implement our generate art project. The game has only three inputs for the user: Attack, Reload, or Block. The player's score is tracked, with a bonus gained for defeating an enemy. But, players must also be wary of their own health as well. Players try to defeat as many enemies as they can and get as high of score as possible.
This program relies on two Python libraries: PySimpleGUI and Pillow.
pip install PySimpleGUI
pip install Pillow
import Game
g = Game.GameScreen()
You and your opponent both choose at the same time whether to attack/reload, or block.
You need to first reload in order to be able to attack.
Attack allows you to injure your enemy. Injuring them 4 times defeats them.
Block allows you to prevent getting hit by an attack. Your opponent can block too.
• Randomly generated image (body and eyes) as gif<br/>
• Randomly generated name<br/>
• Randomly generated quote<br/>
• Randomly generated colours<br/>
• Randomly generated blocking tendency<br/>
As a data project as well, if you click on Change Seed
you get a popup modal with an input. Specify the path for the file you want to be parsed for generating the random seed.