Skip to content

Conversation

kan6868
Copy link
Contributor

@kan6868 kan6868 commented Mar 27, 2025

No description provided.

@kan6868 kan6868 requested a review from Shchvova as a code owner March 27, 2025 04:27
@kan6868 kan6868 changed the title Fixing bad behavior with zoomEven scaling mode. [HTML5] Fixing bad behavior with zoomEven scaling mode. Mar 27, 2025
@kan6868
Copy link
Contributor Author

kan6868 commented Mar 27, 2025

Issue #781 has been resolved with this PR.

@Shchvova Shchvova merged commit 7c7a063 into coronalabs:master Mar 27, 2025
1 check passed
@AleCGames
Copy link

AleCGames commented Apr 9, 2025

Hey @kan6868
Now I've realized that your implementation works, but only in a desktop browser. I tested it on a mobile device, and the result is not as expected. I'm sharing a screenshot from my phone: the red circle is positioned (in the code) at the center of the screen, but on the mobile device, its actual X position appears right at the right edge. In a desktop browser it displays correctly, but on mobile it always shows up at the edge.

As an additional note, I'm using the latest version of Solar2D (2025.3718) with 'zoomEven' as the scaling mode.
1744214884436

Game test:

issue.mp4

@kan6868
Copy link
Contributor Author

kan6868 commented Apr 15, 2025

Hey @kan6868 Now I've realized that your implementation works, but only in a desktop browser. I tested it on a mobile device, and the result is not as expected. I'm sharing a screenshot from my phone: the red circle is positioned (in the code) at the center of the screen, but on the mobile device, its actual X position appears right at the right edge. In a desktop browser it displays correctly, but on mobile it always shows up at the edge.

As an additional note, I'm using the latest version of Solar2D (2025.3718) with 'zoomEven' as the scaling mode. 1744214884436

Game test:

issue.mp4

It's work fine with my project.
https://woodsword.itch.io/keepsantaalive
pass : 111111

image
image

My config:
image

Window build settings:
image

@kan6868
Copy link
Contributor Author

kan6868 commented Apr 15, 2025

https://woodsword.itch.io/test
pass: 111111
Test with Match 3 Space RPG Demo with some changes

Make sure you display game in Landscape orientation.

image

image

@kan6868
Copy link
Contributor Author

kan6868 commented Apr 15, 2025

Ok, it looks like it's not working with portrait.
Hopefully, I'll have some time this weekend or next. There are a few other strange behaviors in the HTML that I want to examine.

@AleCGames
Copy link

Hi @kan6868 ,
Would it help if I told you that everything works perfectly in build 2024.3709? With zoomEven, everything displays just fine on both PC and mobile (whether in portrait or landscape mode), though the downside is that the graphics appear blurry—unlike how they look now.

I'm sharing a link to one of my games (set to "portrait", with defaultMode = "maximized" and scale = "zoomEven"), created with build 2024.3709, so you can test it on your PC and phone and see the difference. On mobile, the issue where the canvas isn't fully visible doesn't happen, and both this and all my games are designed to adapt to the screen size, whether in portrait or landscape.

Game link:
https://resplendent-heliotrope-f5e296.netlify.app/

@kan6868 kan6868 deleted the Fix-zoomEven-HTML branch July 7, 2025 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants