Skip to content

pedrocoutinhosilva/shiny.decisions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shiny.decisions

A game about making the best of terrible choices

In shiny decisions your goal is to last as long as possible while making decisions that affect the wealth, population and environment quality in the world.

If any of those metrics reaches zero, its game over! How long can you last?

Live version: https://sparktuga.shinyapps.io/ShinyDecisions/

Screenshot


Installation

Some of the packages included in this project are currently only available on github. This includes shiny.grid and shiny.blank. To install them locally remember to run on your machine the following commands:

library(devtools)
install.packages(devtools)
devtools::install_github('pedrocoutinhosilva/shiny.grid')
devtools::install_github('pedrocoutinhosilva/shiny.blank')

Starting a game

From the start game screen you will be able to start a new in any difficulty (Easy, medium or hard). Game start

You can also toggle the tutorial on and of if you already know the basics of the game. Tutorial


During the game

The game UI has 3 main areas:

Metrics

Displays the current value of the different metrics you need to manage. Those metrics include:

  • Karma: Being too bad or too good wont lose you the game, but might have some hidden effects...
  • Wealth: Things cost money. No money no fun :/
  • Public opinion: If no one likes you, you probably wont last long in power!
  • Environment: If the world is beyond saving, whats the point?

The game metrics: Metrics

The karma meter:
karma

Map

A visual representation of what effects your actions are having in the world. Icons and the map color with change depending on how high or low some metrics are.

Low metrics:
map-low

High metrics:
map-high

current task

Your next task and the way you can move forward in the game. Above the task you can also see the current week in game. Every task you complete will move the game forward 1 week. current-task

Card colors reflect the card pool and severity of the current card. The darker the card the more severe the task is, and more change it will have on the metrics. Currently 3 cards pools are implemented:

Bad cards (Cards that will have mostly negative consequences, red background): card-bad

Good cards (Cards that will have mostly good consequences, green background): card-good

Special cards (Cards that will have unique consequences, purple background): card-special

If you want to know more about all the possible cards and options available, you can check the google spreadsheet containing all possibilities at:
https://docs.google.com/spreadsheets/d/1LwIPKAxbKvuGyMKktcTVuYZbTda0WMQxmNMhxqaQhGg

Card stack

Each task as 2 possible decisions, left or right. Simply drag and hold the card to each side to see what decisions you can take. while holding the card the names of the metrics that will be affected by that decision will also blink. Drag and release to commit to your decision. card-choice

Game end

when one of the metrics reaches zero, the game is over and you will be taken to the end game screen. Here you can see how many weeks you lasted, as well as return to the initial screen in case you want to go again. gameover


Code Structure

Shiny.decisions takes full advantage of modules and R6 classes for managing the code complexity. Most of the project is broken down into R6 managers that take care of specific parts of the workflow:

Game Manager

The brain being the game flow. It manages all game dependencies and is responsible for high level actions that drive the state of the game.

Data Manager

Connects and exposes all external data required by the app. This includes the main data storage regarding task cards, game options and game modes loaded from a google spreadsheet.

Most options and cards can be added or tweaked without code changes directly on the spreadsheets.

The current live spreadsheet can be found at: https://docs.google.com/spreadsheets/d/1LwIPKAxbKvuGyMKktcTVuYZbTda0WMQxmNMhxqaQhGg

State Manager

Stores information regarding the current state of the game. This includes the current value of the different metrics, map markers and state checks for specific game phases.

Metrics Manager

Responsible for displaying the current state metrics on the UI.

Map Manager

Responsible for displaying map information according to the the current state metrics on the UI.

Deck Manager

Responsible for creating cards according to the game state and switching between card pools depending on the current game phase.


Future improvements

A lot of ideas are still floating around on how to improve this application:

  • Leader board;
  • More cards!;
  • Special game modes with different decks and objectives;
  • Map interactions;
  • Power up modifiers;

Got any more ideas, questions or feedback? Feel free to get in touch!


Links

Useful references

Assets

Dependencies

Data

About

A game about making the best of terrible choices

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published