<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Scott Adrian</title>
    <description>The latest articles on DEV Community by Scott Adrian (@orbemorder).</description>
    <link>https://dev.to/orbemorder</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3952852%2Fe6cb7b42-357d-42bf-aff8-fc18f4d23b45.png</url>
      <title>DEV Community: Scott Adrian</title>
      <link>https://dev.to/orbemorder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/orbemorder"/>
    <language>en</language>
    <item>
      <title>I Built a Browser Game Engine Inside WordPress Without Canvas or WebGL. Here's Why</title>
      <dc:creator>Scott Adrian</dc:creator>
      <pubDate>Tue, 26 May 2026 15:36:47 +0000</pubDate>
      <link>https://dev.to/orbemorder/i-built-a-browser-game-engine-inside-wordpress-without-canvas-or-webgl-heres-why-2in3</link>
      <guid>https://dev.to/orbemorder/i-built-a-browser-game-engine-inside-wordpress-without-canvas-or-webgl-heres-why-2in3</guid>
      <description>&lt;p&gt;Over four years ago I started building something that most developers &lt;br&gt;
told me shouldn't work.&lt;/p&gt;

&lt;p&gt;A browser game engine with no canvas element, no WebGL, and no &lt;br&gt;
external game libraries. The entire engine runs on the DOM. Every &lt;br&gt;
game lives as a standard web page at its own URL. Players click &lt;br&gt;
a link and the game loads instantly on any device with no &lt;br&gt;
download, no install, no app store.&lt;/p&gt;

&lt;p&gt;Most browser game developers assume canvas or WebGL is a &lt;br&gt;
requirement. I wanted to find out what happens if you remove &lt;br&gt;
that assumption entirely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why No Canvas
&lt;/h2&gt;

&lt;p&gt;The canvas approach is powerful but it creates a distribution &lt;br&gt;
problem. Canvas games need to be exported, uploaded, and served &lt;br&gt;
from a host that handles the files. The game and the website &lt;br&gt;
are two separate things. Embedding requires an iframe. Sharing &lt;br&gt;
requires a host.&lt;/p&gt;

&lt;p&gt;Running on the DOM meant something different was possible. The &lt;br&gt;
page itself becomes the game. No iframe, no embed, no separate &lt;br&gt;
host. The game lives natively inside any website as a standard &lt;br&gt;
page. Build it and it is immediately live at its own URL.&lt;/p&gt;

&lt;p&gt;That URL is the thing that changes everything about distribution. &lt;br&gt;
Share it anywhere and anyone can play it instantly. No friction &lt;br&gt;
between a creator and their audience.&lt;/p&gt;

&lt;h2&gt;
  
  
  How the Engine Works
&lt;/h2&gt;

&lt;p&gt;Game logic is defined through a visual interface rather than &lt;br&gt;
code. Areas, characters, items, enemies, missions, cutscenes, &lt;br&gt;
and dialogue are all configured without writing a single line &lt;br&gt;
of JavaScript.&lt;/p&gt;

&lt;p&gt;On the front end the engine reads that configuration and handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Top down and side scrolling movement&lt;/li&gt;
&lt;li&gt;Collision detection&lt;/li&gt;
&lt;li&gt;NPC dialogue and branching conversations&lt;/li&gt;
&lt;li&gt;Mission and progression systems&lt;/li&gt;
&lt;li&gt;Inventory and item collection&lt;/li&gt;
&lt;li&gt;Combat with multiple enemy types&lt;/li&gt;
&lt;li&gt;Cutscenes and story moments&lt;/li&gt;
&lt;li&gt;Boss fights&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Movement and collision run through DOM positioning rather than &lt;br&gt;
a game loop on canvas. Every game element is a DOM node with &lt;br&gt;
position, size, and behavior defined by data attributes. The &lt;br&gt;
engine checks overlaps, handles interactions, and updates state &lt;br&gt;
through JavaScript that reads and writes to those attributes.&lt;/p&gt;

&lt;h2&gt;
  
  
  The WordPress Connection
&lt;/h2&gt;

&lt;p&gt;The engine is built as a WordPress plugin. Game assets are &lt;br&gt;
WordPress custom post types. A character is a post. An area &lt;br&gt;
is a post. An item is a post. The meta fields on those posts &lt;br&gt;
define behavior, position, size, collision, interaction type, &lt;br&gt;
mission triggers, dialogue content.&lt;/p&gt;

&lt;p&gt;WordPress handles authentication, the database, the REST API, &lt;br&gt;
media management, and multisite hosting. That is months of &lt;br&gt;
infrastructure that came for free. The plugin adds the game &lt;br&gt;
layer on top.&lt;/p&gt;

&lt;p&gt;The hosted platform at &lt;a href="https://orbem.studio" rel="noopener noreferrer"&gt;orbem.studio&lt;/a&gt; runs on WordPress multisite. &lt;br&gt;
Each game gets its own subdomain. Sign up and your game &lt;br&gt;
environment is ready in under 60 seconds without touching &lt;br&gt;
WordPress at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Front End Builder
&lt;/h2&gt;

&lt;p&gt;One of the more interesting engineering problems was building &lt;br&gt;
a front end game editor that runs inside the game itself.&lt;/p&gt;

&lt;p&gt;The builder lets creators add, edit, place, and delete game &lt;br&gt;
assets without ever leaving the game. Click to place positioning &lt;br&gt;
works by switching the cursor to a crosshair, clicking anywhere &lt;br&gt;
on the map, capturing the coordinates, and submitting the asset &lt;br&gt;
creation form with those coordinates pre-filled.&lt;/p&gt;

&lt;p&gt;Asset changes update instantly without a page refresh. The game &lt;br&gt;
state reflects the change immediately so creators see exactly &lt;br&gt;
what players will see in real time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Orbem Studio Paint
&lt;/h2&gt;

&lt;p&gt;The engine also includes a built in pixel art tool called &lt;br&gt;
Orbem Studio Paint. Creators draw sprites at any dimension, &lt;br&gt;
export as SVG, PNG, or JPG, and save directly to the WordPress &lt;br&gt;
media library. From there assets go straight into the game &lt;br&gt;
without leaving the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Export and Import
&lt;/h2&gt;

&lt;p&gt;Every game can be exported to a single JSON file that includes &lt;br&gt;
all posts, all meta, all game options, and all image URLs. &lt;br&gt;
Importing to another Orbem Studio install downloads each image &lt;br&gt;
from the source site and rewrites all URLs to point to the &lt;br&gt;
new location automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned Building This
&lt;/h2&gt;

&lt;p&gt;The biggest surprise was how much a DOM based approach enables &lt;br&gt;
that canvas cannot. CSS animations, CSS transitions, standard &lt;br&gt;
HTML elements, browser accessibility features, all of these &lt;br&gt;
work naturally inside a DOM based game and require significant &lt;br&gt;
additional work to replicate on canvas.&lt;/p&gt;

&lt;p&gt;The biggest limitation is performance on large maps with many &lt;br&gt;
simultaneous moving elements. DOM layout recalculation is &lt;br&gt;
expensive and canvas handles large numbers of moving sprites &lt;br&gt;
significantly better. For the types of games Orbem Studio &lt;br&gt;
targets, RPGs, narrative experiences, puzzle games, arcade &lt;br&gt;
games, this has not been a practical problem. For a game &lt;br&gt;
with hundreds of simultaneous moving elements it would be.&lt;/p&gt;

&lt;p&gt;The no canvas constraint turned out to be generative rather &lt;br&gt;
than limiting. Every architectural decision flowed from it and &lt;br&gt;
the result is something genuinely different from other browser &lt;br&gt;
game engines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;The free WordPress plugin is on WordPress.org:&lt;br&gt;
&lt;a href="https://wordpress.org/plugihs/orbem-studio" rel="noopener noreferrer"&gt;wordpress.org/plugins/orbem-studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The hosted platform where you can build without WordPress:&lt;br&gt;
&lt;a href="https://orbem.studio" rel="noopener noreferrer"&gt;orbem.studio&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few games built with it:&lt;br&gt;
&lt;a href="https://orbem.studio/games" rel="noopener noreferrer"&gt;orbem.studio/games&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I would love to hear what other developers think about the &lt;br&gt;
DOM based approach and whether the trade-offs make sense for &lt;br&gt;
the use cases I am targeting. Happy to answer any technical &lt;br&gt;
questions in the comments.&lt;/p&gt;

</description>
      <category>gamedev</category>
      <category>wordpress</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
