Skip to content

An asynchronous version of Corellian Spike Sabacc

License

Notifications You must be signed in to change notification settings

compycore/sabacc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sabacc

Build Status Go Report Card Man Hours

In Disney's newly-opened Star Wars: Galaxy's Edge lands, you can buy a deck of Sabacc playing cards that comes with rules for the Corellian Spike version of play. Over Christmas break, Jesse Millar became obsessed with playing Sabacc with his brothers and was quite disappointed when he could no longer play the game in person at the end of the holiday. This repo represents an attempt at creating a digital version of Sabacc so that people can play with each other regardless of distance or time commitments.

There were a few goals for this project:

  • Asynchronous play to allow for a lack of time constraint (e.g. play casually throughout the day)
  • Not require money to play or maintain (use free hosting and deployment technologies)

Deploy

There are a few easy steps to follow if you want to deploy your own copy of Sabacc:

  1. Sign up for one or more free email API accounts from the list below and note down your API key(s)

  2. Deploy to Heroku using the button below (fill in the environment variables section on the Heroku site with the API keys you obtained above)

    Deploy

How to Play

  1. Navigate to the static UI in your browser
  2. Enter email addresses for the players you want to play with
  3. Wait for an email notification that it's your turn

Develop

If you want to deploy a copy of Sabacc without using Heroku or if you want to develop locally, you'll need to set the following environment variables:

// The port the Sabacc HTTP server listens on
export PORT="8080"
// The location of the HTML UI (either leave as the default or set to your own value)
export SABACC_UI_HREF="https://compycore.com/sabacc/"

You'll need to choose at least one supported email API provider and provide API key details:

// The public API key you got from Mailjet
export MAILJET_API_KEY_PUBLIC="..."
// The private API key you got from Mailjet
export MAILJET_API_KEY_PRIVATE="..."

// The API key you got from SendGrid
export SENDGRID_API_KEY="..."

Optional environment variables are defined below:

// Used to disable the sending of emails (only use when testing)
export SABACC_DEBUG=true

Notes

General Notes

  • Everything happens via URL links that are emailed to participants. There are no accounts, databases, or "unnecessary" complexity. The game state is encoded as a URI parameter in each email that is sent which means there's nothing other than honesty stopping players from taking multiple turns, hijacking someone else's turn, or peeking at the cards in other players hands if they know how to use a browser debug console. We here at CompyCore are not concerned by this since it's quite easy to cheat in physical card games as well.

Repository Branches

master branch

The master branch contains the Golang microservice that runs on Heroku and orchestrates the game logic and the sending of notification emails.

gh-pages branch

The gh-pages branch has a simple, static-file UI hosted on GitHub Pages that allows players to take actions on their turn.

Credits

Art

All art in Sabacc is custom and drawn and animated with love by Jesse Millar.

Libraries