=== Orbem Studio ===
Contributors: orbemorder, scottstorebloom, scottmweaver
Tags: game engine, rpg, video game, game-dev, narrative game
Requires at least: 6.1
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Build playable browser games inside WordPress. Publish as a URL, export to itch.io, or build a Windows desktop version for Steam.

== Description ==

**Orbem Studio** is a no-code browser game engine that runs entirely inside WordPress.

Build real games with combat, NPCs, missions, inventory, cutscenes, boss fights, and physics-based platforming. Publish them as a URL on your own site. No Unity. No canvas. No downloads. Your game lives on a WordPress page.

The engine handles movement, collision, triggers, progression, and state entirely through WordPress systems. If you can install a plugin, you can build a game.

= Ship Your Game to itch.io and Steam =

Your game does not have to stay on your site. Two buttons take it to the two places players actually look for games.

**itch.io** gives you a zip holding a single index.html built from your live game page. Upload it, set the project kind to HTML, and it plays in the browser.

**Steam** gives you a real Windows desktop build. Your game is injected into the official Electron runtime, so there is no Node, no npm, and no build server involved. The runtime is downloaded once, checksum verified, and cached; every build after that takes seconds.

Enter your Steamworks App ID once and the build even ships with its Steam upload scripts filled in, plus a one click uploader that fetches steamcmd for you and starts in a safe preview mode so your first upload cannot go wrong.

No build pipeline, no toolchain, nothing to install. Your game goes from a WordPress page to a Steam depot without leaving the admin.

= Why Developers Use Orbem Studio =

Most browser game tools require canvas, external libraries, or separate hosting. Orbem Studio runs inside WordPress itself. Your game is a page on your site and shareable as a URL, playable in any browser, no app store required.

The simultaneous build and playtest workflow means you place an object and immediately walk your character into it to test. No mode switching. No recompiling. Just build and play.

= What You Can Build =

Orbem Studio ships with systems for:

* Combat with directional attacks, heavy attacks, charged attacks, and boss fight mechanics
* Enemies with wander, runner, and projectile behaviors, health bars, and hurt animations
* Physics-based platforming with per-area gravity, jumping, double jumping, and jump sound effects
* Missions and progression with branching chains, conditional triggers, and persistent player state
* Cutscenes and scripted events with per-area music, sound effects, and cinematic playback
* Built-in translation support for in-game dialogue, paragraph blocks, and heading blocks — the correct language is chosen automatically from the visitor's browser
* Inventory with weapons, gear, consumables, and equip logic
* Mobile controls with d-pad support and landscape mode
* Developer mode with live object placement, visual trigger overlays, and a front end wall builder
* One click publishing to itch.io as a browser game, or to Steam as a Windows desktop build

= Proven in Production =

Games built with Orbem Studio:

* [One Wizard Wrong Forest](https://one-wizard-wrong-forest.orbem.studio) -- fantasy brawler with goblin combat and a tree golem boss
* [Cemetery Showdown](https://cemetery-showdown.orbem.studio) -- zombie combat game
* [Learn how to use Orbem Studio](https://orbem.studio/learn) -- watch turtorials and learn the basics

= Build and Host for Free on orbem.studio =

Don't have your own WordPress site? [orbem.studio](https://orbem.studio) is the hosted platform for Orbem Studio. Free to use, no WordPress installation required.

Sign up and get:

* **Free game hosting** | your game gets its own URL on the orbem.studio platform, shareable and playable in any browser
* **Full front end builder** | place objects, set triggers, configure enemies and missions, and playtest all from inside the game view, no admin panel required
* **Integrated art tool** | draw and animate your own game asset images directly in the browser, no external software needed

[Get started free at orbem.studio](https://orbem.studio)

= Getting Started =

Install the plugin, click Generate a Starter Game, and you have a playable game running on your WordPress site in under 60 seconds. No configuration required to get started.

Or sign up at [orbem.studio](https://orbem.studio) to build and host your game without your own WordPress site.

= Key Features =

**Publishing and Distribution**

* Export for itch.io: download a zip holding a single index.html built from your live game page, ready to upload as an HTML project
* Export for Steam: build a Windows desktop version of your game in one click, with no Node, npm, or build tooling on your server
* Generated Steam upload scripts and a one click uploader that fetches steamcmd for you and starts in a safe preview mode
* Full game export and import as JSON for backups and moving between sites

**Game Engine**

* Full browser game engine running inside WordPress with no external dependencies
* Real-time player movement and collision
* Physics-based gravity mode per area — constant downward pull, floor detection, and wall collision for the player, NPCs, and enemies
* Jump and double jump with configurable heights and jump sound effects, adjustable per character
* Simultaneous build and playtest, no mode switching or recompiling

**Combat System**

* Directional attacks, heavy attacks, and charged attacks
* Boss fight mechanics with phase transitions and pulse wave attacks
* Enemy AI with wander, chase, runner, and projectile behaviors
* Enemy health bars, hurt animations, and death states

**Missions and Progression**

* Branching mission chains with conditional triggers
* Persistent player state across sessions
* Health, mana, power, experience, currency, and leveling systems
* Unlock and materialize triggers

**Cutscenes and Storytelling**

* Scripted cutscene events with dialogue and voice
* Per-area and per-cutscene music
* Sound effects and audio triggers
* Intro videos and cinematic playback
* Google Text-to-Speech integration for voiced dialogue
* Built-in translation support for paragraph and heading blocks — add translations per block and the correct language is served automatically based on the visitor's browser locale

**Inventory and Equipment**

* Weapons, gear, and consumables
* Equip and unequip logic
* Character-bound equipment support
* Storage limits

**Mobile Support**

* D-pad controls for touch devices
* Landscape mode support
* Mobile-optimized combat hitbox

**Developer Mode**

* Live in-game object and character placement
* Visual trigger overlays
* Front end wall builder
* Level selector for rapid iteration
* Admin-only editing tools

**Architecture**

* REST API based architecture with permission-aware endpoints
* Subscriber-safe gameplay routes
* Optimized meta access and caching
* Extensible via WordPress hooks and filters
* Google OAuth support for player login

= Use Cases =

* Browser-based action games
* Narrative RPGs and interactive fiction
* Educational games and gamified experiences
* Playable demos and interactive product experiences
* Experimental web-native game projects
* Commercial releases published to itch.io or Steam

== Installation ==

1. Upload the `orbem-studio` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Navigate to **Orbem Studio** in the admin menu
4. Click **Generate a Starter Game** to create a playable game instantly
5. Or follow the manual setup steps in Global Game Options to build from scratch

== External Services ==

This plugin connects to third-party services to provide optional functionality related to authentication and text-to-speech features.

= Google Text-to-Speech API =

Orbem Studio can optionally use the Google Text-to-Speech API to generate spoken audio for in-game dialogue and narration.

What the service is used for:
The service is used to convert in-game cutscene and explainer popup text content into synthesized speech audio.

What data is sent and when:
When text-to-speech is enabled by the site administrator and triggered by player interaction, the plugin sends the following data to Google:

* The text content to be synthesized
* The configured language and voice parameters
* The API key provided by the site administrator

No personal user data is sent by default. The text content is only sent at the moment audio generation is requested.

Service provider: Google LLC
[Terms of Service](https://cloud.google.com/terms)
[Privacy Policy](https://policies.google.com/privacy)

= Google OAuth / Token Verification =

Orbem Studio supports optional Google Sign-In functionality to allow users to authenticate using their Google account.

What the service is used for:
The service is used to verify the authenticity of a Google ID token during login.

What data is sent and when:
When a user logs in using Google Sign-In, the plugin sends the Google ID token provided by the user's browser. This request is made once per login attempt to verify the token's validity. The plugin does not store Google credentials.

Service provider: Google LLC
[Terms of Service](https://developers.google.com/identity/terms)
[Privacy Policy](https://policies.google.com/privacy)

= GitHub (Electron runtime download) =

The Steam export builds a Windows desktop version of your game by injecting it into the official Electron runtime, which is downloaded from the Electron project's public releases on GitHub.

What the service is used for:
The service provides the prebuilt Electron runtime and its official checksum file, so a Windows build can be produced without any build tooling on your server.

What data is sent and when:
When an administrator builds a Steam export and no runtime is cached yet, the plugin makes two HTTPS GET requests to github.com for the release asset and its SHASUMS256.txt checksum list. No site data, user data, or game content is sent. The download happens once per Electron version and is then cached in your uploads folder and reused.

Service provider: GitHub, Inc.
[Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service)
[Privacy Policy](https://docs.github.com/en/site-policy/privacy-policies/github-privacy-statement)

The exported build also includes a Windows script that can download steamcmd from Valve at https://steamcdn-a.akamaihd.net when you choose to run it. That runs on your own computer, not on your site.

== Frequently Asked Questions ==

= Does this require an external game engine? =
No. Orbem Studio runs entirely inside WordPress. No canvas, no external libraries, no separate hosting required.

= Is this plugin for developers only? =
Developers can extend the engine via hooks and filters, but non-technical creators can build complete games using the visual admin interface alone.

= Can subscribers play the game? =
Yes. Gameplay routes are designed to support subscribers and logged-in users safely.

= Can guests play without logging in? =
This is configurable. You can require login or allow guest gameplay depending on your settings. Note that logged-out users will not have persisted gameplay data, but local score tracking is supported.

= Is Orbem Studio extensible? =
Yes. All systems are designed to be extended using WordPress hooks, filters, and custom metadata.

= Do I need my own WordPress site? =
No. [orbem.studio](https://orbem.studio) is the hosted platform — sign up free and get game hosting, a full front end builder, and an integrated art tool for drawing and animating your game assets, all without a WordPress installation.

= Where can I find documentation? =
Documentation is available at https://orbem.studio/orbem-studio/docs/readme

Tutorials are available on the Orbem Studio YouTube channel at https://youtube.com/@orbemstudio

== Changelog ==

= 1.7.4 =
* Add a movement speed option for the main character: a character's existing Speed field now controls how fast the player moves as well as how they walk as an NPC, defaulting to 16, and switching to another character applies that character's own speed.
* Add an "Export for Steam" option to Export / Import that builds a downloadable Windows desktop version of your game in one click; the official Electron runtime is downloaded once, checksum verified and cached, then each build injects your game into a copy of it, so nothing is compiled on your server. Enter your Steamworks App ID once and each build also includes ready-to-run Steam upload scripts and a one click uploader that fetches steamcmd for you, starting in a safe preview mode.
* Add an "Export for itch.io" option to Export / Import that downloads a zip containing a ready-to-upload index.html built from your live game page (upload it to itch.io with Kind of project set to HTML).

= 1.7.3 =
* Add a "Damage time" option for characters and enemies (start or end, defaulting to start) that controls when an attack deals its damage, so a long attack animation can resolve at the end of the swing and give the target a chance to escape first.
* Apply the enemy attack display time to melee enemies as well as shooters, and keep a runner standing still for the whole attack animation instead of turning or walking mid-swing.
* Fix the enemy kill reward only updating part of the points display; the level readout, point total, and gain notification now update along with the reward.
* Fix a weapon's vertical offset not applying to the projectile it fires, and fix projectiles being invisible when no projectile width and height were set.
* Fix the character sinking or dropping in gravity areas when switching between walking, standing, and attack sprites, and stop the hitbox inset from lifting the character's feet off the ground.
* Fix the weapon sitting below the character on tablet-sized screens.
* Use the desktop sign-in screen on mobile when no mobile sign-in image or video has been added, instead of showing a blank background.
* Play as a guest whenever a game does not require login, so building and refreshing no longer resumes a half-finished game and forces a reset.

= 1.7.2 =
* Fix mission progression so completing a mission by collecting an item (or any other trigger) reliably reveals the next mission; missions with similar names (e.g. a base mission and its "pt 2"/"pt 3" follow-ups) no longer block the chain, and simultaneous completions no longer cancel each other.
* Add a "Custom" option to the wall texture dropdown so an uploaded custom texture is only used when explicitly selected, letting a wall stay invisible while a custom image is on file.
* Fix collected and auto-equipped weapon sound effects not playing; the equipped weapon's sound now stays in sync and plays each time the weapon is used.
* Add a vertical offset field for weapons to raise or lower the held weapon on the character, pairing with the existing range (facing-direction) offset.
* Use the Explainer assigned to the "Lose Message" placement area as the lose popup, honoring its auto-close delay and "The End" (restart game) settings, and remove the redundant Lose Message game option.

= 1.7.1 =
* Add wall textures: tile a repeating pixel texture (grass, dirt, water, wood, lava and more, or upload your own) across any wall, with an adjustable texture scale and rounded corners; textured walls stay visible and selectable in devmode.
* Add attack display time fields (in milliseconds) for characters (normal, heavy, charged) and enemies so animated attack sprites have time to finish before reverting.
* Keep the character in its attack pose while the attack sprite is displaying; turning re-aims the attack sprite in the new direction instead of switching to a walking sprite.
* Fix unequipping a weapon so it reliably falls back to the default weapon and clears the held weapon from the character.
* Fix the scene fade overlay, devmode item dragging, and other positioning so they work correctly in zoomed areas.

= 1.7.0 =
* Add a per-area zoom option (Area Scale percentage) that enlarges the whole world for small pixel art while keeping the player centered, working on load and when entering areas without breaking movement, collision, or the game-building tools.
* Auto-equip a collected weapon when the storage weapons tab is disabled or storage is hidden, dropping any currently held non-default weapon back onto the map.

= 1.6.0 =
* Add an in-hand weapon image system that shows and animates a weapon's featured image on the character during attacks (swing/thrust/shoot) instead of requiring per-weapon sprites, with fields for held image, visibility, motion, facing (cardinal and diagonal), size, range, and resting position.
* Add weapon projectiles that fire in the direction the character faces using a projectile image or the weapon itself, damaging enemies and stopping at walls, with optional mana-based ammo and per-weapon ammo cost.
* Add a projectile facing option for shooter enemies so their projectiles rotate to face the direction they are fired.
* Replace the charged-attack color filter with a configurable pulsating glow (choose color and whether it emanates from the character, weapon, or both) and add a color-picker field type.
* Redesign the storage, settings, and characters menus as a pixel-RPG interface, fix switching storage tabs and a storage data corruption bug, and rework equip/unequip so unequipping falls back to the default weapon.

= 1.5.9 =
* Fix mobile/tablet character starting position not matching desktop by removing a stale hardcoded position offset that duplicated work already done by the icon-centering math.
* Align mobile/tablet breakpoint detection in JS with the CSS breakpoints so the position math always matches the actual rendered container size.

= 1.5.8 =
* Fix draggable items with no destination configured still rendering a phantom drag destination, which blocked pickup.
* Fix a crash when switching directional sprites if no character image currently had the active/engage state, which broke movement until the page was reloaded.
* Add more explainer popup style options.

= 1.5.7 =
* Add explore-reward-value and explore-value-type support so killing an enemy grants the player a configured reward.
* Fix draggable items being unable to be picked up when no drag destination/mission was configured.

= 1.5.6 =
* Add support for default values on meta box fields, used to default a weapon's value type to "Weapons".
* Fix fatal error importing a game when custom CSS was included in the export file.

= 1.5.5 =
* Allow the wall builder to drag in any direction, not just top-left to bottom-right.
* Add explore-redirect-path field to redirect players to a URL after interacting with an item.
* Fix area entry position mismatch between initial load and area transitions.
* Fix clickable items not being wired up after entering a new area.

= 1.5.4 =
* Add mobile notice.
* Fix area queries.
* Fix hidden enemie triggers.
* Omit main character from edit click.

= 1.5.3 =
* Fix explainer addition requirements.
* Reorganize devmode buttons.

= 1.5.2 =
* Add gravity option to items.
* Prevent main character from deletion.
* Prevent start area from deletion.
* Fix empty mission issue.

= 1.5.1 =
* Add npc/enemy gravity.
* Fix map label.

= 1.5.0 =
* Add wall delete feature.
* Add translation feature to text blocks.
* Add jump and double jump to character.
* Add gravity physics to areas.

= 1.4.15 =
* Fix orbem studio button show.
* Fix zoom.

= 1.4.14 =
* Add scroll to for explainers.
* Global drag handler for pro plugin.

= 1.4.13 =
* Add more local storage for multilevel.
* Fix console errors for new areas.

= 1.4.12 =
* Test WP ver 7.
* Add shooter rate adjust.
* Fix multi boss ability.
* Add sound to game over popup.
* Fix video background position.

= 1.4.11 =
* Add custom CSS to import/export.
* Fix radio field label.
* Add default to weapon strength.
* Allow area multifield for all fields.
* Fix mission grab.
* Apply projectile styles to shooters.
* Fix music pause console error.

= 1.4.10 =
* Fix tmp name typo.
* Add memory timeout fix for import.

= 1.4.9 =
* Add area map image size control.

= 1.4.8 =
* Add export/import feature.
* Updates for dev mode menu.
* Exclude main character from query.
* Convert all area fields to multiselect.

= 1.4.7 =
* Starter cutscene style updates.
* Fix blocked blocks.

= 1.4.6 =
* Fix move npc after cutscene logic.
* Fix remove after cutscene backcompat.
* Fix try-again if multiple.
* Fix score saving logic.
* Optimize background logic.

= 1.4.5 =
* Add sound controls to explainer.
* Update meta fields.
* Fix preview update on img select.
* Update devmode hud.

= 1.4.4 =
* Redesign devmode menu.
* Revert contain layout bug.
* Remove unused pro functions.

= 1.4.3 =
* Fix absent images.
* Update meta field order.
* Fix devzoom error.
* Fix onboarding.
* Optimize assets.
* Remove start screen page content.

= 1.4.2 =
* Add alternate message for no area.
* Remove game page content addition.
* Fix logged in no login required button.
* Update game generated metadata format.
* Remove orbem studio pro business logic.

= 1.4.1 =
* Add admin bar link.
* Tighten npc wander stuck logic.
* Fix boss shooting after wave end.
* Update site generator map image.
* Update site generator specs.

= 1.4.0 =
* Add local current/high score tracker.
* Add current/high score text replacement.
* Add hitbox inset field for main character.
* Fix enemy kickback direction.
* Fix enemy collision on kickback.
* Fix landscape mode character positioning.

= 1.3.18 =
* Implement landscape mobile mode.
* Update pulse wave style.

= 1.3.16 =
* Fix enemy sound on engage.
* Fix collection point animation.
* Fix pulse wave hazard hurt.
* Fix projectile position boss.
* Fix enemy walking direction.

= 1.3.15 =
* Fix health/mana collection logic.
* Fix enemy hurt sound play on death.
* Fix boss fight trigger.

= 1.3.14 =
* Fix charge attack strength use.
* Fix missing image bug on attack/hurt.
* Fix set materialize trigger position.


= 1.3.13 =
* Send enemy dead image to back layer.
* Fix save mission on kill enemy.
* Make dead image optional.
* Update focus view styles.
* make charge attack bigger.

= 1.3.12 =
* Add dead image animation.
* Tighten runner enemy attack ability

= 1.3.11 =
* Add sound to hurt for enemy/main.
* Add hurt animation options.

= 1.3.10 =
* Stop walking sound when explainer open.
* Fix mobile dpad width.
* Fix zindex on dpad.

= 1.3.9 =
* Enhance cutscene instruction.
* Fix click next target for cutscenes.

= 1.3.8 =
* Fix mobile enemy targeting.
* Fix custom css code styles.

= 1.3.7 =
* Color code devmode triggers
* Fix mobile combat hitbox.

= 1.3.6 =
* allow enemy kill logged out.

= 1.3.5 =
* Remove item after mission.
* Fix enemy trigger mission.

= 1.3.4 =
* Fix duplicate game options menu.
* Remove ghost enemies.

= 1.3.3 =
* Optimize combat.
* Fix broken index.
* Add lose message option.
* Fix after mission cutscene trigger.
* Add custom css menu.

= 1.3.2 =
* Add obstacle avoidance to runner enemy.
* Add weapons sound.
* Add enemy sound.
* Fix mobile hit.
* Fix mobile start position.

= 1.3.1 =
* Fix meta labels for selects.
* Unrestrict page type for game page.
* Multi select enemy triggers for mission.
* Force scroll behavior on site to allow movement.
* Speed up enemy runner attack.
* Allow enemy trigger after cutscene.

= 1.3.0 =
* Add runner enemy logic.
* Add health bars to enemies.
* Add enemy hurt animation.
* Add enemy attack image logic.
* Remove character image required.


= 1.2.6 =
* Fix cutscene size and position.
* Fix mobile walking/action key.

= 1.2.5 =
* Version fix.

= 1.2.4 =
* Fix cutscene autoplay without voice.
* Add multiselect for areas in meta.

= 1.2.3 =
* Add materialize after explainer close for cutscenes.
* Add clickable close option for explainer.

= 1.2.2 =
* Add mobile start screen option.
* Allow more content in explainers.
* Fix menu zindex.

= 1.2.1 =
* Fix new game reset.
* Add mission complete on focus view.
* Add item triggers for cutscenes.
* Add mobile controls.
* Remove hardcoded explainer background.
* Make cutscene multiselect.

= 1.2.0 =
* Fix dev mode engage.
* Add player name selection option.
* Add remove/materialize cutscene triggers for focus view.
* Fix some select meta fields.
* Add clickable interaction state for items.

= 1.1.10 =
* Fix draggable items.
* Remove logged in dependency for get calls.

= 1.1.9 =
* Update select meta field to display titles.
* Fix draggable items when logged out.

= 1.1.8 =
* Make npc movement after or before cutscene option.
* Stop passable characters from stopping when touching main character.
* Allow auto next dialogue without voice.
* Fix first dialogue rush issue.

= 1.1.7 =
* Remove main character hard coded width.
* Add option to choose storage menu tabs.

= 1.1.6 =
* Fix cutscene removal typo.
* Allow all blocks for explainer content editor.
* Fix mobile scroll event.
* Add mobile action key.

= 1.1.5 =
* Add cutscene removal feature.
* Fix margin after cutscene trigger.
* Fix select array var error.

= 1.1.4 =
* Add option to make characters passable.
* Fix meta field array select data saves.
* Add option to no offer login.

= 1.1.3 =
* Fix console error for cutscenes without main character.

= 1.1.1 =
* Enable materialize after mission function.
* Remove disruptive required fields.
* Fix console error for cutscenes without main character.
* Fix money console error.

= 1.1.0 =
* Fix collectable interacted state.
* Add game generate to wizard.
* Fix dev mode visibility.
* Add deactivation option data removal.
* Fix empty point console error.
* Fix admin menu collapse for submenus.

= 1.0.5 =
* Fix wall builder.
* Fix materialize item trigger.
* Add disable image upload scaling for map uploads.

= 1.0.4 =
* Fix setup wizard trigger.
* Add collapsible groups for non required.
* Fix required fields logic on Gutenberg enabled pages.
* Fix character image issue.

= 1.0.3 =
* Add required field logic.
* Add field groups in post types.
* Update label messages for clarity.
* Limit admin assets

= 1.0.2 =
* Fix activation tutorial.

= 1.0.1 =
* Fix Gutenberg block limitations on non-game post types.

= 1.0.0 =
* Initial public release
* Core game engine
* Developer Mode
* Mission, inventory, and progression systems
* Secure REST-based architecture

== Upgrade Notice ==

= 1.0.0 =
First stable release.
