Main forum > GLBasic - en

Steam HTML5 Compiler

(1/6) > >>

I'm thinking of purchasing the HTML5 Compiler on Steam (I have the Steam version of GLB). I can't seem to find any documentation for it (apart from a few notes on the Steam site):

--- Quote ---This compiler, using Emscripten, results in an html webpage, that runs your GLBasic application/game in any modern webbrowser. You can also use it to export GLBasic function to JavaScript for other projects. Emscripten will compile a wasm (Web assembly) for you, that runs really fast.
There are two options included:

    HTML5-WebGL - This uses the webgl backend and allows fast graphics, using hardware accelleration
    HTML5 - This uses a builtin graphics engine, that renders the output per pixel. It's not as fast as webgl, but more compatible for older computers or computers with higher security limitations.

There are some limitations, though:

    You must run the main loop using SETLOOPSUB, instead of a classic WHILE TRUE; ...; WEND loop.
    File write access is quite limited
    The data must be loaded using a real webserver, or a local webserver (included for testing). Modern browsers will refuse to load graphics, if you just open the html file from the local drive.
--- End quote ---

I've had a nose around the forum and elsewhere for some more documentation but without luck. I'd be interested to know a bit more before buying it if possible (although might just take the plunge and have a play with it  =D )

If anyone knows of any guides, release note docs would be much appreciated! I did find a 9 year old thread testing html5 but nothing recent for the Steam release.

Kitty Hello:
There is not much documentation, but almost everything should work. My G.A.C.K. games run in HTML5.

Hi, thanks for the reply. I think I understand the need for a webserver and the SETLOOPSUB, but I wonder if you have any more detail about the restrictions around file write access? This is something I might like to try and do if possible, so I'd like to know what can't be done.

Ok I took the plunge and bought the HTML5 Compiler from Steam just to see where I could get to. It automatically installs it as DLC via Steam which is nice and start GLBasic is the usual way, through a desktop icon or Start menu in Windows 10.

I've made a really simple program with a SETLOOPSUB. I've then navigated to Project > Options and checked the Platform Configuration is set to 'HTML5', applied and exit. I've then gone to Compiler -> Build Multi-platform and clicked on HTML5.

The result is a .app project sub-folder containing a project.html file telling me it's a dummy file. In the Distribute folder an HTML5 sub-folder has been created containing 1 file: run_local_test.bat

The compile report contains the following:

--- Quote ---*** Configuration: HTML5 ***
GPC - GLBasic Precompiler V.17.312 SN:58f00c1b - 3D, NET
Wordcount:17 commands
Adding directories to PATH:
PATH += Q:\Compiler\platform\HTML5\emsdk\upstream\emscripten
PATH += Q:\Compiler\platform\HTML5\emsdk\node\12.18.1_64bit\bin
PATH += Q:\Compiler\platform\HTML5\emsdk\python\3.7.4-pywin32_64bit
PATH += Q:\Compiler\platform\HTML5\emsdk\java\8.152_64bit\bin

Setting environment variables:
PATH = Q:\Compiler\platform\HTML5\emsdk\upstream\emscripten;Q:\Compiler\platform\HTML5\emsdk\node\12.18.1_64bit\bin;Q:\Compiler\platform\HTML5\emsdk\python\3.7.4-pywin32_64bit;Q:\Compiler\platform\HTML5\emsdk\java\8.152_64bit\bin;Q:\Compiler\platform\HTML5\emsdk;Q:\Compiler\platform\HTML5\bin
EM_CONFIG = Q:\Compiler\platform\HTML5\emsdk\.emscripten
EM_CACHE = Q:/Compiler/platform/HTML5/emsdk/upstream/emscripten\cache
EMSDK_NODE = Q:\Compiler\platform\HTML5\emsdk\node\12.18.1_64bit\bin\node.exe
EMSDK_PYTHON = Q:\Compiler\platform\HTML5\emsdk\python\3.7.4-pywin32_64bit\python.exe
JAVA_HOME = Q:\Compiler\platform\HTML5\emsdk\java\8.152_64bit
emcc:WARNING: --js-opts ignored when using llvm backend
em++: error: Attempt to set a non-existent setting: 'OUTLINING_LIMIT'
 - did you mean one of INLINING_LIMIT?
 - perhaps a typo in emcc's  -s X=Y  notation?
 - (see src/settings.js for valid values)
distribute HTML5 to: C:/GLB/GLBasic/htmltest4/distribute/HTML5
*** Finished ***
Elapsed: 5.7 sec. Time: 14:37
Build: 5 succeeded.
--- End quote ---

Any ideas what I'm doing wrong? Am I missing a component to make this work? There's clearly an error in the compile but I don't know if it's relevant. A search on the forum throws up a thread from 2020 about OUTLINING_LIMIT but doesn't conclude anything. Really hope I can get this working on some level.

Help appreciated!

OUTLINING_LIMIT is an error I get when compiling with HTML5.
If I compile with HTML5-WebGL everything is OK
Tried with version 16.947 and the latest html5 Steam version (not sure which version)


[0] Message Index

[#] Next page

Go to full version