browser_action and server_action
parameters. Browser-side calls must now be declared with browser_actions(),
while arbitrary R logic belongs in a server action.action and notify_server from controls, overlaps, overlap-end
handlers, and colliders.server_action is supplied.browser_action declarations for immediate browser-side overlap and collision reactions.server_action is supplied; sustained handlers can use mode = "stay" and
interval throttling.set_gravity() are not lost during asynchronous asset initialization.PhaserGame$add_collision_rectangle() for placing invisible static
Arcade Physics bodies that can make selected areas impassable without
rendering additional scene geometry.PhaserGame$save_game() for persisting application state and live
Phaser object snapshots to server-side JSON files. Saves default to a
game-specific directory below tempdir() and can also accept an explicitly
captured snapshot for an immediate disk write.PhaserGame$list_saved_games() for retrieving the available
server-side saves in newest-first order.PhaserGame$load_game() for reading saved application state and
optionally restoring captured Phaser object positions, visibility, and active
state in the running scene.gravity_x and gravity_y parameters to PhaserGame$new() for configuring Arcade Physics world gravity when a game is created.PhaserGame$set_world_bounds() for configuring Phaser physics world and camera bounds from R.PhaserGame$activate_map(). Multiple
maps registered with PhaserGame$add_map() are loaded in sequence, and map
activation updates terrain collision, camera and world bounds, the player
position, and map-specific scene-object visibility.PhaserGame$add_proximity_trigger() for monitoring when a scene object
is near a point, optionally showing an HTML element or notifying a Shiny input.Sprite$start_approach_on_sight() for browser-side wandering, sight
checks, alerts, and movement toward a target sprite.Sprite$set_player_animation_prefix() for switching the idle and directional movement animation set used by player controls at runtime.Sprite$stop_motion() for immediately cancelling scripted sprite
movement, including from browser_actions().show() and hide() methods to Sprite, StaticSprite, Group, and
StaticGroup; these methods also work in browser_actions().PhaserGame$add_sound() and a new Sound API for loading, playing, pausing, resuming, stopping, and configuring audio.set_scroll_factor() helpers for scene objects so HUD-style elements can stay fixed while the camera follows another target.set_depth() helpers for sprites, static sprites, images, rectangles, and text
to control their rendering order, including when depth is set before an asset
finishes loading. These methods invisibly return their object for chaining.StaticSprite$destroy() for removing static sprites from the Phaser scene.PhaserGame$add_text(..., visible = FALSE) and Text$new(..., visible = FALSE).Text$show() and Text$hide() helpers for toggling text objects after creation.swamps_rpg).set_depth().Initial CRAN release.
PhaserGame API to define Phaser.js scenes, sprites, image assets, groups, and rectangle helpers from R.