Compiling to html5?

Previous topic - Next topic

Qedo

Hi all.
update to try to fix the HTML5 problem (missing emscripten for version 16.508).
I downloaded the latest version of emscripten from:
https://emscripten.org/docs/getting_started/downloads.html

and I created a folder C: \ Users \ Qedo \ Desktop \ emsdk-master where I unzipped the zip
then I ran the following three commands from cmd
1) C: \ Users \ Qedo \ Desktop \ emsdk-master> emsdk install latest
2) C: \ Users \ Qedo \ Desktop \ emsdk-master> emsdk activate latest
3) C: \ Users \ Qedo \ Desktop \ emsdk-master> emsdk_env.bat
unfortunately the automatic setting of the 5 Setting environment variables (EMSDK, EM_CACHE, EMSDK_PYTHON, JAVA_HOME) did not work and therefore I added them manually.
At this point I ran "Build Multiplatform - Html5" from GlBasic where the * .js file is generated but not the * .html file with the following output:

compile + link:
Adding directories to PATH:
PATH + = C: \ Users \ Qedo \ Desktop \ emsdk-master
PATH + = C: \ Users \ Qedo \ Desktop \ emsdk-master \ upstream \ emscripten
PATH + = C: \ Users \ Qedo \ Desktop \ emsdk-master \ node \ 12.18.1_64bit \ bin
PATH + = C: \ Users \ Qedo \ Desktop \ emsdk-master \ python \ 3.7.4-pywin32_64bit
PATH + = C: \ Users \ Qedo \ Desktop \ emsdk-master \ java \ 8.152_64bit \ bin

Setting environment variables:
EMSDK = C: / Users / Qedo / Desktop / emsdk-master
EM_CONFIG = C: \ Users \ Qedo \ Desktop \ emsdk-master \ .emscripten
EM_CACHE = C: / Users / Qedo / Desktop / emsdk-master / upstream / emscripten \ cache
EMSDK_NODE = C: \ Users \ Qedo \ Desktop \ emsdk-master \ node \ 12.18.1_64bit \ bin \ node.exe
EMSDK_PYTHON = C: \ Users \ Qedo \ Desktop \ emsdk-master \ python \ 3.7.4-pywin32_64bit \ python.exe
JAVA_HOME = C: \ Users \ Qedo \ Desktop \ emsdk-master \ java \ 8.152_64bit
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: D: / GLBASIC / appname/ distribute / HTML5
exit
success


The question I ask you is:
has anyone already had the following problems (lack of html) and has already solved it? how?
Thank you
Ad maiora

SnooPI

GLB and HTML5...  an old old question/problem never really solved.

Personally, I think Emscripten was never the solution, a true GLB to HTML5 translator would be the best solution.
I think SP agreed with me on this (to be confirmed).

Qedo

anyone use html5 with GLB steam version?

erico

I haven´t tried yet, did a bit a long time ago, before STEAM version, and I could get some basics going on certain browsers, I´m not sure how they fare today.

dreamerman

Quote from: SnooPI on 2020-Jul-29
GLB and HTML5...  an old old question/problem never really solved.
Yes, at least for me, I wasn't able to compile something more complicated than basic tutorials/projects, not sure what was problem, PolyVector, RenderToTexture or maybe something else, but just alywas were some errors. Now new standard gains popularity - WebAssembly, maybe this would be possible with GLB..

@Qedo
those errors like:
Code (glbasic) Select
em ++: error: Attempt to set a non-existent setting: 'OUTLINING_LIMIT'
mean that command line arguments for compiling are specified for older version of emscripten, current version (that You have installed) doesn't support them. Even if You will fix proper batch files/commands new issues will appear, related to same thing - html5 target configured for old emscripten. I one of my previous post I mentioned that, but I didn't play with it further, just because it has no point for me (putting to much time in that), and not sure if all GLB stuff will work in html5 target (as mentioned above) and hm.. let's finish on that :-) But it would be very appreciated to have html5 fully working.

Check my source code editor for GLBasic - link Update: 20.04.2020

Qedo

in fact Html5 on V16 is a bad mess

Qedo

for now both in Html5 and android I compile with v15  :giveup:

Qedo

Hey you
has anyone tried in html5 to go directly to full screen bypassing the initial emscripten screen?
Furthermore it seems to me that in full screen the management of the mouse reports false values. does anyone confirm?

SnooPI

I don't use Emscripten (I use my own GLB->HTML5 translator), but I think you can change that in "Bin/glbasic_template.html"

About the mouse I don't know  :(

Qedo

in fact i think i will write my GLB-> HTML5 translator too if i feel like it. at least for 2d.
From your experience how long will it take?
Also I'll look back at Metzzo's GLBScript / 123basic.

SnooPI

My translator is based on the old (but very good) Metzzo's 123basic.

I fixed some bugs, optimized the code, reduced the size of the translated file and added some stuff.
But on this date, 3D doesn't work  :'(
For 2D it works very well in SD (640x480 or 800x480) but is a bit slow in HD.
But this is normal because it doesn't use WebGl. Later, I plan to make a WebGl version.
The advantage of not using WebGl is better compatibility, but the best would be to create 2 versions and detect if WebGl is enabled or not (I'll work on it when I have more time).

I don't recommend starting from scratch for your translator.
Use Metzzo's translator as a basis -OR- make a small demo that uses the functions you use in your games, I will test this demo with my translator and if it works, I will make a small standalone version of my translator for you (and of course also for others who would be interested) to allow you to easily translate your games into H5.

My message was a bit long, I hope I was clear even in English  ;)

Ps: The 123basic site is offline but apparently there is still a very old version on Github.

Ps2: It's a pity not to see Metzzo on this Forum anymore, he was a very good GLB programmer  :(

Qedo

Great.
thanks SnooPI for the help.
In the meantime, I downloaded 123basic from Github and will try to work on it. I consider your proposal for the future; certainly it would be interesting to develop the Webgl version to speed up the applications.

ad maiora

Qedo

but sorry am the only one who is trying to compile html5 with v16?
Possible?
I would like to solve this (only for me?) problem because looking on the internet Emscripten seems to be a really good solution.
We try to make it work for GLB too.

Qedo

toc toc......
is there anyone?  :bed:

erico

I will be interested on it in a little while, don´t have time to mess with it yet(probably only later this year).
I did try it a long ago with a non-steam version and it kinda worked but I just ported a project instead of making one specific for it, so it had some problems.