Posted: 22nd Dec 2022 8:33
Guides & Info:
Known Limitations & Bugs:
Posted: 22nd Dec 2022 15:13
Very useful and informative. Thanks for creating this.
Posted: 22nd Dec 2022 23:52
glad you found it helpful, globbits. now post something @ itch for me to play
Posted: 23rd Dec 2022 10:21
I tried, but running into trouble. The game crashes when trying to create a memblock.



Not sure why as it never needs to create a memblock that big. I don't know where that number is coming from. I'll need to investigate.
The game runs fine in all other configurations: Windows, Linux and Android APK so could make it difficult to debug!
Posted: 23rd Dec 2022 15:58
This was posted in another thread before but I'll mention it here too. If your itch.io game needs to access external pages you will likely have to set the access-control-allow-origin header for the page being accessed. For my purpletoken hi-score site I had to do this for itch.io games to send/receive the scores. In PHP you can set the header like this: header("Access-Control-Allow-Origin: *");
Posted: 9th Feb 2023 20:42
it's been asked for in the past so let's convert this thread to a Knowledge Base for "all things" HTML Export.

Feel free to supply links to useful info regarding HTML Export nuances, issues & limitations, work-arounds, enhancements and supplemental work that i can compile in the first post.

and, feel free to post a guide or informative post in this thread that i can direct to if you'd rather not create a separate thread.
Posted: 24th Apr 2023 0:47
added:
SetSoundInstanceRate() does nothing (works fine on WIN V2023.01.25)
GetSoundMaxRate() & GetSoundMinRate() = 1
Posted: 24th Apr 2023 18:59
from Discord chat with Ranietz re: Studio HTML Export's Fullscreen bug:
the Fullscreen paramater in SetWindowSize( ) can be set to enter FS Mode in HTML.

Usage:
+ Code Snippet
...
FS = -1

do
	If GetRawKeyPressed(112) // [F1] Key
		FS = -FS
		If FS = 1 then SetWindowSize( 1024, 768, 1 ) else SetWindowSize( 1024, 768, 0 )
		UpdateDeviceSize(1024,768)
	EndIf
...
loop

the .js Fullscreen link in the Studio-generated HTML file should be removed a la Demo at itch.io
+ Code Snippet
SetErrorMode(2)

#CONSTANT Platform$ = GetDeviceBaseName()

// set window properties
SetWindowTitle( "Studio Fullscreen" )

SetWindowSize( 1024, 768, 0 )

SetWindowAllowResize( 1 ) // allow the user to resize the window

// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )

FS = -1
RED = MakeColor(255,0,0)

do
	If GetRawKeyPressed(112) // [F1] Key
		FS = -FS
		If FS = 1 then SetWindowSize( 1024, 768, 1 ) else SetWindowSize( 1024, 768, 0 )
		UpdateDeviceSize(1024,768)
	EndIf
	DrawBox(0,0,1023,767,Red, Red, Red, Red, 0)
    Print( "[F1] Toggle Fullscreen" )
    Print( "Window: " + STR(GetWindowWidth()) + "x" + STR(GetWindowHeight()))
    Print( "Base: " + STR(GetDeviceWidth()) + "x" + STR(GetDeviceHeight()) )
    Print( "Max: " + STR(GetMaxDeviceWidth()) + "x" + STR(GetMaxDeviceHeight()) )
    Sync()
loop

note potential issues when scaling via browser @ different modes (FS/Non-FS); can return to original values but, for example, i scale browser and Windows? so this is not completely Responsive.
Posted: 11th Aug 2023 2:31
Sound/Music may become garbled or not play at all when focus on canvas is lost (scrolling away or selecting/opening another tab/instance during play). removing SetVSync(1) rectifies (with loss of VSync which may not be necessary/can be controlled with full, manual control via timer-based actions/movement?)

*my recent issue involved .ogg music play (looping) and most (but not all) browsers (including Edge).