Skip to content

Artful-Angels/code-jam

Repository files navigation

BugSweeper logo

MIT License Linting Netlify status

A modern minesweeper game with totally no bugs.

BugSweeper is a multiplayer minesweeper game made for the Python Discord Summer Code Jam 9, with WebSockets as the technology and the theme "it's not a bug, it's a feature".

Table of contents

Preview

Note: this readme updates the images to match your system theme (dark or light mode), just like the website.

Lobby

Lobby demo

Active game

Active game demo

Commands list

Commands list demo

How to play?

Go to bugsweeper.godi.se and choose a nickname to get started!

  • Creating a game - Press "new game" to generate a new game code, which you can share with your friends
  • Joining a game - Enter the game code of an existing game (where no squares have been opened yet) and press JOIN
  • Taking a turn - Turns rotate between living players. You can only open one square per turn
  • Flagging - You can flag any closed squares by right clicking on them. Flags are only visible to you
  • Winning - Everyone who manages to survive until the board doesn't have any unopened non-mine squares win!
  • Losing - You will die under two circumstances:
    1. You click on a mine, which will then become visible to all other players
    2. Eliminated through the successful use of the winner command (see more below)!

Bugs

Bugs can be discovered through posting any of the following commands in the chat:

  • delete - Deletes the cover of a random square that is both closed and safe (thus opening it). Counts as a turn and can only be used 5 times per player
  • close - Closes all squares. Can only be used once in a game by a dead player
  • new - Gives a 1 in the number of players chance to give the player new life. Can only be used once per player (and if they're dead)
  • winner - Gives a variable chance to eliminate all other players (although they have a chance of coming back using "new"). The chance is 1 in twice the number of living players who haven't used the command. Can only be used once per player

The current list of commands can be found at bugsweeper.godi.se/commands

Dev installation

Using docker:

docker-compose up --build

Note: You need to have the desktop Docker app, download it from https://docs.docker.com/get-docker/

Technologies used

The application approximately follows the architecture described in this Miro board. The frameworks used are as follows:

  • Django Channels for the backend, allowing it to communicate over both HTTP and WebSockets
  • Redis for storing data
  • Docker as our main packaging system, which makes development OS-agnostic and simplified the setup process
  • Vue.js for the frontend