deminR: a minesweeper for R - 2020 Shiny Contest Submission

deminR

Authors: David Granjon, Gabrielle Devaux
Working with Shiny more than 1 year

Abstract: {deminR} is the R version of the Minesweeper, a pleasant puzzle game available on mobile and desktop.

Full Description: Welcome to deminR, the R version of the Minesweeper. The goal is simple : flag all the mines as quick as possible by clicking on the grid. While this app is optimized for mobile use, it also works on desktop. Note that since the right click on desktop platforms is replaced by a long press for mobiles which takes more time, scores are categorized by devices. As soon as you click on a mine, the game is immediately lost. You may reset the game at any time when the timer is on by clicking on the option button in the navigation bar. After a success, the score may be shared on twitter (as long as you have a twitter account).

Before going further, we strongly recommend you to play on a mobile platform to get the best of this app!

Game options

The game currently has 3 difficulty levels: beginner, intermediate and expert. There is a fourth mode, namely the warrior mode, which significantly increases the challenge. A chat is included so that people may share their experience.

Global color theme

Finally, you can change the global theme from dark (default) to light and inversely.

Make it full screen?

If you are on mobile, you can make the app full screen with the following steps (iOS, ipadOS):

For Android devices, it is recommended to use Chrome and the process is similar. (Note that Chrome for iOS does not support the add to homescreen feature.)

If for any reason the app crashes, you may kill it like a classic mobile app and restart.

We wish you a lot of fun!

Technical details

Installation

You can install the devel version of deminR from github with:

remotes::install_github("DivadNojnarg/deminR")

Database

deminR is linked to a Postgres database containing (at the moment) 2 tables:

  • scores
  • messages for the chat

To create the scores table, one might use:

CREATE TABLE scores (
  nickname varchar NOT NULL,
  difficulty varchar (25) check (difficulty in ('Beginner', 'Intermediate', 'Advanced')),
  score float (2) NOT NULL,
  date varchar NOT NULL,
  device varchar NOT NULL
);

and similarly for the messages table:

CREATE TABLE messages (
  nickname varchar NOT NULL,
  message varchar NOT NULL,
  date varchar NOT NULL
);

INSERT INTO messages (nickname, message, date) VALUES ('bobby', 'My amazing message', '2020-03-04');

Testing

We decided to apply the "integration testing" feature from Shiny (dev version) to validate each module individually. More here. In practice, we sometimes experienced technical issues but this is a promising tool for Shiny.

Packages

  • The package structure was made with Golem
  • The package UI is powered by shinyMobile
  • The smileys used in the help section were created by Conmongt

Category: Other
Keywords: game, mobile, chat, e-sport, database
Shiny app: deminR
Repo: GitHub - DivadNojnarg/deminR: A minesweeper for R!
RStudio Cloud: Posit Cloud

Thumbnail:
image

Full image:

10 Likes

Hi @EconomiCurtis! Would it be possible to update Gabrielle’s rights so that she can edit her post? Thanks!

As a group effort, I made this a wiki and as requested upped Gabrielle Devaux's trust level to be able to edit it.

1 Like