# Suggest a game and I will make it! (depending on the complexity)

Have a game that you would like to play but don't wanna code all that? Well look no further! Give me your game suggestions and I will make it!

In-Progress Games:
[No in-progress games]

Completed Games:
[No completed games]

Is that a right place for that question? I think it should be in Requests to the Community - in that place are stored many threads with asking for inspiration to new projects. I've done the same some time ago and I was redirected to that place

I would be interested in a game I could play against one other player (perhaps a broker accessed through the MQTT library could take care of the interaction).
It’s a kind of “play chicken”, with a twist.

The game has a random number of rounds, e.g. at least 10. For every next round there is a given probability (e.g. 1:5) that it will be the final round. The players don’t know this until the game ends.
In every round a bubble is being inflated. Its initial size is 100%. It will be inflated to a random size, at least e.g. 200%, and beyond that threshold there is a given probability (e.g. 1:200) that the next size will be final, and the bubble wil evaporate.
Each player has a single button, and takes off with zero points.
For each round:

• If one of the players presses their button first, that player will be awarded as many points as the current size of the bubble; the other player will be awarded the remainder of the potential points (= final size MINUS current size).
• If none of the players press their button, or both press it simultaneously, no points are awarded.
The player who has earned most points when the game ends, wins.

Example:

• round 1, final size will be 347%. Player 1 presses the button while size = 183% -> Player 1 earns 183 points, player 2: 347 -/- 183 = 164 points.
• round 2, final size = 765%. None of the players press the button before final size is reached -> No points are awarded. Player 1 still has 183 points, player 2: 164 points.
• round 3, final size = 542%. Player 2 presses the button when size = 231% -> is awarded 231 points (total points: 164 + 231 = 395 points). Player 1 receives 542 -/- 231 = 311 points, for a total of 183 + 311 = 494 points.
• round 14: … at the end of this round player 1 has 854 points, player 2 has 985 points.
• round 15: there is no round 15 -> player 2 wins.

Variations (not for the initial version):

• best of 3: the above game is named a “set”, to be repeated until one of the players has won 2 sets;
• multiple players: after each set one of the players is eliminated.

Would that be doable? I’m looking forward to your implementation!

Oh, thanks! I didn't know that category existed!

Hm... that sounds really cool! I just have a question though. What's MQTT???

MQTT is a machine-to-machine network protocol for sending and receiving messages through a queue. So for example you and I could make our computers connect and exchange messages; thus we can play a game together.

Snap! has a library - libraries are in the "file" (pulldown) menu - for using this service.

Admittedly I don't have any serious experience with it yet, I just sent and received a few messages through the (suggested) emqx broker (no user id and password needed):

One of the blocks within the library:

... has examples of how to use MQTT (if you edit it).

Good luck!

BTW you could start building a prototype of the game with two buttons, such that you can play against yourself or someone else in the room. And make MQTT interaction the next step.

Thanks for reminding me how fun this library is