Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

PEG HERO devlog: running a LÖVE game in the browser without love.js

A topic by wookdev created 10 days ago Views: 85 Replies: 1
Viewing posts 1 to 2

PEG HERO is a pegboard auto-battler made with LÖVE. This week's milestone: the demo now plays in the browser, and not through love.js.

We tried love.js first. Battles stuttered, level-ups froze for a second, and the picture was soft. So we wrote a small web runtime instead: the game's Lua is translated to JavaScript ahead of time, and only the parts of LÖVE the game actually calls are implemented on WebGL2 and Web Audio. The game code is the same as the desktop build.

What made the biggest difference so far: batching draws (a busy battle frame went from about 300 draw calls to under 100), taking sound-effect rendering off the per-frame path, and stopping slow frames from stacking extra simulation steps onto the next one.

Full write-up: PEG HERO's demo now runs in your browser

I'll keep this thread updated as the web runtime improves. If you try it, I'd like to know your browser and whether anything stuttered.

A useful next test would be leaving the tab hidden for a while and returning during a busy battle. I would want to know whether it resumes from the paused moment or tries to catch up, especially after the change to simulation steps