coltonw / sensors-are-down

:alien: Alexa game involving space combat using some simple card game mechanics
0 stars 0 forks source link

Sensors are down!

This is an Alexa game involving space combat using some simple card game mechanics.

It is build using the Serverless Framework to deploy and Amazon Alexa for the platform.

Setting up

Go through the first few steps of setting up an Alexa skill:

Create your config/local.yaml file:

Install Serverless and Deploy to AWS!

Testing

On the Test page of the Amazon Developer Console, you can mess around a bit but it does not allow a dialogue, so you'll need to test on an actual Alexa device (or you can test on another Alexa Voice Service integration, such as the Ubi App for Android).

If your Amazon Developer account uses the same email address as the Amazon account your Alexa device is registered to, and the "Enabled" toggle on the skill's Test page is turned on, the skill should already be available on your device. You can find it on the Your Skills list of the Alexa app.

If you used a different email address for your Amazon Developer account, follow the steps to register your Alexa device with that account.

Game Flow

Player perspective

Choose attack -> Hear opponent's attack -> Choose defense
^                                           │
│                                           v
└── If game continues <- Hear result of all combat -> If victory or defeat,
                                                      hear end of game info

Engine perspective

  1. Give player two attack choices. Choices are from the player's deck and have offense === true
  2. Player chooses attack action
  3. Choose opponent's attack (randomly for now)
  4. Speak opponent's attack to player and give player two defense choices. Choices are from the player's deck and have defense === true and ship or planet === opponent's attack ship or planet and opponent cards in play on the ship or planet. If opponent cards in play and offensive choice cover both planet and ship, defense choices are always one planet defense option one ship defense option.
  5. Player chooses defense action
  6. Calculate if victory has occurred, if victory or defeat, skip to 10
  7. Calculate combat results. See next section.
  8. Give player important combat results
  9. ^ Back to 1 ^
  10. Give player end of game info

Combat mechanics