the journey to Maru's Melancholy's web build


Maru's Melancholy now available as a web build, play in browser here: https://verysoftwares.itch.io/marus-melancholy

the pipeline used for this was LoveDOS -> LÖVE -> love.js. as you can tell from the similar names, they all use the Lua programming language, and are programmatic dialects of each other. they meshed together quite seamlessly in my experience, i only encountered five points of friction in the LoveDOS -> LÖVE port:

  • color RGB values are 0..255 in LoveDOS and 0..1 in LÖVE (since like version 11.0)
  • the arguments taken by love.graphics.draw are simplified in LoveDOS
  • the game had to be slowed down to 50 FPS, it felt too fast with modern systems' timers. it's meant to be the kind of a game you take a slow stroll through. however, i have caved in to audience feedback and raised Maru's speed variables.
  • audio files had to be 'static' not 'stream' (audio simply won't work otherwise, i remember encountering this when porting my previous games)
  • goto simply doesn't work (a piece of nested looping code had to be replaced with a function call)

there are minor graphical differences in the LÖVE version compared to the LoveDOS one. fonts are anti-aliased here, and 'augmentation' buttons look different now (this will make more sense if you've played the game yourself, rather than just seen footage of it). these are technically glitches that i've intentionally left in.

then, for the LÖVE -> love.js build, i had a major problem for the first few hours.

  • the resulting JavaScript throwed an 'uncaught RangeError' exception.

some array was indexed out of its bounds where the array's size is referenced. that much i knew. but with love.js not being written by me, i couldn't tell the internals of what was actually causing the issue.

after having given it some more thought, i went ahead and converted the .wav files to .ogg files, as well as splitting a very long function into smaller components. either of these changes worked, my guess is the latter solution's reduced function call space. audio files usually have infinite resource budgets in modern frameworks, but love.js's internal function call data may actually operate on the framework's limited allocated memory. that's my best guess.

that's enough nerding for today. i hope you enjoyed my little trip through the web build's development, and i hope you enjoy playing the actual game!

Files

MARUWEB.zip Play in browser
28 days ago
MARUMEL1.ZIP 359 kB
28 days ago

Get Maru's Melancholy

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.