Now works in browsers!


This one was actually a bit of a surprise to me.
Right after getting "Where is my Balloon?" working in browsers via Emscripten, I had a look at porting my 2D engine (which I call "glualb").

Many many errors and issues occurred... Some of which I thought might require entire rewrites.

Thankfully I was wrong... just a few modifications and it worked. I was just not setting up my makefile correctly.

"Huzzah!"-I thought... but it ran like one of the early snes FX chip-1 games... very choppy and probably fluctuating at about 8-15 frames per second.
It was not a pleasant experience and not very fun to play.

I assumed this was due to a lack of webGL optimizations in my code, which led to me reading through every single time any openGL call was made and seeing if I could make any adjustments. This gave me an extra frame or two per second.
I was quite displeased and figured that since I call Lua each frame for multiple operations, maybe it just wasn't going to port.

I then remembered that Love2D has a browser version and it runs fine... my conclusion?
I must be pretty bad at this "coding"-thing... which was a li'l depressing.

It turns out I wasn't compiling lua with any optimizations via the compiler... So I added "-O3" to my lua compile and it worked fine.

YAY!

Unfortunately, for some weird reason, it runs a little funny on Ubuntu via Firefox, but any Chromium derivative seems to work fine. I'll probably have to look into this in the future, but I'm quite pleased since at the start of the day, I figured it wouldn't port at all, then I got it working in a few hours.

So hopefully you enjoy the "XenoGraft demo" for browsers.
I think I'll look over the code and recompile new versions for Windows, Linux (sorry, current build doesn't work), Android and maybe the Browser version (just to make sure they are all the same version). The current downloads are all of an old version which doesn't include the correct screen scaling mode for fullscreen which I later added... so I should probably update that.

Thanks for reading,
-K. A. Laherty 2022

Files

XenoDemo_EM.zip Play in browser
Dec 04, 2022

Get Xenograft demo

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.