New games every week!
Input - Day Three Blog
26th October 2017
It's taken me all bloomin' day to find a way to get Emscripten's "C++'ish" compiler to compile, again.

-=-=-

The main problem was that, at some point, the javascript started getting stuck, and breaking.
Turns out you can't simply make an endless loop using Emscripten, and instead have to use the inbuilt loop command to loop for you.
The complication, here, was that the loop command needed to run a game command inside a class, but the loop command wasn't within the class, nor could it be told to run a command within the class, so nothing I did could fix it!

In the end, I stuck the looper command outside the class, got it to call a tiny command, and then got that command to call the command inside the class that runs the game's logic and keeps the renderer going.

Yeah.. That!
It took most of today to finally achieve the goal of being able to run the .html file without it locking up.
Then it was onto the OpenGL stuff, at which point I found myself jumping between half-a-dozen OpenGL versions in Emscripten, before finally giving up for the night.

It's 9:30, I'm exhausted, and I really feel like I've accomplished nothing, today!


This is what the engine currently looks like in HTML5.
Note the "screen" is at the usual 800x600 resolution, and there's a lovely coloured background.
The background changes colour!
Also note that there's nothing else on the screen, because no matter how much I try, the darn thing just won't draw anything.
Grrrr..
Still, the changing background colour gives me hope. It's one small step towards success.
..
..... I guess!
Views 44, Upvotes 7  
2018 Framework
New games every week!
Site credits : Jayenkai, one crazy fool who has far too much time on his hands.
(c) Jayenkai 2023 and onwards, RSS feed

Blog - Input - Day Three - AGameAWeek