Table of Contents
MEGA2560 BASIC Model:
- Version 1.94
- Build Date: 27 Aug 2020
- Sketch uses 45412 bytes (17%) of program storage space. Maximum is 253952 bytes.
- Global variables use 1257 bytes (15%) of dynamic memory, leaving 6935 bytes for local variables. Maximum is 8192 bytes.
Please do not ask for source code, I am not ready to release it.
Introduction
The FPS Bomb Simulator is a device that is meant to bring the excitement of console games such as Battlefield ™, Call of Duty™, CounterStrike™, and Team Fortress™ to real life. Augmenting any Airsoft, LaserTag, MilSim, Nerf, or Paintball game, catered towards three styles of gameplay.
- The "Search and Destroy" and "Sabotage" game modes are for players who love the type of game in which Terrorists and Counter-terrorists battle against each other to plant and/or defuse a bomb.
- The Domination and Conquered game modes are perfect for those that are more into a “King of the Hill” style games.
- The “Escape Room” game mode is perfect for those that like a challenge. It can only be disarmed with a “Passcode”, find clues to get the passcode before it explodes!
Language Menu
Each of the games can be played in one of seven languages, selectable at game start:
- English
- French *
- Spanish *
- Portuguese *
- German *
- Italian *
-
Dutch *
* Note: Only English characters are printed on the LCD using a 4×20 Charater display
PnP upgradable addon modules:
All modules are auto-detected when the bomb is powered on
Addon modules affect available options for game play
All game modules are “Plug and Play” and easy to install, using the following steps:
- Remove the battery. (The FPS Bomb Simulator must be fully powered off.)
- Modules are keyed and labelled, place the module in the corresponding “slot”.
- Replace the battery.
- Power on the device.
The modules are automatically detected upon device startup. Game configuration options for each individual module will only become available once a module has been enumerated.
- Cutwire Module (4 wires)
- Not available in Domination and EscapeRoom modes.
- Cutwire module will be disabled if any wires are not connected before the bomb is armed.
- Plug in 4 wires (Red to Black connector), if wires are not connected the Cut wire option will not function.
- 1 wire is randomly selected each game to "Disarm the bomb".
- 1 wire is randomly selected each game to "Explode the bomb".
- 1 wire is randomly selected each game to "Speedup the bomb timer".
- 1 wire is randomly selected each game to "Nothing".
- If all wires are cut at the same time the bomb will explode.
- Relay Module (4 ports)
- the first 3 sockets can be used to power 3 externally attached lights, mirroring the RGB LED indicator
- the 4th can be used to power a plug in device for the "Bang" when the bomb explodes (example: smoke machine)
- Servo Key Box enables Escape Room game mode
Remaining devices are in development (current or Future) - Sound with YX5300 (Currently in Development) will use hardwareserial1 on ATMega2560
- The “MP3 Sound Module”, enable actual voice prompts (in chosen language) at key points of the game, available in all game modes.
- With “voice in” enabled Walkie-Talkies broadcast to the entire game area!
- Laser Tag IR Module (Currently in Hardware Development) uses the "MilesTag II Data Protocol"
- Wireless modules
- Future Development
- Additional game modes to be developed
- using hardwareserial2 on ATMega2560
- Wireless Master
- Wireless Numbered Slave (Multiple slaves possible)
- Add 4 new game modes
- Area Domination
- Area Conquered
- Capture the Flag
- Pandemic (Virus transport)
- Future Development
- sw420 Module shock/vibration sensor. (Currently implimented in code but not recomending public release)
- Accelerometer
- Future Development
- possibly the MPU6050 i2c module to replace the sw420 Module
- Future Development
Currently 5 Game modes for FPS (Airsoft/Paintball/LaserTag)
- Search and Destroy
- Sabotage
- Armed!
- Domination
- Conquered
and 1 Game mode for Escape Rooms
- Escape Room
Search and Destroy
In this game mode the device acts as a bomb.
- When the "button" mode is used:
- The Red button Arms the bomb.
- The Green button Disarms the bomb.
- When the "Passcode" mode is used:
- The time for Passcode entry has a programable time limit.
- "A" is used to initialize the passcode entry to Arm the bomb.
- "D" is used to initialize the passcode entry to Disarm the bomb.
- You can set the length of the passcode to a value between 04 and 16 digits
- The "Passcode hint" system is available.
- Common for both "passcode" and "button" modes:
- The bomb can be armed and defused only once.
- The bomb has to be defended by the GREEN team for the duration of the Game Time.
- The attacking RED team’s objective is to arm the bomb and once it is armed, they must prevent the GREEN team from defusing it, until it detonates.
- There are three ways to finish the game.
- The Game time expires and the RED team was unsuccessful in placing and arming the bomb; the GREEN team wins.
- The RED team was successful in placing and arming the bomb, but unable to prevent the GREEN team from disarming it; The GREEN team wins.
- The RED team was successful in placing and arming the bomb, the GREEN team fails to disarm it and the bomb detonates; The RED team wins.
Sabotage
In this mode the device acts as a bomb.
- When the "button" mode is used:
- The Red button Arms the bomb.
- The Green button Disarms the bomb.
- When the "Passcode" mode is used:
- "A" is used to initialize the passcode entry to Arm the bomb.
- "D" is used to initialize the passcode entry to Disarm the bomb.
- You can set the length of the passcode to a value between 04 and 16 digits
- The "Passcode hint" system is available.
- Common for both "passcode" and "button" modes:
- The bomb can be armed and defused as many times as the game time allows.
- The bomb has to be defended by the GREEN team during Game Time.
- The attacking RED team’s objective is to arm the bomb and once armed must prevent the GREEN team from defusing it, until it detonates.
- There are two ways to finish the game.
- The Game time expires and the RED team was unsuccessful in placing and arming the bomb; the GREEN team wins.
- The RED team was successful in placing and arming the bomb, the GREEN team fails to disarm it and the bomb detonates; The RED team wins.
Armed!
In this mode the device acts as a planted bomb.
- When the "button" mode is used:
- The Green button Disarms bomb.
- When the "Passcode" mode is used:
- The time for Passcode entry has a programable time limit.
- "D" is used to initialize the passcode entry to Disarm the bomb.
- You ca set the length of the passcode to a value between 04 and 16 digits
- The "Passcode hint" system is available.
- Common for both "passcode" and "button" modes:
- The bomb starts armed with the countdown to detonation already triggered.
- There are two ways to finish the game.
- The bomb time expires and the GREEN team was unsuccessful in disarming the bomb, and the bomb detonates; The RED team wins.
- The GREEN team succeeds in disarming the bomb; The GREEN team wins.
Escape Room:
In this mode the device acts as a planted bomb and key safe.
- Only the "Passcode" mode is available:
- The time for Passcode entry has a programable time limit.
- "D" is used to initialize the passcode entry to Disarm the bomb.
- You ca set the length of the passcode to a value between 04 and 16 digits
- "hint" system is unavailable.
- "cutwire" module is unavailable.
- In this mode:
- The bomb starts armed with the countdown to detonation already triggered.
- There are two ways to finish the game.
- The bomb time expires and the GREEN team was unsuccessful in disarming the bomb, and the bomb detonates; Game Over.
- The GREEN team succeeds in disarming the bomb; The Key Box Opens.
Domination
In this mode the device acts as a base.
- Only the "button" mode is available
- The Red button Captures the zone for the RED Team.
- The Red button Neutralizes a GREEN zone.
- The Green button Captures the zone for the GREEN Team.
- The Green button Neutralizes a RED zone.
- This is a time limited game.
- When the game starts, the base is a Neutral (BLUE) Zone.
- The objective for both (GREEN and RED) teams is to capture the base.
- Once the base is captured, the controlling team’s time is displayed on screen.
- While the base is neutral no time is accumulated for either Red or Green teams.
- Game can be configured to Neutralize the Zone after a set time => forces teams to patrol the zone to keep control.
- When auto neutralize zone is enabled teams can recapture the zone to reset the auto neutralize time.
- The only way to win is:
- The team with the highest total time in control of the base wins.
Conquered
In this mode the device acts as a base.
- Only the "button" mode is available.
- The goal is to be in control of the base with a total Captured time equal to a specified time.
- The Red button Captures the zone for the RED Team.
- The Red button Neutralizes a GREEN zone.
- The Green button Captures the zone for the GREEN Team.
- The Green button Neutralizes a RED zone.
- This is a time limited game.
- When the game starts, the base is a Neutral (BLUE) Zone.
- The objective for both (GREEN and RED) teams is to capture the base.
- Once the base is captured, the controlling team’s time is displayed on screen.
- While the base is neutral no time is decreased for either Red or Green teams.
- Game can be configured to Neutralize the Zone after a set time => forces teams to patrol the zone to keep control.
- When auto neutralize zone is enabled teams can recapture the zone to reset the auto neutralize time.
- The only way to win is:
- The team that has a total time in control of the base equal to the specified time wins.
How to play
To go through the menus press “A” for up and “B” for down.
To select a Menu item on screen press “D”.
Language Menu
Set the language that will be displayed on screen.
The chosen language will become the default displayed language.
The following languages can be selected:
- English
- Francais (French)
- Espanol (Spanish)
- Portugues (Portuguese)
- Deutsche (German)
Game Mode Selection
Select one of the games to start the game configuration menu.
- Search and Destroy
- Sabotage
- Armed!
- Domination
- Conquered
- Escape Room
Game Configuration
The game configuration menu will only display items relevant to the chosen game mode.
If any modules have been installed and the game mode supports the device, you will be able to configure it through the menu.
Game Time HH:MM
This is to set the approximate maximum time that the game can last.
- The game ends sooner if the bomb detonates.
- If the bomb is armed with less time left than the “Bomb Time”then the game will continue until:
- The bomb explodes.
- The bomb is disarmed.
Time is programmable to a maximum of 99 hours and 99 minutes (100 hours and 39 minutes). Once the game is started, the remaining minutes and seconds will be displayed on the LCD. For example, with a 3 hour game, the remaining time will be 180 minutes.
To set the time use the corresponding keypad numbers. To program a 45 minute game, press 0 0 4 5 and “D” to save the time or “C” to cancel and reset the game time.
Bomb Time HH:MM
This is the time that must elapse from the moment the bomb is armed until it detonates. It is configured the same way as the game time. For the “ARMED!” and "Escape Room" game modes this is the game time.
Passcode
You can select to use a passcode to arm or disarm the bomb.
Set passcode
Use the numeric keypad to set the passcode used to arm or disarm the bomb. Once set you will be prompted to re-enter the passcode to confirm it.
Passcode Hints
You will be given the option to display passcode hints. The hints will be displayed at the bottom of the screen when you are in Arming or Disarming mode.
Arming Time
This is the required time to keep the button pressed to arm or disarm the bomb.
If the passcode option was selected it is the amount of time you have to enter the passcode.
Sound
Enable or disable the sound in the game.
Relay Enable
Enable or disable the relay module without having to physical remove the module.
Cutwire
Its function is to force the bomb to be deactivated by cutting one of the 4 wires. If this function is active and one of the cables is not correctly connected before starting the game, there will be a warning to verify the connection.
Each of the 4 cables can are automaticaly set with one of the 3 available functions
The available functions are the following:
-
"Explode"function: The bomb detonates once the cable has been cut.
-
"Disarm"function: The bomb is deactivated once the cable has been cut.
-
"Nothing"function: Cutting the cable has no effect on the bomb.
Settings Menu
Mode to check all the systems of the simulator.
- 2C Device List
- Sound Test
- Relay Test
- Input Test
- Cutwire Test
- LED Test
- Set Relay Time
- Set Start Delay Time
Development Notes Things To Test
-
[ ] Quick Game Menus
-
[ ] DTMF (Telephone Keypad Sound) funtion requires Shield version 1.2+
Domination game mode
- Reset Auto-Neutralize timer from last captured button press
- Red/Green buttons Blink when in control of zone (requires hardware v1.2+, Hardware v1.1 is always on)
- Winning Team’s Button lights up at end of game (requires hardware v1.2+, Hardware v1.1 is always on)
Sound with YX5300 => use hardwareSerial for ATMEGA2650
- Currently only available under "settings => test sound"
- Set Volume Level integrated into settings menu
Cutwire Module
- RandomWireGen optimized code, now sets the following variables
- wireDisarm
- wireExplode
- wireFaster => "timeMultiplier = 2" variable to increase game clock to double the speed
- wireSlower => "Nothing"
- use variable to change game timer speed
"currentMillis = ((millis() - startMillis) * timeMultiplier );"
Added pins to control the Button LEDs
- Requires FPS-Bomb-Mega-Shield-v1.2+ shield changed to reflect changes
Board ID
- Variables and Function created shieldVersion Value
Escape Room game mode
- Added servo for Escape Room gamemode (Servo will unlock a box holding a key, Used for "Escape Rooms")
- replaced display names
"Green team" ==> "Captives"
"Red team" ==> "Jailers"
- Code created for IR pulse (Explode Player), integrated menu code to enable option
To Do
Due to Program space using ATmega2650 to add the remaining options:
- Add settings for each Game Mode that are accessible at boot time
- Test each quick game
-
[ ] MP3 Sound Module
- Create function
- Integrate into game modes.
- Create sound files for different languages
FPS Bomb Simulator Board v1.2+
- Add Servo Key Box for Escape Room game mode
- LaserTag Module
- Create hardware changes Driving IR from Arduino pin
- Create 2nd separate board for Pro edition
- Move Wireless Module to 2nd separate board
- Wireless LoRa modules, "E32 915T20D" => up to 3km, "E32 915T30D" => up to 8km
- Wireless Master
- Wireless Numbered Slave
- Multi Slave to Master
- Add 3 game modes for wireless play:
- Area Domination
- Capture the Flag
- Epidemic
- Move SPI GLCD Module to 2nd separate board
- 12864 Graphic LCD Module
- Support for non-English characters
- Move Wireless Module to 2nd separate board
- Add difficulty must press a button to activate arm/disarm button?? Reqires major hardware modifications.
- Accelerometer MPU6050 i2c module to replace sw420 vibration sensor
- Add GPS?? to enable finding the device
BUGs
- Green LED always on juring game play, changed pins fixed issue
- Static sound on tonePin2 pin
- Change VibrationSensor Pin
Notes
-
http://www.coldtears-electronics.com/images/PT2257-1.jpg
|----._.----| 10uF+ 1 -| Lin Rin |- 8 +10uF 10uF+ 2 -| Lout Rout |- 7 +10uF GND 3 -| Gnd V+ |- 6 .1uF +47uF 5VDC SDA 4 -| SDA SCL |- 5 SCL |-----------|
-
Control LCD backlight
-
https://e-radionica.com/en/blog/hum-digital-potentiometer-10k/
-
MCP4018 I2C 10KOhm 128 steps
What’s left on the project (as of 2020/08/27):
- Finish testing the source code (currently v1.94)
- Add Feature Request Game Modes
- Single Device Game Modes
- Multi-Device Game Modes
- ReDesign and print circuit board then sent to China for fabrication
- Required to use all available functionality of the device (version 1.2)
- Build the actual device using PCB
- Currently working with PCB version 1.1
- Build with new PCB version 1.2
- Install and calibrate system
- See BUGs for current issues
- Come up with a cooler name for this than "FPS Bomb Simulator"
- Write and publish instructables page
- Make a youtube video to demonstrate this project