Inspiration

Disaster Bomb Game was heavily influenced by episode 502 of the popular Japanese manga/animated series Doraemon (ドラえもん), titled "Incident Bomb (ジケン爆弾)". In this episode, Doraemon, the cat-like robot from the future, sees his friend Nobita's incomplete diary with only a few repetitive lines that he is supposed to write for his summer vacation homework. Nobita complains that he has nothing to write in his diary and asks if he has something fascinating and interesting to write in his diary. Doraemon later takes out "Incident Bomb", which is a futuristic technology gadget that tells him about future incidents that are scheduled to happen. The bomb has a red and a blue cord attached to it. Nobita is also given a scissor to cut the correct cord within a given time frame. If he cuts the correct cord (bomb fuse), he can avoid the incident by coincidence. If not, the bomb will explode, and the predicted incident is guaranteed to happen. When Nobita presses the button to activate the bomb, he is warned with the first incident, "In 30 seconds, your mother will be mad at you". As a kid who is frequently afraid of his mother, he is put into a difficult situation where he has to cut the correct cord without knowing which cord is correct. After he cuts the correct cord randomly, he avoids being scolded by his mom for his poor test scores. The bomb then keeps following Nobita and tasking him with a series of incidents, and he has to keep cutting the correct bomb fuse to either avoid or accept the incidents by fate until the end of the day. I have watched this episode and learned the logic and functions of the bomb gadget that the two main protagonists use in this episode and tried to implement them for my game.

What it does

This game is the online version of the "Incident Bomb" in Doraemon. In this game, the player will play a role in the Bad End World, with multiple disasters can occur. The task is simple. The player will choose the correct colour of the bomb fuse/cord to cut to prevent the disaster from happening within 30 seconds. If, within 30 seconds, the player chooses the correct colour, the incident will be prevented. If the selected colour is incorrect or the player fails to select a colour within 30 seconds, the incident will occur as predicted.

There will be three sets initially for players to choose, a set of 10, 15, or 20 scenarios. The set of 10 scenarios will have two colours (red and green) for players to select. The sets of 15 and 20 will have three and four colours (red, green, yellow, and violet) for players to choose, respectively. The correct cord is unknown. For each set, the player has to pass at least 60% to win the game and "save the world". There will be a limited number of "helps" that help the players cut the correct bomb fuse and prevent the disaster scenarios in each set. I am also inspired by the neuroscientific games that I played during my job interview process when creating this game. This game genre is neuroscientific and is designed to train players' brains, decision-making, problem-solving skills, patience, passion, and persistence to prepare them to handle real-life situations with constraints and difficulties.

How I built it

I started by installing the Amazon Q extension for my Visual Studio Code Editor and authenticating my AWS identity in Visual Studio Code. The second step was implementing the game logic. The list of more than a hundred scenarios is stored in a separate file to be read and chosen randomly from the main program. After the game logic worked, the third step was implementing Amazon DynamoDB into my game. I started by installing the required libraries, boto3 and botocore. The database initially only saved items of two attributes: player ID and score. I had to manually create the table on AWS before allowing my game to store all player's data in my table. When DynamoDB works, I also utilized S3 in my game. S3 initially only saved player ID and score, and I also had to manually create the S3 bucket on AWS before allowing my game to store all player's data in my S3 bucket.

After both DynamoDB and S3 worked as expected, I designed the front-end or user interface of my game using Python's game development library, Pygame, to enhance the player's experience. I created the colours, buttons, shapes, message prompt screen, main game screen, etc., for my game and directed all outputs into the Pygame console instead of the VS Code console. I also allowed the players to use the computer mouse to play the game instead of inputting the answers using the keyboard. To enhance my game's scoring system, I added some functions to calculate each player's cumulative score and best score. The game calculates a cumulative score for every scenario and game set that the player passes and resets when the player loses a game set. The best score is initially updated when the player completes the first game set and then continuously updates with a higher cumulative score. I also enhanced DynamoDB and S3 to create the database table and the bucket themselves instead of having to make them on AWS manually.

Challenges I ran into

The most difficult challenge while working on this project was the syntax of Pygame and AWS services like Amazon S3 and DynamoDB, and since this is the first time I learned Pygame and AWS in Python programming. But with the assistance of Amazon Q Developer, I was able to learn from its error and code explanations and debugging sessions. I continued to make changes to my game the way I desired to complete my game as much as possible.

The current challenge in my game is the scoring system since sometimes it fails to retrieve and update the cumulative score and best score of players the way it is supposed to do. Throughout this project, Amazon Q Developer has helped me write debug statements in my game to track how the scores of players were verified, retrieved, and updated after each game set and helped me locate and understand where issues are better and fix them accordingly as much as possible.

Accomplishments

The game runs successfully. Almost every function works as expected. The score for each scenario is updated correctly. The criteria or conditions for winning or losing the game work well. The game can store, track, and process players' data correctly without any crashes.

What I learned

Throughout this project, I have gained more programming experience in a language that I barely used, like Python. I also gained game development skills with Pygame, and most significantly, I learned more about the usefulness of AWS tools like S3 and DynamoDB, which store, track, and process application data so developers can utilize them to solve problems that relate to multiple things like software and security. I will use all the knowledge and skills that I have obtained from this project to build more fascinating video games in the future.

What's next for Disaster Bomb Game

If possible, my next steps may be to deploy my game to a web game or a game application that will be accessible to everyone using tools like AWS Amplify Hosting or AWS Elastic Beanstalk if I have more time and resources to learn and utilize them. I also intend to integrate artificial intelligence (AI) to generate the prompts (scenarios) instead of reading scenarios stored in a separate file.

Share this project:

Updates