Inspiration

When brainstorming ideas for our project, we realized that as identity theft and fraud become growing threats, cybersecurity and digital security become more critical. Therefore, we decided to go about teaching people of all knowledge levels and ages about cybersecurity and how to maximize one's digital security, in the friendly and familiar medium of a game.

What it does

Our project, ArmDuel, allows users to create and join 1-versus-1 games where they will each attempt to win the game by answering questions relating to cybersecurity faster than their opponent. When the game gets to a point where one person has answered three more questions correct than their opponent, they win and their opponent loses.

Pipeline

**Starting program and hosting games Both users start their client programs, and one user starts their server program. The server program lets the user hosting the game easily initialize websocket connections and connect to our hardware ESP32 microcontroller.

Because the ESP32 only allows one computer to send commands at a time, this server script becomes useful by relaying commands from the other competing computer to the ESP32. After a user has booted up their client program, they are then met with a screen prompting them to first enter their name then host a game or join one with a code. When someone hosts a game, they are given a six-character hexadecimal code that the other player can use to join the same lobby.

Game, score, and the ESP32 When the player joins the existing lobby, there is a countdown then the game starts. The game is physically shown as an arm wrestling game with the use of electronics and an ESP32 microcontroller. If one user has more correct questions than another user, the arms tip towards the losing player's side, until eventually one user has 3 more correct questions and the arms are on one side completely, at which point someone wins.

**Post-game analysis After the game has finished, both users get an AI-generated analysis on what their weak points were (topics on which they answered questions incorrectly). Resources, recommendations to check other sources, etc. are given in the analysis to further inform the person about cybersecurity.

How we built it

Here are the main technologies we used to build it We built this using several technologies:

  • Python: we used Python because of its ease in connecting to several other services and editing them to fit our application needs.
  • C++: we used C++ to create the program for our ESP32 as it is programmed very similarly to an Arduino.
  • ESP32: we used an ESP32 microcontroller to handle all of our inputs, and its Wi-Fi connection capabilities came in handy a lot. We used it to create the physical visual effects surrounding our game as well as control the main servo function.
  • Websockets: we used websockets to enable high-speed communication through events on different computers, to sidestep the cons of using MongoDB Atlas, specifically that relatigng to speed.
  • MongoDB: we used MongoDB to do many things. First, it would store all of the questions we were using in the games, as well as their correct answers. Next, we would be using it to store basic information on the users such as their username and the score associated wth their account. Finally, we used it to temporarily store room codes to allow users to connect to each other's rooms. We created each entry in this collection with an expiry time of 180 seconds so users would have a 3 minute limit to join.

Challenges we ran into

The main challenge that we ran into was that we had minimal experience in the ideas and technologies that we were researching. For example, using the ESP32's wifi capabilities proved to be challenging, as we ran into os barriers, software barriers, and even after, setting up dual connectivity for the game to be played from 2 different computers was its own project itself. Countless times during the project we would rewrite or misinterpret some of the integral logic that we had planned out, confusing ourselves. On top of that, C++ for hardware proved to be quite different than our expectations. A lot of times there would be wiring issues due to some code or vice versa, taking up a lot of our time to resolve and coordinate. Nevertheless, after 2 sleepless night's we enjoyed the thrill of tackling these challenges with our goal in mind.

Accomplishments that we're proud of

Were mainly proud of two different things, setting up the ESP32 hardware components and circuitry, as well as successfully implementing dual connectivity to actually emulate a realtime 1v1 experience wirelessly. The combination of these two feats resulted in a final product that we're proud of and would love to present to others, once again reminding us of the hardwork that went into it.

What we learned

We learned that Dollarama prices add up faster than expected, also gaining a huge amount of knowledge of the workings of ESP32

What's next for ArmDuel

The next step for ArmDuel is to effectively dockerize the app and make a more stable configuration of the hardware. We believe that the current prototype is a great beginning, but we want to take it farther than the beginning!

Built With

Share this project:

Updates