The battle with bugs in the computer science field is something faced by newbies and professionals alike. So, we took this literally by creating a game where a player must “fight” common programming bugs and “kill” them all. From NullPointerException bugs to StackOverFlowError bugs, you must keep your wits about you and effectively use tools like breakpoints to defeat hordes of enemies until you fully debug the battlefield. This game is not only fun and challenging, but it will also teach new programmers some of the most common errors, exceptions, and bugs that exist while programming in Java and introduce them to key functions of a debugger.
Inspiration
As teaching assistants of a Java and C course at UMD, we often notice that students don’t like using the debugger to fix errors in their code. Most students don’t even know how to properly use a debugger and are afraid to learn, and so they will stick to inserting print statements. While this can be useful for easier assignments, using a debugger is often necessary for debugging projects that are more complex. Thus, we created the game “Debuggies” to illustrate the process of debugging in a fun, interactive manner. Through this game, we hope programming beginners will learn and recognize some common bugs in Java and see how useful and powerful a debugger can be.
What it does
Our game creates a fast-paced real-time environment where players must constantly keep their wits about them to survive. All the enemies that the player will encounter represent common programming errors, or bugs, with their power reflecting how severe the error is. The player can shoot at these bugs to defeat them, but will quickly realize that simply shooting cannot stop this never-ending horde, so they must learn how important tools such as breakpoints (given throughout the game as abilities) are in their survival. These tools require that players can quickly and accurately identify errors in real-world code examples, creating an interactive way to not only develop one’s debugging skills, but also compete with friends while doing so. With the non-stop onslaught of enemies and bullets alike, players must learn how each bug is characterized, how to identify them in real-world code, and how to do all of this on the fly - or else risk certain death.
How we built it
Our game was built using the Java programming language in the Eclipse IDE, with the Slick2D graphics library. This season, we opted to use Java, as its object-oriented design intuitively allows for the building of large-scale systems while remaining convenient to divide into various independent systems for efficient (and fairly conflict-free) development. Everyone in our group was also familiar with Java coming into Bitcamp, giving us more time to challenge ourselves to build something we’ve never built before.
To streamline our workflow, we used GitHub source control, and broke our project down into multiple independent systems that each of us could work on. This way, everyone could contribute equally while minimizing conflicts of code to allow for more efficient development. Throughout the course of our development we also heavily emphasized close collaboration so that everyone’s opinions could be taken into account before making any major decisions.
Challenges we ran into
Building a real-time game created a myriad of challenges, which began presenting themselves to us as early as a few hours into our development. As programmers who are not too familiar with game development, we had to go through a lot of trial and error, and many of our original systems (input, physics, rendering) had to be revised or overhauled as our project progressed and its needs became increasingly more complex.
One notable example of this was with our physics engine. As the number of objects in our game increased into the hundreds, we found that our physics handler was not efficient enough to check for collisions in real-time. This forced a rewrite of our physics system from scratch, which took a lot of time.
Accomplishments that we're proud of
Our solutions to the needs of a real-time game are certainly not perfect, but they served as a wonderful introduction to these complexities that often go unnoticed. Being able to create a fully functional game together was an incredibly rewarding experience, and seeing our visions come together into a single fun yet practical product has been inspiring.
As a team, we’ve always wanted to build a complete game together, and we’re happy that we were able to see our vision come true at Bitcamp 2024.
What we learned
From working on this project, we’ve learned the important role planning plays in ensuring a smooth development process. During this hackathon, we took the liberty of planning a basic class structure for our program before starting to code, and we found that this led to fewer conflicts and the need for refactoring later. Had we not agreed on some sort of architecture before coding our program, our code certainly would have been a lot more disorganized and harder to work with.
We’ve also seen firsthand the importance of efficient algorithms. We know that inefficient algorithms take more time, but in the context of our program, these inefficiencies significantly influenced the rendering of our program. While developing our application, we’ve had multiple instances where we could visually see faster and more consistent results when we used more optimized algorithms.
What's next for Debuggies
After Bitcamp, we plan to add more content to Debuggies! Our work here has only just begun, and while we have some basic enemies, there’s a ton of potential for this game, both in terms of gameplay and educational value. For now, we plan to add more examples of code snippets and increase our variety of bugs. This will add more complexity to our game, making every playthrough more unique, while also giving players more information to learn from.
We also plan on expanding the game’s functionality by introducing different difficulty levels and connecting the game to a database so that high scores can be stored to encourage friendly competition between friends.
Log in or sign up for Devpost to join the conversation.