Mexican Standoff Reaction Game
Game made by Francisco Martin and Andrew Smith
Mexican Standoff is a single or multiplayer game where players attempt to react faster than their opponents. In single player mode, players face-off against an AI (don't worry, it's programmed to be a bit slow). In multiplayer mode, players go toe-to-toe with another player. Both players start with 5 hit points. If player one presses the correct button corresponding to the correct prompt faster than player 2, player 2 loses a point. Reach zero and you lose! Each shot lights a an LED on the mbed board on the side of the player who shot first. Be careful though, press the wrong button and you immediately lose a point. There are 4 possible prompts: shoot up, shoot down, shoot any, and shoot none. These are randomly selected so that players cannot preemptively guess the prompt.
Menu Controls:
- OK: Left Buttons
- UP: Upper Right Button
- DOWN: Lower Right Button
Hookup Guide
Mexican Standoff for mbed needs the following additional devices:
- 1x SparkFun microSD Transflash Breakout
- 4x Pushbuttons
- 1x uLCD-144G2
- 1x Speaker - PCB Mount
- 1x 200-1000 Ohms
- 1x 2N3904 General Purpose Amplifier
Suggested Hookup
The following image is our suggested wiring schematic. Refer to this image when reading the following hookup tables.
microSD Hookup
microSD card | mbed |
---|---|
DO | Pin 6 (SPI miso) |
GND | GND |
SCK | Pin 7 (SPI sck) |
VCC | VOUT |
DI | Pin 5 (SPI mosi) |
CS | Pin 8 |
PushButtons Hookup
Pushbuttons | mbed |
---|---|
Player 1 Left | Pin 15 |
Player 1 Right | Pin 16 |
Player 2 Left | Pin 26 |
Player 2 Right | Pin 29 |
uLCD-144G2 Hookup
uLCD-144G2 | mbed |
---|---|
+5V | VU |
TX | Pin 27 (Serial RX) |
RX | Pin 28 (Serial TX) |
GND | GND |
RESET | Pin 21 |
Speaker Hookup
The speaker is a little more complicated to hook up. Please refer to the following guidelines to hook it up: Using a Speaker for Audio Output
From | To |
---|---|
+ | VU |
- | Amplifier E (left node) |
Amplifier B (middle node) | Resistor |
Resistor | Pin 18 (AnalogOut) |
Amplifier C (right node) | GND |
Test Video
Source Code
Import programMexicanStandoff
This is the Mexican Standoff prototype made by Francisco Martin and Andrew Smith. Please refer to the following link for instructions on hardware hookup: https://developer.mbed.org/users/fomartin/notebook/mexican-standoff-reaction-game/
Please log in to post comments.