DEV Community

Cover image for From a Simple JavaScript Prototype to a Full Unity WebGL Game: Rebuilding Hemi’s Chicken Hunt
Tyler Johnston-Kent
Tyler Johnston-Kent

Posted on

From a Simple JavaScript Prototype to a Full Unity WebGL Game: Rebuilding Hemi’s Chicken Hunt

From a Simple JavaScript Prototype to a Full Unity WebGL Game: Rebuilding Hemi’s Chicken Hunt

Hemi’s Chicken Hunt started as one of my earliest browser experiments. It was a tiny JavaScript shooter that lived directly inside my website. A canvas. A few sprites. One level. Minimal collision logic. No scaling. No systems around it. It ran, but it could not grow.

This year I rebuilt the entire thing from scratch as a full Unity WebGL game and integrated it back into my website as a free, mobile friendly experience. This post breaks down the full journey, what I learned, and how the rebuild changed the scope of the project.

The Original JavaScript Build

The first version of Hemi’s Chicken Hunt was pure vanilla JavaScript. No frameworks. No engines. One file handled rendering. Another handled input. Everything was tied to a single loop. It was fun in a rough way, but it had real limitations:

No level system

No round progression

No boss logic

No touch controls

No responsive layout

No modular code structure

No expansion path

It showed what I could do at the time, but the code could not support a deeper game without a rewrite.

Moving to Unity

I decided to rebuild the entire project in Unity and ship it as WebGL. I used a commercial Unity asset as a starting point, then replaced everything with my own work:

New sprites and character art

Custom UI

New explosions and hit effects

New enemy visuals

Revised backgrounds

Rebuilt menus

Full reskin around my cat Hemi

This gave me access to Unity’s animation tools, particle systems, scene flow, and modular architecture. It also meant I could build progression, bosses, and upgrades without fighting the limitations of a small JavaScript engine.

Full WebGL Integration

A Unity WebGL build is not plug and play. It needs real infrastructure if you want it to run cleanly on a production website. I built all of that myself.

Custom iframe loader

I created a dedicated loader that drops the WebGL game into a modal with proper scaling and layout behavior. This let me support both desktop and mobile devices inside the same UI container.

Routing and navigation

My website uses a hash-based router that I built from scratch. I added a new route for Hemi’s Chicken Hunt and created a game launch module that injects the WebGL frame on demand.

Mobile support

Unity’s default WebGL template does not handle mobile scaling well. I had to adjust CSS, viewport constraints, container behavior, and touch input mapping to make everything consistent.

Firebase hosting + compression rules

Unity WebGL requires specific headers for:

wasm files

gzip compressed files

framework scripts

loaders

I configured my firebase.json rules to serve all Unity files with correct MIME types and caching.

What the New Version Can Do

The new build is a complete game:

Round progression

Boss fights

Player upgrades

Powerups

Touch controls

Smooth collisions

High quality rendering

Responsive layout

Runs on any device

It is all served directly on my website at:

https://formant.ca/#games

This version finally feels like a full game instead of a tech demo.

Full Indie Dev Stack Experience

This rebuild covered almost everything an independent developer touches in a modern workflow:

JavaScript

Unity

WebGL

Asset creation

UI design

Input systems

Hosting

Optimization

Routing

Deployment

Compression

Debugging

Branding

It was a front to back production job.

What’s Next

The rebuild gives me a foundation I can expand.

Planned updates:

New music and sound

Improved gameplay pacing

Better progression

More effects

More enemy types

Difficulty curve tuning

The project started as a small experiment. Now it is a platform I can grow over time.

Play It Here

You can try the WebGL version directly on my site:

https://formant.ca/#games

It started as a simple asset store reskin, but it is now a custom game with its own style, its own character, and a lot more coming soon.

Top comments (0)