PROJECT 
SUMMARY
The Fukushima Simulation Game is from the perspective of the suicide squad that was set at the time of the Fukushima Daiichi Nuclear Disaster. It features a C++ text storyline that dictates the transition of the stages, narrates the history of the incident, and states the instructions for the player at each stage. 
I did the C++ stage where I built off the  Autocad Stage and created a chose-your-own adventure game with a twist. Using the map from the AutoCad stage, players had to quickly get from the emergency response building to the water pumps to cool down the nuclear reactors. The twist is that a fire occurs during the suicide squad's journey in which a mini-game starts.
WHAT DID I DO?
HOW TO PLAY?
HOW DID I CODE MY C++ STAGE?
MAP BASED PORTION
PREMISE: You just pieced together a pathway to get to the water pumps after the maps were destroyed during the earthquake + tsunami.
MISSION: Use cardinal directions from the AutoCad map to navigate to the red building.
FIRE MINI GAME

PREMISE: You encounter a fire on the way to the water pumps.

MISSION: YOU HAVE 30 SECONDS TO CLICK ON 10 RED BLOCKS WHILE AVOIDING THE BLUE BLOCKS. IF YOU HIT THE BLUE BLOCKS YOU HAVE TO CLICK ON 2 ADDITIONAL RED BLOCK. IF THE SCREEN TURNS BLUE, YOU HAVE SUCCEEDED

*Runs much more smoothly during game

FIRE GAME: HOW I DID IT
I downloaded the SFML graphics library and found a catalog of commands and tutorials online (cited below). I also have done something similar in javascript before.
1. I recomposed cmake to direct it to find sfml library in my files
2. Drawing rectangles
- seed random function for where on the x axis the rectangles are created
-render rectangles as vectors and generate their position randomly
-using for loop for them to increase their distance up the window incrementally 
-adjusted the speed of the blue rectangles to be twice as fast as red rectangle 
3.  EVENT: when mouse is clicked
 used the clock library to time the mini-game
used a counter to track the number of clicks on the rendered rectangles
 checked if it was in bounds within the red or blue rectangles
created if function for the number rectangles clicked in 25 seconds
- created different requirements depending on easy or hard mode
4. EVENT: window closes
-used thread library to delay the time before window closes so that the player could see the color of the screen the game turns

REFERENCES
https://www.geeksforgeeks.org/chrono-in-c/ 
https://www.softwaretestinghelp.com/cpp-sleep/#:~:text=Hello%20World%E2%80%9D%20string.-,Thread%20Sleep%20(sleep_for%20%26%20sleep_until),put%20a%20thread%20to%20sleep.&text=Description%3A%20The%20sleep_for%20()%20function,the%20specified%20time%20i.e.%20sleep_duration. 
  https://www.sfml-dev.org/tutorials/2.6/graphics-draw.php // to create rectangles 
https://www.sfml-dev.org/tutorials/2.6/compile-with-cmake.php // to download and compile cmake 
 https://www.sfml-dev.org/tutorials/2.6/window-events.php // to use keypress commands and creat events 
 https://www.sfml-dev.org/documentation/2.6.0/classsf_1_1Clock.php // understanding clock + tim

You may also like

Back to Top