An Interface to the 'Phaser.js' Game Framework

An API to build and control 2D games using the 'Phaser' 'JavaScript' engine. It enables integration with 'shiny' applications, allowing to create interactive games and simulations.


shinyphaser shinyphaser Logo

R-CMD-check

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

Example games created with shinyphaser

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("shinyphaser")

0.1.0 by Maciej Banas, 4 months ago


https://github.com/maciekbanas/shinyphaser


Report a bug at https://github.com/maciekbanas/shinyphaser/issues


Browse source code at https://github.com/cran/shinyphaser


Authors: Maciej Banas [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports htmltools, R6, rlang, shiny

Suggests knitr, rmarkdown, shinyalert, testthat, shinytest2


See at CRAN