Inspiration

We had two sources of inspiration. In the trivia game Gimkit, a team works together to collect money and build structures to avoid the rising lava and last for the longest time. Additionally, in the Netflix show, The Floor Is Lava, teams navigate rooms that are flooded with lava. The team to do so in the fastest time wins. Since we wanted to make a discord bot that is both fun and productive, we took these sources and remodeled the classic game to build our own discord trivia game.

What it does

Our project is LavaRush. This is a time-based challenge, where the player standing for the longest period of time wins. After someone uses the start command, players from the server can join the game through the discord bot. When the game starts, users are individually asked questions about Science and Nature. Answering a question correctly allows a player to progress further from the lava, but answering incorrectly makes players wait for a set amount. The amount of progress made and the penalty change based on the question difficulty. The lava is ever-rising and as time goes on, the lava rises faster. The wait amount and the rate of the lava rising can be set by the user at the start of the game, or they can use the default values. When players come into contact with the lava they are eliminated. The game continues until the last player is eliminated; then, a leaderboard shows the final places and stats from the game.

How we built it

We needed to first figure out what library we were going to use for the bot. In the end, we decided to use nextcord. Nextcord was a python discord library that made creating buttons and slash commands easier. Once we decided on a library we were going to use we focused on figuring out how to organize the structure. We created multiple python files to manage different aspects of the code and have the main file run each section. We also split the functions of the actual game into different sections depending on the progress of the game. For example, the code is split into start_game, ask_question, game_statistics and end_game. Both these choices improved modularity. Also, we created a class to store game data in a readable and easily accessible format.

Challenges we ran into

We ran into challenges of managing the code complexity, making the bot work on multiple servers, time restrictions, and school work. The code requires the use of python, with a library called nexcord. We have only been coding for the last few months and were introduced to coding by AP Computer Science Principles. We’ve had little experience coding with this highly technical library before, so we had to learn about nexcord before we could create our code. We had to learn how to reference the nextcord documentation. Next, we had to learn how to shrink the scale of our project. We originally had many features planned for the bot, but we were time constrained because we had schoolwork and our school Homecoming. We learned how to write code efficiently to include features in the time we had. Making the bot work on multiple servers was also another challenge we had to deal with. We could not use global variables because we wanted the bot to work on multiple servers simultaneously, so created a game class storing all of our variables, and whenever we started a game on a server; we linked that server’s id to its very own game class. Overall we had to deal with many challenges before the actual final product you see here today was created.

Accomplishments that we're proud of

Since we are just getting started as new programmers, we are proud of creating the code for a working discord bot during the time period of one hackathon. We are also so happy we got the majority of the features we wanted before the competition ended. We also proud we made the code modular which opens up the opportunity to add more features.

What we learned

We learned to appreciate the effort that developers put into their projects. Even a simple project can take hundreds of lines of code. We also learned to work as a team, and collaborate efficiently.

What's next for LavaRush

There are possible improvements, making the game more complex. For example, the addition of powerups can elevate gameplay. Also, our current version of the game is non-team-based. We will be expanding this to multiplayer and potentially co-op versions. Other minor improvements like improving the leaderboard visualization or the appearance of the bot in general. We can't wait to release these updates.

Built With

Share this project:

Updates