I am looking for a raspberry script for running a small game for my daughter.
First I will try to describe the situation before describing the needed script.
I installed a console with five buttons. Each one can be lighted. The colours of these buttons are: red, green, blue, yellow and gold.
Also I installed three rings with two sensors each. The sensors should bessure when a ball hits a ring.
The script should do the following:
User should be asked how many player want to play. If a button is pressed, the light of the button should turn on. If it is pressed again, it must be turned of. When hitting the golden button, jump to phase 2. The colour and number of the buttons which are lighted at that moment will give the number and colours of the players.
User should be asked how long a game should be. The buttons can be used as a selection. The coloured buttons are for 1, 3, 5 and 10 minutes. When the golden button is pressed, jump to phase 3.
check the sensors. All the sensors, which are inactive should be turned off. Thereafter the game should start. for each ring there must be a random selector. the selection can be either one of the player- colours or it is "broken". The display must show which ring has which colour at the moment. Every 10 seconds this selector has to change this selection and show the result again on screen.
When a ring is hit, add 10 Points to the player of the according colour.
This goes on until 20 seconds before the selected end of the game. Then we need an additional randomizer. This one selects a number out of (number of players + 2). If the selected number is one of the players, turn on the light of the golden button and tell on screen which player should press it. It stays on for 3 seconds, then must be turned off again. wait for 2 seconds and start this randomizer again. If the randomizer selects a number which is NOT a player, then the button must stay off.
The game finishes when the golden button is pressed while the light is turned on. The player who was selected before for this golden button will get additional 150 points.
The game plays a small sound and tells the players who won. After that the player can choose to play again and the whole script would start again.
I tried to program this script by myself, but it was to slow and therefore did not work.
Hi, I am interested to script the game for your daughter. I have good experience developing GUI and logical scripts like yours using Python. Expecting your reply.
8 freelancers are bidding on average €162 for this job
Hi, I have worked on various python scripts and have a lot of experience on working with a raspberry-pi. Your project seems do able i will optimize the code to work well on raspberry. Thanks