shinyphaser
June 26, 2026 ยท View on GitHub
This package provides an R Shiny interface to selected features of the Phaser 3 game framework.
What you can do with shinyphaser
With the current API, you can build small-to-medium 2D game-like interactions in Shiny, including:
- ๐ฎ creating a game canvas in your Shiny UI,
- ๐งฉ adding images and animated sprites,
- โจ๏ธ attaching keyboard-based player controls,
- ๐ฅ defining overlap and collision rules between objects,
- ๐ reacting to game events from R server logic.
Installation
Install the stable release from CRAN:
install.packages("shinyphaser")
Install the development version from GitHub:
# install.packages("pak")
pak::pak("maciekbanas/shinyphaser")
Quick start
You can run the built-in sample app:
shinyphaser::run_sample_app()
Learn by example
For a full walkthrough (from static background to movement, animation, overlap, and collision), see Build your first shinyphaser game
