Inspiration

The idea for Bugsweeper Adventure came from my desire to create a fun and engaging way for developers to take a break from work while still staying connected to their tasks within Jira. I was inspired by the classic minesweeper game and wanted to adapt its gameplay mechanics to fit within the context of a Jira project. My goal was to create a game that would be both entertaining and beneficial for developers, helping them to improve their problem-solving skills and motivate them to return to work by allowing them to refill their lives by completing tasks within Jira.

What it does

Bugsweeper Adventure is a Jira-themed version of the classic minesweeper game, with 100 levels of increasing difficulty. Players must navigate the board and sweep away bugs to progress through the levels, using strategy and problem-solving skills to avoid producing bugs. The game features a lives system, where players start with three lives and can refill their lives by completing tasks within Jira. Each level becomes progressively more difficult, with more bugs appearing on the board and the board size increasing as players progress through the game. Players can show off their progress to their colleagues by displaying their current level in any Jira issue they are working on. The levels are grouped into five segments. Completing a segment will earn you a badge, which will also be shown in issues you work on. Bugsweeper Adventure saves all of your progress on your Jira instance for maximum privacy. On top of that, even your current board's state is persistent, meaning you can easily jump back to work and complete the current board (level) at a later time.

Feature Overview

  • 100 levels of increasing difficulty
    • The levels start of easy but ramp up in difficulty quickly. This makes the game accessible for players of different skill levels
    • New levels can easily be added in coming releases
    • Add flags using shift+click
  • A fun and addictive gameplay formula:
    • Store up to three lives
    • Tapping on a bug in-game will lose you a life, at zero lives you can no longer play the game
    • Re-fill your lives by completing Jira issues
    • This ensures a balance between work and play
    • A progression system of 100 levels and different collectables keeps the game exciting
  • Your progress is stored on your Jira instance
    • No external data sources, privacy first
    • Board progress is saved, come back at any time
  • Show off your progress
    • Each level earns you a new, unique title
    • Complete a segment of levels (5 total) to earn a new unique badge
    • Let your co-workers see your Bugsweeper skills in an issue glance
    • Because your level of progress is only displayed for an issue if you're the reporter or assignee of that issue, it's another great way to motivate users to take on work within Jira
  • Dark mode support (No chess patterns :))
  • No unlucky first move: The game ensures that your first move will never result in running into a bug.

How I built it

jira:globalPage and forge context

The globalPage module is the entry point for the level selection as well as the core gameplay. A custom UI based on react was built for the level overview map as well as the game itself. React-router was used not only to navigate between the views (level overview and game) on the global page but also to route between the individual modules on the app level, based on the module from the forge context.

Modals

The forge custom UI modals are used to display if the game has been won or lost and link to the main screen. This is linked to the forge backend's game state that determines if a game is still in progress or has been won/lost.

jira:issueGlance

The issue glance is the way for users to show off their progress in Bugsweeper Adventure to their co-workers. It receives the issues information from the issue API and connects it to the profile information from Bugsweeper in a combination with the User information from the user API.

trigger events

The avi:jira:updated:issue event is used, so that when an issue is updated and set to done, the assigned user gains another live in Bugsweeper Adventure. This live is persisted in Bugsweepers profile information in the storage API.

Storage API

The entire progress of each user in Bugsweeper Adventure is stored in the storage API. This includes the current level, the lives, and the current board. All moves on the current board are validated in a forge function and the board's state is stored in the Storage API (source of truth), which makes cheating impossible. This also makes the game asynchronous, requiring the frontend to sync with the forge functions for every move.

Other APIs

  • rest/api/3/issue to receive the issue's reporter and assignee in the issue glance. This data is combined with the profile information from Bugsweeper Adventure to show off the user's current level
  • /rest/api/3/user is also used within the issue glance to get the user's display name to show it in combination with their Bugsweeper level

Challenges I ran into

I found that the serverless functions were a bit slow, especially when used in combination with the storage API. This made it challenging to create a smooth and seamless gameplay experience for users, as the entire game state is calculated on the backend to prevent players from cheating.

Another challenge I faced was creating a visually appealing level-selection map. The jira:globalPage module iframe cannot be limited in size to fit the entire screen, which made it difficult to implement features such as scrolling to the current level and a sticky UI. This would be possible in connect, as global pages can have exactly 100% of the viewport and scrolling can therefore be done within the iframe itself. I've created a forge feedback issue for this.

The forge CLI has matured quite a bit compared to the last hackathon, however, it's still a long way to go before it feels stable. Especially the tunnel keeps crashing regularly and requires the entire docker container to be restarted.

Despite these challenges, I was able to find creative solutions and work around these limitations to bring Bugsweeper Adventure to fruition.

What I've learned

It was great to finally get the chance to create a Jira app in forge, as I've only had experience with Confluence so far. Forge for Jira is much more mature and pleasant to use. I hope that in the future there will be parity for most modules and features in forge between the two apps.

It was also great to discover new ways to make work fun. Bugsweeper Adventure uses a proven way of limiting the playtime of the actual game by limiting your total lives to three. It's the perfect game to play during your slack time and after some time it will make you want to go back to work, either to re-fill your lives by completing issues, or by taking on issues to be able to show off your Bugsweeper level in the issue you're working on to your colleagues.

What's next for Bugsweeper Adventure

There are a number of exciting plans in the works for the future of Bugsweeper Adventure. Some ideas I have include adding more levels and rewards to the game, creating a leaderboard to allow players to compete with friends and colleagues, introducing consumable items such as "glasses" that allow players to view the revealed board for a brief period of time, and releasing the app on the Atlassian Marketplace. I also plan to "dogfood" the app internally in my organization. I believe that these updates and enhancements will help to make Bugsweeper Adventure an even more enjoyable and engaging experience for players.

Built With

Share this project:

Updates