Shark Attack: Clean the Ocean
Authors: Marcin Dubel
Abstract: The ocean is the origin and the engine of all life on this planet — and it is under threat. The game goal is to spread the awareness of the environmental issues via enjoyable way. The user will try to collect as much trash as possible while avoiding sharks.
Full Description:
Goal
The ocean is the origin and the engine of all life on this planet — and it is under threat. The game goal is to spread the awareness of the environmental issues via enjoyable way. In the game the user (as a diver) will have one minute to collect as much trash as possible while avoiding sharks (on different difficulty levels). The detailed tutorial is presented in the game main menu.
Technical details
The app structure is based on shiny.fluent framework alongside the wahani/modules and the R6 classes. You can recreate the application environment locally with the renv::restore command.
The application uses {googlesheets4} package for keeping the global leaderboard (permament storage). Let's check who collects the most trash!
UI
Application UI is a single screen view, with additional modules for presenting game start and game end modals. The main view is build on top of css grid functionality. The objects displayed on the UI are the background-images for each single grid cell. Moving with the diver on the grid is based on the JavaScript key-capture. Other moving objects are based on randomly generated direction with the JS interval.
Keywords: environment, game, sharks, ocean, pollution
Shiny app: https://mdubel.shinyapps.io/shark-attack/
Repo: GitHub - mdubel/shark-attack: RStudio Shiny Contest 2021 Grand Prize Winner application. Game created in Shiny that increases environmental threats awerness.
RStudio Cloud: Posit Cloud
Thumbnail:
Full image: