On this page
This is an edited version of a devlog I published on itch.io on July 3, 2026.
Blosharper is a card game built with HTML, CSS, JavaScript, and TypeScript rather than a commercial game engine. After years of frontend development, I started with the tools I knew well. Web technologies let me put an idea on screen quickly and change it as I worked out how the game should feel.
A card game built around its interface
Much of Blosharper is about planning moves, building a deck, and interacting with cards. How those cards and their information appear and respond on screen is a substantial part of the game.
I used flexbox and grid for layout, with CSS animation for movement and skill effects. The techniques were familiar from building web interfaces, and they suited a game where cards and UI occupy so much of the screen.
Movement with DOM and CSS
People sometimes ask whether a game built with web technologies will stutter. A large number of moving DOM elements can certainly put pressure on rendering. Knowing the tools did not remove the need to work on performance.
For card animations and effects, I focused on
transform and opacity and on making use of the browser's hardware acceleration. Those choices alone do not guarantee a particular frame rate in every scene.SVG filters and the game's atmosphere
SVG filters and CSS
backdrop-filter helped create the dark, rough look I wanted. Glitches, blood splatters, and screen shakes were built by combining Web APIs and CSS.The cards and interface remained DOM elements. Adding texture and movement to that familiar structure was how I approached the game's noir atmosphere.
TypeScript and Electron
The rendering core was built in TypeScript without React or Vue. I used a game-specific core rather than fitting the game into an existing web framework.
For desktop distribution, I used Electron to package the HTML, CSS, and JavaScript application for Windows, macOS, and Steam Deck. Later, I wrapped the same code in Capacitor to release mobile apps as well. I could reuse much of the interface and game logic, then adapt the layout and input handling for each platform.
Packaging was only part of the work. Controller input, save-data encryption, and audio-context handling still needed attention. Working through those tasks was part of getting the demo ready.
WebGL only where it was needed
Most of Blosharper's screen is rendered with DOM and CSS, but that does not mean it uses no GPU graphics. I used WebGL for the dice rolls and the effects that give character portraits a sense of depth.
The dice were originally built with three.js and the cannon-es physics engine. I was only using a small part of either library, though, and loading them caused a brief hitch on the first dice roll. I replaced them with OGL, a lightweight WebGL library, and physics calculations I wrote myself. The code for the dice effects shrank from about 2.5 MB to roughly 54 KB, and the game's total JavaScript size fell by 28%, from about 7.7 MB to 5.5 MB.
DOM remains the default. I use WebGL only for scenes that are difficult to express with DOM.
Lessons from performance work
In the original post, I wrote about building movement around
transform and opacity. Running the game for longer periods revealed situations where that was not enough, and taught me a few more things.Continuously running animations needed care. During an all-day test on Steam Deck, the device became hot and the fan ran at full speed. The cause was looping animations on UI elements that stayed on screen. Large
text-shadow and filter: blur() effects required repainting every frame, so even less noticeable elements added up over long sessions. I changed those effects to render once and then move with transform.Mobile starts in a lighter mode. The low-spec mode is optional on desktop but enabled by default on mobile. It turns off decorative layers such as sparkles and glows while keeping the entrance animations for cards and buttons.
Resolution was the reason fullscreen was slow. Playing fullscreen on a 4K monitor caused a large drop in frame rate. Reducing the effects made little difference, but lowering the rendering resolution scale brought average frame time down from about 53 ms to 20 ms. The effects stayed the same.
The order of SVG filters changes their cost. The CRT distortion filter on the bonus screen was expensive at high resolutions. At first, I thought I needed to reduce the number of filter stages. Keeping the same stages but moving the distortion step later in the chain reduced frame time from about 118 ms to around 85 ms. The visual difference was barely noticeable. Each effect after the distortion step has to process the larger, distorted image again, so adding more effects after that step increases the work.
A balance simulator in the same language
In a card game, changing a single number can alter the flow of an entire run. Blosharper has a simulator that uses the game's AI to play large numbers of runs and measure balance.
I built the simulator in TypeScript, the same language as the game. In the game itself, the AI calculates its moves in a Web Worker, so longer calculations do not freeze the interface. Being able to build the game's development tools in the same language was another benefit of using web technologies.
Controllers and haptics
The original post only mentioned that controller input needed separate work. Blosharper uses the browser's Gamepad API for Xbox controllers and Steam Deck input. I rebuilt focus navigation throughout the interface so that every card-selection and card-playing action could be performed with a controller alone.
I went a step further with the PlayStation 5's DualSense. Using WebHID to communicate directly with the controller from the browser, I added twelve haptic patterns timed to moments such as score bursts and screen-shattering effects. Other controllers use basic rumble instead. Being able to work with the tactile feedback of a console controller through web technologies was one of the parts I enjoyed most.
Seven languages
Blosharper is playable in Korean, English, Japanese, Simplified and Traditional Chinese, German, and Russian. Because the interface is HTML, the layout accommodates text of different lengths across languages. I could keep the same screen layout even in German and Russian, where card names and descriptions tend to be longer. I only made language-specific adjustments where fonts or line spacing needed to differ.
A game built with web technologies can also be tested with web development tools. Unit tests check logic such as scoring and rules, while Playwright runs a real browser to check that the interface displays correctly and responds to input. I also continue to run long-duration tests on Steam Deck, letting the game play automatically for days while monitoring memory and stability. The longest run lasted more than ten days without stopping.
Later rendering experiments
This post records the technologies behind Blosharper's original presentation. Later, I also tried HTML-in-Canvas as a different rendering path while keeping the HTML layout. I wrote about the visual differences and the problems I encountered in I Put HTML-in-Canvas in My Game. Then Turned It Off by Default..
Familiar tools and working with AI
I initially chose web technologies because I knew them well. As development went on, I found that the same structure also made it easier for AI agents to contribute.
The HTML and CSS that define the interface, the TypeScript game logic, and the tests all exist as text-based code. Agents could read and edit them, then inspect the changes through Git diffs. Breaking features and problems into issues, collecting the work in pull requests, and reviewing one another's changes suited this structure well. It helped me divide up the work even as a solo developer.
The browser's layout tools suited an interface built around cards and text, and I could reuse the game's logic in the simulator and tests. Each platform still needed adjustments to layout and input, but I could make those changes while keeping a shared codebase. Choosing the libraries I needed, reducing code size, and quickly checking edits under different conditions also suited a process built around frequent, small changes.
There were parts I could not control as directly. The same code could behave differently across browser runtime versions or operating systems, so investigating a problem meant looking at both the game and its environment. The browser manages DOM and CSS rendering, which also limits how precisely I can control GPU work. High-resolution rendering and filters still needed measurement and adjustment on real devices.
Protecting the JavaScript code required additional work. And reducing the size of the game code did not remove the installation-size and baseline memory costs of an Electron app that ships with its own browser runtime.
For Blosharper, being able to build the interface quickly with familiar tools and share that work with AI agents was a substantial benefit. Familiarity was the starting point, but code that was easy to collaborate on and a fast iteration cycle became just as important as development continued.