GLBasic forum

Main forum => GLBasic - en => Topic started by: spacefractal on 2023-Feb-06

Title: A HTML5/WebGL Journey (various fixes included to download)
Post by: spacefractal on 2023-Feb-06
EDIT: THE TOOLS AND FIXES IS IN THIS THREAD TO DOWNLOAD

any changes and fixes is in this post (im will edit that post by now):
https://www.glbasic.com/forum/index.php?topic=11576.msg102262#msg102262

https://spacefractal.itch.io - All ported games.

____________________

Actuelly PowerUp Elevation works fine, but has some issues.

Etc for start, why that tiny window? We need to change the html file to get it looks much nicer.

Also arrows keys seens not work? but in this case, can been a bug in code of course (which im thinks its is), same with sound fx ingame as sound in meny works as intended.
Title: Re: Taking a look on HTML WebGL
Post by: spacefractal on 2023-Feb-06
soon im can get that window works correctly in near full screens (none options buttons also works at all), then im will get the gameinput api to works with that as well or will give that a try.

Also there is a stupid bug in the compiled js code. for some reasons the pachages name using full local path to its data file, which its should not do that. So soon you move it, its would not work anymore.

Easy to fix, even im might need to do that after compiling. Its just a search and replace issue. Most important is really get the tiny window to work as excepted.

Then im have plans to put my some of games online on my webpage, so even im might have removed some of my Android games, you would still play them.
Title: Re: Taking a look on HTML WebGL
Post by: spacefractal on 2023-Feb-06
Found out SOUNDPLAYING() does not work with HTML5 (but ISMUSICPLAYING() does).

HTML5 with music so then works best with music commands and not sound, totally opposite of the Steam Deck (where music commands breaks the game, due a fullscreen window). Lol (but both works with wav throught).

Now im did added a USEMUSICOMMANDS, so music can uses either as a sample or streaming in the game. But managed to fix it throught.

Im do still wonder why that tine window, and no when im change the canvas, its still using 300x150 upscaled. would have been nice if im could get it to do it in 1280x720 as that game uses by default. Im do still have a strange issue with one of the font, that should been tiny too, but does very much opposite.

And also if the game can save its status? Here im have no idea im should uses document or appdata folder? or require a upload to a server. Not checked yet.

btw, if the canvas bug can been fixed, then PowerUp Elevation can been my first HTML5 game.
Title: Re: Taking a look on HTML WebGL
Post by: spacefractal on 2023-Feb-07
Now PowerUp Elevation have two issues left:

- The main canvas 320x150, which im wanted it should been in 1280x720, but have fixed a ingame font, that can been too big on those small resolutions. hihi.
- Im can not read files after a session. But its could been due a localhost issue. No idea here.
- Also im found out arrows keys and property also right mouse key (which we been honest should not been used as touchscreens dont have them) also not work. But for me they are low priotity issue as im have seen that before on other webgl games. So im in GameInput might move the arrows keys to been IJKL keys instead (but you can remap them).
- Also SOUNDPLAYING() did not work, so you might cannot uses SAMPLES for music, if you using it to looping it. but require to uses the MUSIC commands instead. Totally opposite than Steam Deck, that diddent like the MUSIC commands (showed a empty Windows Media Player window, caused the games to been unplayable. But im got a workaround around those. So not important for me either.

Except the above, PowerUp Elevation is fully playable and seens to looks fine. Im want that one to been my first HTMl5 Webgl game as its actuelly quite close, and a game you dont needs those arrows keys anyway.
Title: Re: Taking a look on HTML WebGL
Post by: spacefractal on 2023-Feb-07
im got a more progress on the game. trying to get the canvas in the right size.

Im got it partically to work, but the CANVAS does somehow upscaled by 1.5 and then the game still looks blurry due that upscaling.

Im cant get that work property, but still shows better and the game is now more playable. Not perfectly mind you.

PS. Im cant get any fullscreen/resize to work (hence im removed the buttons), but its actuelly not important right now at all.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-08
Im chossen to add level codes for the game, possible to perform them by mouse, keyboard and touch in the main menu and also possible to skip any levels as well.

So now PowerUp Elevation is completable without any save, if saves would been failed.

The only main issue im actuelly have left is that upscaling canvas issue and.... to get fullscreen working (which is not that important).
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-08
The canvas issue was due a issue in Windows, when you doing font bigger than 100% general. This also cause canvas to been scaled too for some reasons. This wont works in a game like this.

Anyway here is a test version im have uploaded:
https://spacefractal.itch.io/powerup-elevation

Its not perfect mind you, but its should been playable (level skip might not work as it should, fixing that later).

Game still not included in search by now (because im want it to been tested first). but enable that later this week (as well comments).
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-08
Im can confirm any mouse clicks is threated as a left button, dispite there is no right menu used in the canvas. so this is actuelly a bug. for this game mouse users could turn the burn with right button (or opposite the buttons showen, where the mouse pointer is).
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-10
got a another game playable, that is this one (and managed to fix the canvas issue, but its does still not auto resize, but a least on launch, so no more tiny window:
https://spacefractal.itch.io/the-beagle-jam

Etc from the 64x64 pixel jam ("converted using 96x64 pixel resolution).

That game diddent require save game or such at all. so a good candicate for such a version.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-11
im got most of the canvas issue fixed. The only main issue left with that imporant issue is notificy glbasic on a resize change. Then we soon get a nice and clean canvas.

This is the issue number one im want to get fixed, before checking other one, etc the arrow keys and right click. You can still get it playable without them really.
Title: Re: A HTML5/WebGL Journey
Post by: SnooPI on 2023-Feb-11
Spacefractal, this is normal for the right mouse click, HTML5 was designed for browsers.

Encouragement for your new projects  :good:
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-11
actuelly....

im just got right click to work. There was no reason to not to do that really, because right click menu was not there and you can seperate mouse and touch events by code. Controllers and keyboard can been supported as well. but not checked those yet. We do need a bit more c++ bindings from java script.

Would been like to see if possible to could been in same style as we did with Android with the Java communication.

Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-12
now, im finally got resize canwas to work. Looks insanely cool in PowerUp Elevation when you resize with the border im uses.

So status is:
- Canvas has finally property to works as intended. This does require some code as its not part of the source code. The main issue is GETDESKTOPSIZE does actuelly not refleks on the change, but you can workaround it quite easy.
- Right Click now works.

Missing is:
- Get Fopen functions to save.
- Get Arrow keys to works (property could do that directly in GameInput).
- Checkout if game controllers actuelly works, but since you can write JavaScript code directly as its was part of a c++ code, its can been a part of GameInput.
- Get fullscreen to work again.

Im will in this week start a new thread with all fixes.

Checkout:
https://spacefractal.itch.io/powerup-elevation

PS. Im will share this with othes of course. Its just sooner or later im send anything to Gernot.
Title: Re: A HTML5/WebGL Journey
Post by: loftcat on 2023-Feb-12
This game is looking very cool...great work. Really fun and cute !  =D
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-13
he thanks. im do still working improvement the html5 part. Its now looks much more proff after the internal start.

Today found up, you can still flip pages directly from the c++ code. That could example leads to integrate ads, because im stil not have found up how do a div overlay over a canvas... but you can control pages and the canvas size directly from glbasic.

So the loading now looks better rather than a black screen.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-14
Finally im also just got File Sync to the localDB to work, which means PowerUp Elevation does now save its settings and othr stuff.

Cool.

Look like im have various documentation how im have done all those changes to the default version. Now the game looks and plays very nice.

With those changes and the game also fell nice on the android and on the Android phone just fell like a native app.

The above can also leads we dropping native android support, but instead using this platform to build android app (and even ios and such). who know?

HTML5/webgl is fun.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-14
Here is how its look today, when compared to the first version..... much better. On Android, its fullscreen when you launch the game and orientation works pretty nice, even you should not play the game in the vertical mode. hihi. But does not crash.
Title: Re: A HTML5/WebGL Journey
Post by: Kitty Hello on 2023-Feb-20
Looks awesome.
I updated the GIT repository with a lot of changes. The HTML5 port now uses SDL2. You can choose what SDL version to use with the WANT_SDL_VERSION 1 or 2 macro.
I plan focusing more on SDL2 in the future, maybe it's about time to remove some ancient code now (PALM_WEBOS, GPHWIZ, GP2X, TINYGL etc.)
Can you merge your changes with the mouse and the console logging, please?
I'll make a template html page, that has no extras - just the canvas. If you want fullscreen, F11 should do the trick on firefox - we must get that working. On mobile platforms, the html page should always start in fullscreen mode...
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-20
im should do a push, but im think im will wait, due _build.bat wasent working for me (paths not found, so cannot test and make sure anything working). So...... here is the files (now all done in a tool):

https://1drv.ms/u/s!An17V5n5xcPmlk0_2vZpuMfOASOC?e=TOEPdZ



Currectly html5extras.gbas is required as im could not push the source code project yet, so Gernot you need to do that yourself, and changes what you need.

The canvas resize issue:

Code (glbasic) Select
    SUB GLB_ON_LOOP:
    ?IFDEF HTML5
        // CheckGameControllerStatus() (this is not working yet, but is working on it).
        LOCAL changed=CheckCanvasSize()
        IF changed=TRUE
            OS_Default_Settings(1) // or whatever you do when the canvas is got resized).
        ENDIF
    ?ENDIF

as GETDESKTOPSIZE() does not reflect to the SETSCREEN, but uses GETSCREENSIZE() instead. That works fine.

To get Filesystem working:
To get filesystem working using localdb, do a FileSystem_Mount() top in your code, and then dong a FileSystem_Sync() after a CLOSEFILE after you saved a file.

The default folder is /glbasicapp, but the platforminfo returns /tmp, which allways should been /glbasicapp. Etc a savefile$ could looks like SaveFile$="/glbasicapp/"+title$+"_AutoSave.ini"

HTMLKEY()
This should been a replacements for KEY() when using HTML5. Howover its will call javascript when html5 is used, or other than that, its will just return a regular KEY(). A little bit warning is. Keyboard layout using html is different than Windows is used (as you can see with the arrows key values). Im diddent do translate the scancodes for that yet.

HTMLPLAYSOUND()
As a direct replacements to get volume working. Im have still not checked panning throught. When running this commands on other platforms does just do a PLAYSOUND of course.

to get right click working:
uses the new lib_glb_plus.js and replace the old one. that one does not needs any added changes to get it working, so you can uses MOUSESTATE with right click now (the posttool does that for you now).

console logging:
This is completly removed as we has no need at all! We can uses Microsoft Edge logcat from the dev tools instead. All prints from c++ and Javascript is actuelly sendt to that by default, which is cool.

define HTML5:
but this code in the top:
Code (glbasic) Select
?DEFINE HTML5

?IFDEF ANDROID
    ?UNDEF HTML5
    USEMUSICOMMANDS=0
?ENDIF

?IFDEF WIN64
    ?DEFINE WIN32
    USEMUSICOMMANDS=0
?ENDIF

?IFDEF WIN32
    ?UNDEF HTML5
    ?DEFINE DESKTOP
    USEMUSICOMMANDS=0
?ENDIF
?IFDEF HTML5
    USEMUSICOMMANDS=1
?ENDIF

Im was not sure which define emscripten was used, as DEFINE HTML5 should been added really.

PS. Im used USEMUSICOMMANDS for the html5 define, because ISSOUNDPLAYING() did NOT working for HTML5, which has a low priotity really. But Steam Deck did not like any music commands, but was required for HTML5.
Title: Re: A HTML5/WebGL Journey
Post by: Kitty Hello on 2023-Feb-24
I'll see to find time and implement your changes. I updated to the latest Emscripten version and thus, we're soon up to date with the latest and greatest technology.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-24
Cool. Should not been that hard really.

the main issues im found was:
- Canvas diddent resize at all - This would property take most time to implement.
- ISSOUNDPLAYING() did not work, but did workaround instead. Not a biggie for me.
- MouseState did not work with right click. This was very easy to fix.
- KEY() does not work with some keys. This should been qutie easy to fix by the javascript call when implement it to KEY(). Been beware keylayout in JavaScript is not the same on Windows.
- Game saving can work using sync. This could been fixable in souce code under start and when CLOSEFILE is used.

Also im found not a way we can discard a folder under compilet (exclude files) as well im thinks we automatic should DEFINE HTML5 when emscripten is used for easier thing.

Im still missing how im can communicate with strings between JavaScript<->C++. When we got that to work, im can reimplement Gamecontroller support. The javascript is ready. but cant comminucate it to c++ throught yet, even its should been possible.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-27
Im have just replaced html5extras.gbas in the dropbox folder. Now its should grecefull countinue, if fs.sync() fails on the asserts(), which can been happens in some browsers and device. So its simply just countinue without saving (and warn the user with a no saving).

Hopefully PowerUp Elevation now can startup. Save or not.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-27
added a another game to my itch page:
https://spacefractal.itch.io/spot-race

That one, im fell, is one of a game with short time and works excellent as a html5 game.
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Feb-27
Don't work, stop to "LOADING SPOT RACE"
(Firefox 101)
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-27
Hmmm. its works fine here with both Firefox 110 and also 101 on my pc Windows 10 machine and on mobile (Chrome and Opera). So im need the logcat as im have no check what happens.

But do Im guess its property due assert() issue again? Even im did try to get around it with a try/catch, so its should countinue with no saving (hence im choosen this Spot Race version is a shorter game than the steam one). But its called directly from c++.

PS. In Firefore its Ctrl/Shift/i and then under console (that why we dont need a inbuildt logcat to a textfield as you can still check them). Im only need the last lines, so im can see where its stoppede.
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Feb-28
Console:

Unknown category for SetEventRecordingEnabled: page_load
Key event not available on some keyboard layouts: key="i" modifiers="accel,alt,shift" id="key_browserToolbox" browser.xhtml
Missing resource in locale en-GB: devtools/client/toolbox.ftl
Unknown property '-moz-border-radius'.  Declaration dropped.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-28
Its not the correct one. A succesful startup should look like this:

Code (glbasic) Select

downloading...
index.html:171 WARNING: using emscripten GL emulation. This is a collection of limited workarounds, do not expect it to work.
index.html:171 WARNING: using emscripten GL emulation unsafe opts. If weirdness happens, try -s GL_UNSAFE_OPTS=0
index.html:177 Preparing... (0/1)
index.html:177 Downloading data... (16384/18057863)
index.html:177 Downloading data... (65536/18057863)
index.html:177 Downloading data... (589824/18057863)
index.html:177 Downloading data... (983040/18057863)
index.html:177 Downloading data... (1638400/18057863)
index.html:171 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
index.html:171 falling back to ArrayBuffer instantiation
favicon.ico:1
       Failed to load resource: the server responded with a status of 404 (File not found)
index.html:177 Downloading data... (3178496/18057863)
index.html:177 Downloading data... (5570560/18057863)
index.html:177 All downloads complete.
index.html:177 Preparing... (0/1)
index.html:177 Preparing... (0/2)
index.html:177 Preparing... (0/3)
index.html:177 Preparing... (0/4)
index.html:177 Preparing... (0/5)
index.html:177 Preparing... (0/6)
index.html:177 Preparing... (0/7)
index.html:177 Preparing... (0/8)
index.html:177 Preparing... (0/9)
index.html:177 Preparing... (0/10)
index.html:177 Preparing... (0/11)
index.html:177 Preparing... (0/12)
index.html:177 Preparing... (0/13)
index.html:177 Preparing... (0/14)
index.html:177 Preparing... (0/15)
index.html:177 Preparing... (0/16)
index.html:177 Preparing... (0/17)
index.html:177 Preparing... (0/18)
index.html:177 Preparing... (0/19)
index.html:177 Preparing... (0/20)
index.html:177 Preparing... (0/21)
index.html:177 Preparing... (0/22)
index.html:177 Preparing... (0/23)
index.html:177 Preparing... (0/24)
index.html:177 Preparing... (0/25)
index.html:177 Preparing... (0/26)
index.html:177 Preparing... (0/27)
index.html:177 Preparing... (0/28)
index.html:177 Preparing... (0/29)
index.html:177 Downloading data... (10485760/18057863)
index.html:177 Downloading data... (15269888/18057863)
index.html:177 Downloading data... (17891328/18057863)
index.html:177 Downloading data... (18057863/18057863)
index.html:177 Preparing... (1/29)
index.html:177 Preparing... (2/29)
index.html:177 Preparing... (3/29)
index.html:177 Preparing... (4/29)
index.html:177 Preparing... (5/29)
index.html:177 Preparing... (6/29)
index.html:177 Preparing... (7/29)
index.html:177 Preparing... (8/29)
index.html:177 Preparing... (9/29)
index.html:177 Preparing... (10/29)
index.html:177 Preparing... (11/29)
index.html:177 Preparing... (12/29)
index.html:177 Preparing... (13/29)
index.html:177 Preparing... (14/29)
index.html:177 Preparing... (15/29)
index.html:177 Preparing... (16/29)
index.html:177 Preparing... (17/29)
index.html:177 Preparing... (18/29)
index.html:177 Preparing... (19/29)
index.html:177 Preparing... (20/29)
index.html:177 Preparing... (21/29)
index.html:177 Preparing... (22/29)
index.html:177 Preparing... (23/29)
index.html:177 Preparing... (24/29)
index.html:177 Preparing... (25/29)
index.html:177 Preparing... (26/29)
index.html:177 Preparing... (27/29)
index.html:177 Preparing... (28/29)
index.html:177 All downloads complete.
index.html:177 Running...
SpotRace.js:1 Can't init SDL-Video.
SpotRace.js:1 unknown SDL-emscripten error
SpotRace.js:1 Can't init SDL-Timer/Audio.
SpotRace.js:1 unknown SDL-emscripten error
SpotRace.js:1 Can't init SDL-IO.
SpotRace.js:1 unknown SDL-emscripten error
SpotRace.js:1 timer
SpotRace.js:1 rbow
SpotRace.js:1 rbow init
SpotRace.js:1 SDL_init video
SpotRace.js:1 SDL_GetVideoInfo = 300x150 @ 0 bpp. Screen 640x480
SpotRace.js:1 SDL 1.2 mode
SpotRace.js:1 Request SDL_OPENGL = 67108864
SpotRace.js:1 Request double buffer
SpotRace.js:1 set up SDL for OpenGL mode
SpotRace.js:1  -WebGL mode: 32 bits, SDL_OPENGL=!0x04000000!
SpotRace.js:1 set up SDL for OpenGL mode RGBA=8,8,8,8; Depth=24, Stencil=8, DoubleBuffer=1
SpotRace.js:1 Setting video mode: 640x480x32 vidflags=0x4000000
index.html:171 WARNING: using emscripten GL immediate mode emulation. This is very limited in what it supports
SpotRace.js:1 SDL_SetVideoMode seems to be 1
SpotRace.js:1 Testing glCommands
SpotRace.js:1 OpenGL is ready for use
SpotRace.js:1
SpotRace.js:1 Vendor     : WebKit
SpotRace.js:1 Renderer   : WebKit WebGL
SpotRace.js:1 Version    : OpenGL ES 2.0 (WebGL 1.0 (OpenGL ES 2.0 Chromium))
SpotRace.js:1 Extensions : ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_disjoint_timer_query EXT_float_blend EXT_frag_depth EXT_shader_texture_lod EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic EXT_sRGB KHR_parallel_shader_compile OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compre...
SpotRace.js:1
SpotRace.js:1 skipping size tests
index.html:171 TODO: glShadeModel
SpotRace.js:1 get accurate timer - 1st call
SpotRace.js:1 flip - 1st call
SpotRace.js:1 ext: glMultiTexCoord2fARB                  [FAILED]ext: glMapBufferARB                        [FAILED]ext: glUnmapBufferARB                      [FAILED]BGRA ext NOT supported
SpotRace.js:1 ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_disjoint_timer_query EXT_float_blend EXT_frag_depth EXT_shader_texture_lod EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic EXT_sRGB KHR_parallel_shader_compile OES_element_index_uint OES_fbo_render_mipmap OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context WEBGL_multi_draw GL_EXT_texture_env_combine GL_ARB_texture_env_crossbar GL_ATI_texture_env_combine3 GL_NV_texture_env_combine4 GL_EXT_texture_env_dot3 GL_ARB_multitexture GL_ARB_vertex_buffer_object GL_EXT_framebuffer_object GL_ARB_vertex_program GL_ARB_fragment_program GL_ARB_shading_language_100 GL_ARB_shader_objects GL_ARB_vertex_shader GL_ARB_fragment_shader GL_ARB_texture_cube_map GL_EXT_draw_range_elements GL_ARB_texture_compression GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic
SpotRace.js:1 Texture size limit: 16384
SpotRace.js:1 init fbo
SpotRace.js:1 2D VP
SpotRace.js:1 OGRB init [OK]
SpotRace.js:1 Cptn
SpotRace.js:1 Network
SpotRace.js:1 Input
SpotRace.js:1 Window mode
SpotRace.js:1 Create DXin
SpotRace.js:1 Key 00=ff
SpotRace.js:1 Key 01=1b
SpotRace.js:1 Key 02=31
SpotRace.js:1 Key 03=32
SpotRace.js:1 Key 04=33
SpotRace.js:1 Key 05=34
SpotRace.js:1 Key 06=35
SpotRace.js:1 Key 07=36
SpotRace.js:1 Key 08=37
SpotRace.js:1 Key 09=38
SpotRace.js:1 Key 0a=39
SpotRace.js:1 Key 0b=30
SpotRace.js:1 Key 0c=2d
SpotRace.js:1 Key 0d=3d
SpotRace.js:1 Key 0e=08
SpotRace.js:1 Key 0f=09
SpotRace.js:1 Key 10=71
SpotRace.js:1 Key 11=77
SpotRace.js:1 Key 12=65
SpotRace.js:1 Key 13=72
SpotRace.js:1 Key 14=74
SpotRace.js:1 Key 15=79
SpotRace.js:1 Key 16=75
SpotRace.js:1 Key 17=69
SpotRace.js:1 Key 18=6f
SpotRace.js:1 Key 19=70
SpotRace.js:1 Key 1a=5b
SpotRace.js:1 Key 1b=5d
SpotRace.js:1 Key 1c=0d
SpotRace.js:1 Key 1d=e0
SpotRace.js:1 Key 1e=61
SpotRace.js:1 Key 1f=73
SpotRace.js:1 Key 20=64
SpotRace.js:1 Key 21=66
SpotRace.js:1 Key 22=67
SpotRace.js:1 Key 23=68
SpotRace.js:1 Key 24=6a
SpotRace.js:1 Key 25=6b
SpotRace.js:1 Key 26=6c
SpotRace.js:1 Key 27=3b
SpotRace.js:1 Key 28=27
SpotRace.js:1 Key 29=60
SpotRace.js:1 Key 2a=e1
SpotRace.js:1 Key 2b=5c
SpotRace.js:1 Key 2c=7a
SpotRace.js:1 Key 2d=78
SpotRace.js:1 Key 2e=63
SpotRace.js:1 Key 2f=76
SpotRace.js:1 Key 30=62
SpotRace.js:1 Key 31=6e
SpotRace.js:1 Key 32=6d
SpotRace.js:1 Key 33=2c
SpotRace.js:1 Key 34=2e
SpotRace.js:1 Key 35=2f
SpotRace.js:1 Key 36=e5
SpotRace.js:1 Key 37=55
SpotRace.js:1 Key 38=e2
SpotRace.js:1 Key 39=20
SpotRace.js:1 Key 3a=39
SpotRace.js:1 Key 3b=3a
SpotRace.js:1 Key 3c=3b
SpotRace.js:1 Key 3d=3c
SpotRace.js:1 Key 3e=3d
SpotRace.js:1 Key 3f=3e
SpotRace.js:1 Key 40=3f
SpotRace.js:1 Key 41=40
SpotRace.js:1 Key 42=41
SpotRace.js:1 Key 43=42
SpotRace.js:1 Key 44=43
SpotRace.js:1 Key 45=53
SpotRace.js:1 Key 46=47
SpotRace.js:1 Key 47=5f
SpotRace.js:1 Key 48=60
SpotRace.js:1 Key 49=61
SpotRace.js:1 Key 4a=56
SpotRace.js:1 Key 4b=5c
SpotRace.js:1 Key 4c=5d
SpotRace.js:1 Key 4d=5e
SpotRace.js:1 Key 4e=57
SpotRace.js:1 Key 4f=59
SpotRace.js:1 Key 50=5a
SpotRace.js:1 Key 51=5b
SpotRace.js:1 Key 52=62
SpotRace.js:1 Key 53=63
SpotRace.js:1 Key 54=ff
SpotRace.js:1 Key 55=ff
SpotRace.js:1 Key 56=5c
SpotRace.js:1 Key 57=44
SpotRace.js:1 Key 58=45
SpotRace.js:1 Key 59=ff
SpotRace.js:1 Key 5a=ff
SpotRace.js:1 Key 5b=ff
SpotRace.js:1 Key 5c=ff
SpotRace.js:1 Key 5d=ff
SpotRace.js:1 Key 5e=ff
SpotRace.js:1 Key 5f=ff
SpotRace.js:1 Key 60=ff
SpotRace.js:1 Key 61=ff
SpotRace.js:1 Key 62=ff
SpotRace.js:1 Key 63=ff
SpotRace.js:1 Key 64=68
SpotRace.js:1 Key 65=69
SpotRace.js:1 Key 66=6a
SpotRace.js:1 Key 67=ff
SpotRace.js:1 Key 68=ff
SpotRace.js:1 Key 69=ff
SpotRace.js:1 Key 6a=ff
SpotRace.js:1 Key 6b=ff
SpotRace.js:1 Key 6c=ff
SpotRace.js:1 Key 6d=ff
SpotRace.js:1 Key 6e=ff
SpotRace.js:1 Key 6f=ff
SpotRace.js:1 Key 70=ff
SpotRace.js:1 Key 71=ff
SpotRace.js:1 Key 72=ff
SpotRace.js:1 Key 73=ff
SpotRace.js:1 Key 74=ff
SpotRace.js:1 Key 75=ff
SpotRace.js:1 Key 76=ff
SpotRace.js:1 Key 77=ff
SpotRace.js:1 Key 78=ff
SpotRace.js:1 Key 79=ff
SpotRace.js:1 Key 7a=ff
SpotRace.js:1 Key 7b=ff
SpotRace.js:1 Key 7c=ff
SpotRace.js:1 Key 7d=ff
SpotRace.js:1 Key 7e=ff
SpotRace.js:1 Key 7f=ff
SpotRace.js:1 Key 80=ff
SpotRace.js:1 Key 81=ff
SpotRace.js:1 Key 82=ff
SpotRace.js:1 Key 83=ff
SpotRace.js:1 Key 84=ff
SpotRace.js:1 Key 85=ff
SpotRace.js:1 Key 86=ff
SpotRace.js:1 Key 87=ff
SpotRace.js:1 Key 88=ff
SpotRace.js:1 Key 89=ff
SpotRace.js:1 Key 8a=ff
SpotRace.js:1 Key 8b=ff
SpotRace.js:1 Key 8c=ff
SpotRace.js:1 Key 8d=67
SpotRace.js:1 Key 8e=ff
SpotRace.js:1 Key 8f=ff
SpotRace.js:1 Key 90=ff
SpotRace.js:1 Key 91=ff
SpotRace.js:1 Key 92=ff
SpotRace.js:1 Key 93=ff
SpotRace.js:1 Key 94=ff
SpotRace.js:1 Key 95=ff
SpotRace.js:1 Key 96=ff
SpotRace.js:1 Key 97=ff
SpotRace.js:1 Key 98=ff
SpotRace.js:1 Key 99=ff
SpotRace.js:1 Key 9a=ff
SpotRace.js:1 Key 9b=ff
SpotRace.js:1 Key 9c=58
SpotRace.js:1 Key 9d=e4
SpotRace.js:1 Key 9e=ff
SpotRace.js:1 Key 9f=ff
SpotRace.js:1 Key a0=ff
SpotRace.js:1 Key a1=ff
SpotRace.js:1 Key a2=ff
SpotRace.js:1 Key a3=ff
SpotRace.js:1 Key a4=ff
SpotRace.js:1 Key a5=ff
SpotRace.js:1 Key a6=ff
SpotRace.js:1 Key a7=ff
SpotRace.js:1 Key a8=ff
SpotRace.js:1 Key a9=ff
SpotRace.js:1 Key aa=ff
SpotRace.js:1 Key ab=ff
SpotRace.js:1 Key ac=ff
SpotRace.js:1 Key ad=ff
SpotRace.js:1 Key ae=ff
SpotRace.js:1 Key af=ff
SpotRace.js:1 Key b0=ff
SpotRace.js:1 Key b1=ff
SpotRace.js:1 Key b2=ff
SpotRace.js:1 Key b3=ff
SpotRace.js:1 Key b4=ff
SpotRace.js:1 Key b5=54
SpotRace.js:1 Key b6=ff
SpotRace.js:1 Key b7=9a
SpotRace.js:1 Key b8=e6
SpotRace.js:1 Key b9=ff
SpotRace.js:1 Key ba=ff
SpotRace.js:1 Key bb=ff
SpotRace.js:1 Key bc=ff
SpotRace.js:1 Key bd=ff
SpotRace.js:1 Key be=ff
SpotRace.js:1 Key bf=ff
SpotRace.js:1 Key c0=ff
SpotRace.js:1 Key c1=ff
SpotRace.js:1 Key c2=ff
SpotRace.js:1 Key c3=ff
SpotRace.js:1 Key c4=ff
SpotRace.js:1 Key c5=48
SpotRace.js:1 Key c6=ff
SpotRace.js:1 Key c7=4a
SpotRace.js:1 Key c8=52
SpotRace.js:1 Key c9=4b
SpotRace.js:1 Key ca=ff
SpotRace.js:1 Key cb=50
SpotRace.js:1 Key cc=ff
SpotRace.js:1 Key cd=4f
SpotRace.js:1 Key ce=ff
SpotRace.js:1 Key cf=4d
SpotRace.js:1 Key d0=51
SpotRace.js:1 Key d1=4e
SpotRace.js:1 Key d2=49
SpotRace.js:1 Key d3=7f
SpotRace.js:1 Key d4=ff
SpotRace.js:1 Key d5=ff
SpotRace.js:1 Key d6=ff
SpotRace.js:1 Key d7=ff
SpotRace.js:1 Key d8=ff
SpotRace.js:1 Key d9=ff
SpotRace.js:1 Key da=ff
SpotRace.js:1 Key db=e3
SpotRace.js:1 Key dc=e7
SpotRace.js:1 Key dd=76
SpotRace.js:1 Key de=ff
SpotRace.js:1 Key df=ff
SpotRace.js:1 Key e0=ff
SpotRace.js:1 Key e1=ff
SpotRace.js:1 Key e2=ff
SpotRace.js:1 Key e3=ff
SpotRace.js:1 Key e4=ff
SpotRace.js:1 Key e5=ff
SpotRace.js:1 Key e6=ff
SpotRace.js:1 Key e7=ff
SpotRace.js:1 Key e8=ff
SpotRace.js:1 Key e9=ff
SpotRace.js:1 Key ea=ff
SpotRace.js:1 Key eb=ff
SpotRace.js:1 Key ec=ff
SpotRace.js:1 Key ed=ff
SpotRace.js:1 Key ee=ff
SpotRace.js:1 Key ef=ff
SpotRace.js:1 Key f0=ff
SpotRace.js:1 Key f1=ff
SpotRace.js:1 Key f2=ff
SpotRace.js:1 Key f3=ff
SpotRace.js:1 Key f4=ff
SpotRace.js:1 Key f5=ff
SpotRace.js:1 Key f6=ff
SpotRace.js:1 Key f7=ff
SpotRace.js:1 Key f8=ff
SpotRace.js:1 Key f9=ff
SpotRace.js:1 Key fa=ff
SpotRace.js:1 Key fb=ff
SpotRace.js:1 Key fc=ff
SpotRace.js:1 Key fd=ff
SpotRace.js:1 Key fe=ff
SpotRace.js:1 Key ff=ff
SpotRace.js:1 Key 100=ff
SpotRace.js:1 Key 101=ff
SpotRace.js:1 Key 102=ff
SpotRace.js:1 Key 103=ff
SpotRace.js:1 Key 104=ff
SpotRace.js:1 Key 105=ff
SpotRace.js:1 Key 106=ff
SpotRace.js:1 Key 107=ff
SpotRace.js:1 Key 108=ff
SpotRace.js:1 Key 109=ff
SpotRace.js:1 Key 10a=ff
SpotRace.js:1 Key 10b=ff
SpotRace.js:1 Key 10c=ff
SpotRace.js:1 Key 10d=ff
SpotRace.js:1 Key 10e=ff
SpotRace.js:1 Key 10f=ff
SpotRace.js:1 Key 110=ff
SpotRace.js:1 Key 111=ff
SpotRace.js:1 Key 112=ff
SpotRace.js:1 Key 113=ff
SpotRace.js:1 Key 114=ff
SpotRace.js:1 Key 115=ff
SpotRace.js:1 Key 116=ff
SpotRace.js:1 Key 117=ff
SpotRace.js:1 Key 118=ff
SpotRace.js:1 Key 119=ff
SpotRace.js:1 Key 11a=ff
SpotRace.js:1 Key 11b=ff
SpotRace.js:1 Key 11c=ff
SpotRace.js:1 Key 11d=ff
SpotRace.js:1 Key 11e=ff
SpotRace.js:1 Key 11f=ff
SpotRace.js:1 Key 120=ff
SpotRace.js:1 Key 121=ff
SpotRace.js:1 Key 122=ff
SpotRace.js:1 Key 123=ff
SpotRace.js:1 Key 124=ff
SpotRace.js:1 Key 125=ff
SpotRace.js:1 Key 126=ff
SpotRace.js:1 Key 127=ff
SpotRace.js:1 Key 128=ff
SpotRace.js:1 Key 129=ff
SpotRace.js:1 Key 12a=ff
SpotRace.js:1 Key 12b=ff
SpotRace.js:1 Key 12c=ff
SpotRace.js:1 Key 12d=ff
SpotRace.js:1 Key 12e=ff
SpotRace.js:1 Key 12f=ff
SpotRace.js:1 Key 130=ff
SpotRace.js:1 Key 131=ff
SpotRace.js:1 Key 132=ff
SpotRace.js:1 Key 133=ff
SpotRace.js:1 Key 134=ff
SpotRace.js:1 Key 135=ff
SpotRace.js:1 Key 136=ff
SpotRace.js:1 Key 137=ff
SpotRace.js:1 Key 138=ff
SpotRace.js:1 Key 139=ff
SpotRace.js:1 Key 13a=ff
SpotRace.js:1 Key 13b=ff
SpotRace.js:1 Key 13c=ff
SpotRace.js:1 Key 13d=ff
SpotRace.js:1 Key 13e=ff
SpotRace.js:1 Key 13f=ff
SpotRace.js:1 Key 140=ff
SpotRace.js:1 Key 141=ff
SpotRace.js:1 Key 142=ff
SpotRace.js:1 Key 143=ff
SpotRace.js:1 Key 144=ff
SpotRace.js:1 sdl_grab
SpotRace.js:1 getexe
SpotRace.js:1 cd
SpotRace.js:1 exepath=curdir= .
SpotRace.js:1 shoeboxing...
SpotRace.js:1 init gettimer
SpotRace.js:1 clear screen
SpotRace.js:1 flip
SpotRace.js:1 mk2D
SpotRace.js:1 finding font...
SpotRace.js:1 open sound: 44100 Hz 2 chan, buffers 4096, format -32752
SpotRace.js:1 Init Finalized
SpotRace.js:1 trying to FileSystem_Mount() the localdb()
SpotRace.js:1 done
SpotRace.js:1 [GLB]->Graphics Resoulutuon: 300x150
SpotRace.js:1 [GLB]->Scaling Used: .3051757812
SpotRace.js:1 [GLB]->Frames Per Second: 60
6WebGL: INVALID_OPERATION: texParameter: no texture bound to target
SpotRace.js:1 emsc-loop: GLB_ON_LOOP
SpotRace.js:1 [GLB]->Graphics Resoulutuon: 1707x846
SpotRace.js:1 [GLB]->Scaling Used: 1.376953125
SpotRace.js:1 [GLB]->Frames Per Second: 60
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 1.wav
index.html:171 Cannot find preloaded audio /Media/1.wav
SpotRace.js:1 [GLB]->error in PAINT(): mark
SpotRace.js:1 [GLB]->Load
index.html:177
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 2.wav
index.html:171 Cannot find preloaded audio /Media/2.wav
SpotRace.js:1 [GLB]->Sprite Loaded: marking.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 3.wav
index.html:171 Cannot find preloaded audio /Media/3.wav
SpotRace.js:1 [GLB]->Sprite Loaded: black.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 trying TO do a FS.syncfs(TRUE)
SpotRace.js:1 done
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 4.wav
index.html:171 Cannot find preloaded audio /Media/4.wav
SpotRace.js:1 [GLB]->Sprite Loaded: colors.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 5.wav
index.html:171 Cannot find preloaded audio /Media/5.wav
SpotRace.js:1 [GLB]->Sprite Loaded: spots_2.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 6.wav
index.html:171 Cannot find preloaded audio /Media/6.wav
SpotRace.js:1 [GLB]->Sprite Loaded: cir.png
SpotRace.js:1 [GLB]->Sprite Loaded: noise.jpg
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 7.wav
index.html:171 Cannot find preloaded audio /Media/7.wav
SpotRace.js:1 [GLB]->Sprite Loaded: bg2.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 8.wav
index.html:171 Cannot find preloaded audio /Media/8.wav
SpotRace.js:1 [GLB]->Sprite Loaded: bg3.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 9.wav
index.html:171 Cannot find preloaded audio /Media/9.wav
SpotRace.js:1 [GLB]->Sprite Loaded: bg1.png
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 10.wav
index.html:171 Cannot find preloaded audio /Media/10.wav
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 12.wav
index.html:171 Cannot find preloaded audio /Media/12.wav
SpotRace.js:1 [GLB]->Load
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 11.wav
index.html:171 Cannot find preloaded audio /Media/11.wav
SpotRace.js:1 [GLB]->LoadGameFile()
SpotRace.js:1 [GLB]->LoadStr: /glbasicapp/SpotRace_hiScore.ini 1
SpotRace.js:1 [GLB]->FileFound
SpotRace.js:1 [GLB]->LOAD A GAME....
SpotRace.js:1 [GLB]->LoadStr: /glbasicapp/SpotRace_AutoSave.ini 1
SpotRace.js:1 [GLB]->FileFound
SpotRace.js:1 [GLB]->STATUS LOAD: Play
SpotRace.js:1 [GLB]->tmenu.reset
SpotRace.js:1 [GLB]->tmenu.load
SpotRace.js:1 [GLB]->SOUND_OPTION: 0
SpotRace.js:1 [GLB]->score.load
SpotRace.js:1 [GLB]->SoundPlay: fx10
SpotRace.js:1 [GLB]->Play
index.html:171 Cannot find preloaded audio /Media/race_for_the_circle.mp3
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 12.wav
SpotRace.js:1 [GLB]->Play
SpotRace.js:1 [GLB]->SoundLoad()
SpotRace.js:1 [GLB]->SoundLoad: 13.wav
SpotRace.js:1 request: fopen("13.wav", "rb") failed
SpotRace.js:1 [GLB]->Play
SpotRace.js:1 [GLB]->Graphics Resoulutuon: 875x846
SpotRace.js:1 [GLB]->Scaling Used: 1.068115234
SpotRace.js:1 [GLB]->Frames Per Second: 60
SpotRace.js:1 [GLB]->Play


Since its seen the game was started, so its somewhere after comply of [GLB]-> lines. Also sound files that fails is property becaues its search more than one folder.

If its does not show more, then im have no clue what its really happens. Spooky as its works fine here, a least with the Windows version.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-28
Just updated the game, so its now have a counter. remember to hold control-f5 when update the game. on some browser caching can been senative. Its works, when you see a [counter] on the "Loading Spot Race" line.

EDIT: and updated the game again. Some savegame bugs, when played in 4x4 fixed. But if the game does start, im would like to know which number its stopped to (1-32).
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Feb-28
i tried again but the game crashes at LOAD SPOT RACE (0] or [2] and once at [4].
I tried on Chrome latest version on the same win10 PC and it works. On android perfect
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-28
so its crash loading on some png images. wierd and even when its some times crash. hmmm. Im do remember im have seen that issue before, not just on html5, but also on android (AND on Window) as well.

Im have updated again, and have resaved various of the png files in gimp using compression 8 in RGBA format and only uses power of 2 files.

Also just to make sure, if GLB_ON_LOOP() is asyncron (im have no idea yet), then its wont call the loading twice on the same image, if its should been this case.

Its also wierd as on this machine its did worked with Firefox 101 as well. Not just on newest version.
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Feb-28
SF all OK I did a refresh of Fierefox and now the game works.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Feb-28
that cool. so its something wrong with the png files. Im have heard this issue before as im said. So uses RGBA and compression 8. that seens works nice so.

Thanks for testing. Howover its could also been a asyncon issue. Im havent checked in this case, but just was if its was.

But thanks you for the checking.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-02
Now im have 4 projects online, still missing 2:
https://spacefractal.itch.io/

Now next project is Karma Miwa, which is one of the bigger game, while gamesize is still quite small. Howover gone would been the various mipmapping style graphics im did for those games. So im only uses the high resolution assests for that game (easy to instant scale them without reloading).

For Genius Greedy Mouse, im might only add the maze edition online, which the puzzle one property would require some sort of a paid thing as the only game im will do it.

There is no ads for any of my game, even im later could implement those (im added a cookie message thing, but could uses that for ads banners really as canwas would just resize).
Title: Re: A HTML5/WebGL Journey
Post by: SnooPI on 2023-Mar-03
Hi Spacefractal!
Only "Jam Beagle" works for me on the latest version of Firefox, the others are blocked after downloading  :(
On Microsoft Edge, everything works fine  :good:
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-03
then im need the logcat, or im have no change what happens. Here its all works fine (include Firefox). Only im can see its the damn assert() thing (the game should just countinue without saving), but im does need the logcat, so im can see where its stopped. Sometimes refresh does work (with holding dong ctrl).

Firefox have such a tool im previous has describted. Jam Beagle does not uses saving at all, or if its has a loading picture, where its stopped.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-03
that game wasent designed with that widescreen in mind. lol.... hehe. Clouds example does not repeats on the right and...... birds was flapping without flying, when they was not near you. hehe. Birds has howover been fixed, so its fly down, even most people wont se that.

Scaling was quite broken for this game (mostly fixed, some clouds still missing, rest works), but its seends in the ends is samller than PowerUp Elevation (property due fewer tunes used).
Title: Re: A HTML5/WebGL Journey
Post by: MrPlow on 2023-Mar-04
I noticed a few html - AV Bitdefender errors
Not sure if itch.io was issue or a html5 method...?

Will try again soon and post if i see again...
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-04
Im cant do anthing when a anti virus is too aggresive as some of those is. Im have only used it with AVG and there is no issues here. Im cant do anything if such a app has blocked the app from running.

But in all cases im can only do checking if im get the logcat.

Here im have tested with Opera, Firefox, Edge and Chrome. All works for me. Sometimes saving dont works, but the best case here im want it to countinue without crash. im have idea, if its got blocked before its trying doing that.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-05
Now Karma Miwa is only, the 5th game. Now im only missing Genius Greedy Mouse. That game might take some time as scaling need to been redesigned a bit as its was with Karma Miwa (the mipmapping feature im used on those games cant been used as a webgl game, due you can resize them in anytime, but looks ace when you doing it).
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Mar-05
Code (glbasic) Select
Only "Jam Beagle" works for me on the latest version of Firefox, the others are blocked after downloading

Perhaps need only "refresh of Firefox" so i solved it
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-05
its still wierd. Jam Beagle does not do a mount and sync features as its does not require any saving at all, but all other games does it for saving settings and game (which uses localdb, which a antivirus might have blocked it). In the new Karma Miwa, im do first read the settings quite late in the loading, if that help.

Im does not uses any cookies, but localdb for saving stuff (other than those itch is using).

btw, 5 games is ported, and only missing Greedy Mouse. Karma Miwa seens also runs fine for me. Im cant garentee works in all combinations of course. But im do like this platform very much (scaling looks so cool when its finally works), so what a heck did im not look with this platform eailer?

PS. Im forgot to reposition clouds when you resize the game, lol. but fixing its self after you doing or restart throught. Im fixing that later, not a vital bug.
Title: Re: A HTML5/WebGL Journey
Post by: SnooPI on 2023-Mar-07
I was in private browsing, in normal mode everything works  ;)
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-07
Ah thanks. Now im thinks im know what is happens on the crash on launch:

When assert() fails, then its actuelly just call a abort("Assertion failed: "+text) in the JavaScript code, then its will simply just quit. Why have they do it that way? Its would been much better to just do a minor error, so im could catch it instead.

That issue is fixed, just need to update the games. Of course its does lose the saving when doing inprivate and such features, but the game should still run.

Also Im today have done a little post tool, so its added those fixes and files (include the assert() one), so you only needs to implemnts the changes in your gode, where canvas, keyboard and files is used.

Until im or Gernot have updated the steam version, here is the tool...

PS. Karma Miwa is updated (rest is follow on) and should also now run in a private vindoe, but of course save files deleted when leave, but its run. Thanks to let me know, so im finally could reproduce the issue.

PPS. Removed this version of posttool. use the version im uploaded to dropbox (in the same post im did the various fixes.

Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-09
Genius Greedy Mouse is now weblgl'ed. The last of the 6 glbasic im have did.

Im do still miss to update few of the games with the assert() bug fixed, so its dont crash on startup like that (PowerUp Elevation, Spot Race and CatchOut).

ALso if im can get GameController support working im wilil update 4 of the games again (Spot Race and CatchOut is purely mouse/touchscreen game).

Let me know if some need help with html5/webgl. Im sure its happens. Its really a fun platform to work with and something im have missed back in the Java days to create browser games and with those fixes im did, then its really began nice.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-09
ohh dear. found a another annoying nasty issue, but its does not crash or anything like that.

FileSystem_HasbeenMounted() im did in the html5extras is a asyncron call, which means its take some frames for the feature to been done. That means, if you load your game too early, there was no files to been found, until the mount has been done().

younk.

FileSystem_HasbeenMounted() is need, so its can been checked in the GLB_ON_LOOP() code. (the posttool has been reflected of course to add that).

All my webgl games should fixed those. Hopefully they now all works as intended. So im finally annonced my games in the annonce forum.
Title: Re: A HTML5/WebGL Journey
Post by: Kitty Hello on 2023-Mar-09
if you type "await" before a function call, it should not continue until the asynchronous task is completed.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Mar-09
its was inside the JavaScript code, called directly from c++ (but wasent aware of await) and there was some confusion. And its seen its take comply of frame, so waiting is actuelly not a good idea either really.

anyway its works as intended and a another function can check it under loading, so the games can show something to you without its freezing.

Instead im just added a another function that checks when the task have been done or failed, so its wait just before when the load game progress is required (and later than normal)..... and with no a black screen.
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Apr-29
bugs found so far:

ISSOUNDPLAYING() does not work.

VOLUME argument for PLAYSOUND does not work. Possible to do a workaround. Just fixed by the tool.

MOUSEWAIT does not work, but this command would newer work for this platform anyway, and hence its shoudl been depreacted. So im will not fix this command.
Title: Re: A HTML5/WebGL Journey
Post by: hardyx on 2023-Jul-05
Quote from: spacefractal on 2023-Mar-02Now im have 4 projects online, still missing 2:
https://spacefractal.itch.io/
I tested some games (Greedy Mouse, Spot Race, PowerUp Elevation) in Firefox version 102.13.0.esr and all works Ok. The sound is a bit loud in some, like you said. I'm impressed with your fixes to GLBasic HTML5. Greedy Mouse is art.
Thanks for the updates.  :booze:
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Jul-15
Greedy Mouse was not even the worst game port over to html5 and only was contains minor issues. Yes, the tile size in that game is big, hehe (200x200px).

Im could only uses one size (the game could uses 3 sizes, 50, 100 or 200px) for that port throught (the biggest one of course), due user could resize in any size.

Today im have 7 games, all using the scripts from the posttool im have done. Yes sound was quite too loud in Cave Hereos. But im do not touch the rest throught. (im not sure which games you talked about, hihi).
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Sep-04
Quote from: spacefractal on 2023-Feb-20to get right click working:
uses the new lib_glb_plus.js and replace the old one. that one does not needs any added changes to get it working, so you can uses MOUSESTATE with right click now (the posttool does that for you now).

SF where can I find the new lib_glb_plus?
Thanks
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Sep-05
not sure what its was happens. anyway the dropbox link is just updated to included the missing file. no idea why its was happens.

Sorry for that.
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2023-Sep-06
Don't worry SF, perfect, tried and the right mouse works. Thank you :nw:
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2023-Sep-07
Just to been aware, you cant uses right click on a touch screen and currectly no way to detect it really. Im have tried, but its not a good one yet. So you should add a alternative to right click of course.
Title: Re: A HTML5/WebGL Journey
Post by: Dabz on 2024-Feb-16
I know this is an old thread, but how did you manage to get right-click to work?

Dabz
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2024-Feb-16
Quote from: spacefractal on 2023-Feb-20
to get right click working:
uses the new lib_glb_plus.js and replace the old one. that one does not needs any added changes to get it working, so you can uses MOUSESTATE with right click now (the posttool does that for you now).
Title: Re: A HTML5/WebGL Journey
Post by: Dabz on 2024-Feb-16
How the hell did I miss that!?!

To be honest, I've been bouncing searching for stuff, I probably got blind to it! :D lol

Anyway, cheers Qedo for that post, it worked a treat much appreciated, I nearly considered requesting a refund from Steam, but your post saved the day! \o/

While I'm here, if you don't mind, do you know where html5extras.gbas is located for HTMLKey() as obviously it's not defined, I've looked in the dropbox link, had a nosey, downloaded some zips, and, well, cannot find it!?!

No doubt, it'll be obvious, but, even a search of the site just reveals where I saw that post with the tools.zip dropbox link (Really, with all the suggestions etc etc, these updates should be in a sticky thread with links provided)

Dabz
Title: Re: A HTML5/WebGL Journey
Post by: Qedo on 2024-Feb-16
you found it in:
HTML5\tools\HtmlPost.app\Media
Title: Re: A HTML5/WebGL Journey
Post by: Dabz on 2024-Feb-16
Quoteyou found it in:
HTML5\tools\HtmlPost.app\Media

You sir, are a legend, thank you! :)

Dabz
Title: Re: A HTML5/WebGL Journey
Post by: spacefractal on 2024-Feb-18
me that fixed it. the tool should copy the file automatic as im remember. a least the newest one. Im did do linked to the tool from the first post.

Joypad is still not supported as its require to get string javascript c++ communtion working first (integers etc is).
Title: Re: A HTML5/WebGL Journey (various fixes included to download)
Post by: spacefractal on 2024-Feb-18
im have choosen to sticky this thread by now. this was not by ads for my own games. but also added a tool that fixes some important issues, caused this platform much more to enjoy.