New HTML Build (Updated)

I fixed blurry images and low fps in the HTML build.

There is also an issue with zooming the browser before loading the level: [HTML5]: runtime bug · Issue #372 · coronalabs/corona · GitHub

It seems to be related to floating point or something (I only had problems when zooming at 67% and 33%, so the text scale value calculation is wrong.

You need to replace the webtemplate file.

Solar2D Folder → Resource → webtemplate.

Everything is still in testing phase (which worked fine for me).
If you encounter any other issues, feel free to let me know.

You can test it here:

8 Likes

It looks good, can you tell me how you achieved smooth linear movement?
Which version of Solar2d did you use to make edits?

I made some changes in the platform/emscripten module. Specifically, I scaled the content size to double and then reduced the canvas size to half. We get the same result zoom 50% in browsers.

Hey @Kan98 … Why I only see a black screen after the Splash Screen?

In my test link or your build?, and are you sure not zooming?
The zoom issue still alive.
I test my link still working on my lap and my phone.

Live: https://qugurun.github.io/solar2d/adaptive/html/index.html
Source: https://github.com/Qugurun/Solar2D-HTML5-Adaptive/
Look at my adaptability solution

I zoomed your test project to 67% and the text is invisible.
I think it is still same.

I don’t know why I can’t see the project in my browser (Chrome - the last version). I can’t even see it in Microsoft Edge. Nevertheless I do see it in my android phone (chrome browser).
After the Splas Screen I can only see a black screen.

I recently tested one of my games on Poki and got the same result, and I thought it was a bug in my game, however when I tested it on my hosting it looked fine.
Any idea about this behaviour?

By the way, the result is amazing… Thanks a lot for such contribution.

I tested and found that at a certain screen size, the same error will appear as you said. Specifically, when I zoom at 67% and 33%, but when I use the browser’s debugging tool to use the size of the Android device, this error will not appear. I don’t understand very well, it needs to be more digging.

One more, I tested with a project with JPEG images and got the same error.
Maybe HTML build has an issue with JPEG.

I got this errors in console: (from your project)

warning: 2 FS.syncfs operations in flight at once, probably just doing extra work

index.html:92 warning: 3 FS.syncfs operations in flight at once, probably just doing extra work


This is no problem, it still exists even though I have successfully loaded game.

Well … that’s strange :thinking:

I think this is due to the screen resolution of my laptop (1920 x 1080).

I found an issue with window.innerWitdth, in some cases the inner size is very weird.
image

Can you tell me which version of Solar2d are you using?

I’m using v3709

TEST - HTML BUILD S2D by WoodSword (itch.io)
You can try again, I think the zoom issue is solved, and I added an expanded screen to adapt to mobile.

Awesome @Kan98 the result is amazing.
Can I ask you which defaultMode you use of these for windows: “normal”, “minimized”, “maximized”, or “fullscreen”

I have always done the HTML5 builds with Solar2D 2021.3659 because it’s the version that has given me the best results, but with later versions and using the defaultMode ‘maximized’, the content expands so much in the browser that it exceeds the screen dimensions. However, on mobile devices, it displays well. But with 2021.3659, it displays correctly on both platforms.

BTW, could you share again the webtemplate with the update