Gunslingers is a Wild-West themed board game wherein players compete to be the first to accumulate 25 points. The main focus of the game involves players interacting with each other and with locations on the board. Anybody can play, but the recommended age is 12+.
PHYSICAL COMPONENTS: ~45 minutes
ARDUINO: ~30 minutes
Note: Although the buzzer in included in the wiring diagram it is not required for this game
Note: Only one board and one Arduino setup is needed, but each player may have their own Arduino setup if desired
Time per game: ~30 minutes
Players: 3-4 (ideally 4)
Print out the PDF images (located at bottom of instructions)
Paste the board pieces onto cardboard or other firm material
Cut out game pieces and baseplate
Attach game pieces to baseplates
Cut out buildings
Attach buildings to cutout slots on the board
Assemble the Breadboard and Redboard
Download the Arduino code
Place each piece on their respective starting point
Run the Arduino code on the Redboard
Each player rolls a dice
Lowest roll goes first, highest roll goes last
If there's a tie, roll again
At the start of your turn, roll the dice to determine how far you want to move
You may move in either direction
Two or more players may be on the same space
You may choose to stop moving before y0u've moved as many spaces as you rolled in order to land on another player or building
You may not stop early if there is no player or building to land on
Events are certain scenarios that affect the way the game is played
Each time every player has taken a turn (i.e every time the player who started goes) a new event is generated
The person who gets to generate the event changes every time, with no player able to generate an event twice in a row
The table of each event is shown in the "event" section
The first player to 25 points wins
Your score may not go below zero
You can track your scores with pencil and paper
You must show or tell the other players your score when asked
Every role has certain interactions with the buildings and other characters
When you are on the same space as a building or player and you have an interaction, you must perform that interaction
Each role's interactions are found on their individual reference sheets
#include <LiquidCrystal.h> //the liquid crystal library contains commands for printing to the display
LiquidCrystal lcd(13, 12, 11, 10, 9, 8); // tell the RedBoard what pins are connected to the display
int redPin = 5; //tells the RedBoard which pin corresponds to each of the LED colors
int greenPin = 6; //""
int bluePin = 7; //""
int topButton = 3; //tells the Redboard which pin corresponds to each of the buttons
int bottomButton = 2; //""
void setup() { //setup function
randomSeed(analogRead(0)); //establishes the random function so its based off the computer's internal clock
pinMode(redPin, OUTPUT); //RGB LED function identifier
pinMode(greenPin, OUTPUT); //""
pinMode(bluePin, OUTPUT); //""
pinMode(topButton, INPUT_PULLUP); //Dice button function identifier
pinMode(bottomButton, INPUT_PULLUP); //Event button function identifier
lcd.begin(16, 2); //tell the lcd library that we are using a display that is 16 characters wide and 2 characters high
lcd.clear(); //clear the display
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print("Welcome to"); //prints welcome message on first line
lcd.setCursor(0,1); //sets the cursor to the 0,1 position (bottom left corner)
lcd.print( "Gunslingers!"); //prints welcome message on second line
setColor(0, 0, 0); //initializes the RGB LED as turned off
}
void loop() { //constantly running function ("main")
if (digitalRead(topButton) == LOW) { //if the top button is pressed
lcd.clear(); //clear the LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
int diceRoll = random(1,7); //rolls dice
lcd.print( "You rolled a "); //prints message
delay(1000); //waits 1000ms before performing the rest of the program
lcd.print( diceRoll); //prints the value of the rolled die
lcd.print( "!"); //prints messages
delay(5000); //waits 5000ms before performing the rest of the program
lcd.clear(); //clear LCD screen
}
else if (digitalRead(bottomButton) == LOW) { //if the bottom button is pressed
lcd.clear(); //clear LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print( "GENERATING EVENT"); //prints message
lcd.setCursor(0, 1); //sets the cursor to the 0,1 position (bottom left corner)
delay(2000); //waits 2000ms before performing the rest of the program
int randEvent = random(1,5); //generates a random event
if ( randEvent == 1 ){ //if the random event is '1'
setColor(255, 0, 0); //LED lights up RED
lcd.print(" Drought"); //prints the type of random event
lcd.clear(); //clear LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print( "-1 for each roll"); //prints message
lcd.setCursor(0, 1); //sets the cursor to the 0,1 position (bottom left corner)
lcd.print("(EXCEPT Drunk!)"); //prints message
}
else if ( randEvent == 2 ){ //if the random event is '2'
setColor(0, 255, 0); //LED lights up GREEN
lcd.print(" Tornado"); //prints the type of random event
delay(3000); //waits 3000ms before performing the rest of the program
lcd.clear(); //clear LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print( "-2 points if "); //prints message
lcd.setCursor(0, 1); //sets the cursor to the 0,1 position (bottom left corner)
lcd.print("not @ building"); //prints message
}
else if ( randEvent == 3 ){ //if the random event is '3'
setColor(0, 0, 255); //LED lights up BLUE
lcd.print(" Storm"); //prints the type of random event
delay(3000); //waits 3000ms before performing the rest of the program
lcd.clear(); //clear LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print( "+1 roll for OL"); //prints message
lcd.setCursor(0, 1); //sets the cursor to the 0,1 position (bottom left corner)
lcd.print("on shootouts...."); //prints message
delay(3000); //waits 3000ms before performing the rest of the program
lcd.clear(); //clear LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print( "-1 roll for rest"); //prints message
lcd.setCursor(0, 1); //sets the cursor to the 0,1 position (bottom left corner)
lcd.print("on shootouts"); //prints message
}
else {
setColor(255,255, 255); //LED lights up WHITE
lcd.print(" Earthquake"); //prints the type of random event
delay(3000); //waits 3000ms before performing the rest of the program
lcd.clear(); //clear LCD screen
lcd.setCursor(0, 0); //sets the cursor to the 0,0 position (top left corner)
lcd.print( "Buildings not"); //prints message
lcd.setCursor(0, 1); //sets the cursor to the 0,1 position (bottom left corner)
lcd.print("active for round"); //prints message
}
delay(5000); //waits 5000ms before performing the rest of the program
setColor(0, 0, 0); //turns off LED
lcd.clear(); //clears LCD
}
}
void setColor(int redValue, int greenValue, int blueValue) { //function to illuminate lights
analogWrite(redPin, redValue); //tells the red pin of the LED how much to illuminate
analogWrite(greenPin, greenValue); //tells the green pin of the LED how much to illuminate
analogWrite(bluePin, blueValue); //tells the blue pin of the LED how much to illuminate
}
**Connect a ground to pinout GND and a positive to pinout 5V**
LED
A1 [blue]: I1-pinout 7
A2 [green]: I2-pinout 6
A3 [ground]
A4 [red]: I4- pinout 5
Resistors (330 Ω ): D1-G1, D2-G2, D4-G4
Wire: E3- ground
LCD (A15-A30) [pin 1 at A15]
C15-ground
C16-positive
C17-C23
C18-pinout 13
C19-ground
C20-pinout 12
C25-pinout 11
C26-pinout 10
C27-pinout 9
C28-pinout 8
C29-positive
C30-ground
BUTTONS
First (D5, G5, D7, G7)
J5-pinout 3
J7-ground
Second (D10, G10, D12, G12)
J10-pinout 2
J12-ground
POTENTIOMETER (E22, E23, E24)
C24-positive
C23-C17
C22-ground
BUZZER (G18, G20)
J18-pinout 4
J20-ground