Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excalibur does not behave as expected during resizes when in fullscreen mode #1069

Closed
3 tasks
eonarheim opened this issue Dec 1, 2018 · 4 comments
Closed
3 tasks
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior stale This issue or PR has not had any activity recently

Comments

@eonarheim
Copy link
Member

Excalibur does not seem to be handling fullscreen resizes very well, cam

Steps to Reproduce

See pen https://codepen.io/eonarheim/pen/oQmeLZ?editors=0010

Resize the window up and down and observe that the actors disappear and the platform does not stay at the bottom of the screen as expected. Actors are being marked as offscreen, the camera focus appears to change, and some odd scaling factor is being applied.

image

image

Expected Result

  • The platform in the above example should stay locked to the bottom of the screen.
  • Drawing canvas should scale with resize in fullscreen mode
    image
  • Actors should not be marked offscreen during scaling like this

Actual Result

All of the above

Environment

  • Excalibur versions: master

Current Workaround

None

@eonarheim eonarheim added the bug This issue describes undesirable, incorrect, or unexpected behavior label Dec 1, 2018
@eonarheim eonarheim added this to the 0.20.0 Release milestone Dec 1, 2018
eonarheim added a commit that referenced this issue Dec 1, 2018
@jedeen jedeen modified the milestones: 0.20.0 Release, 0.21.0 Release Dec 11, 2018
@eonarheim eonarheim modified the milestones: 0.21.0 Release, vNext Feb 18, 2019
@justjoeyuk
Copy link

This is a fairly big issue. It’s a non-issue for me because I’m making a messenger game. However, resizing a browser window is very common.

Is it only in Fullscreen mode that this happens?

@eonarheim
Copy link
Member Author

@justjoeyuk I've only noticed it in fullscreen, but any viewport modification I suspect may cause similar issues. Correct this may be a difficult issue to solve, I took a stab at it earlier and got maybe 1/2 way d38ddd1 Definitely feel free to take or leave anything I've done if you work on fixing this.

The steps to fix this may be:

  • Observe the viewport bounds for changes (maybe every frame or with a throttled window event)?
  • Correctly re-configure engine parameters to adjust to the new bounds
    • Potentially refactor the Engine.ts display mode processing (currently its a mess in there ☹️) Ideally we could extract out the display mode behavior into separate files (maybe using type object pattern?)
  • Ensure actors behave correctly on/off screen

@github-actions
Copy link

This issue hasn't had any recent activity lately and is being marked as stale automatically.

@github-actions github-actions bot added the stale This issue or PR has not had any activity recently label Dec 27, 2020
@eonarheim
Copy link
Member Author

Fixed in #1733

@jedeen jedeen removed this from the vNext milestone Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes undesirable, incorrect, or unexpected behavior stale This issue or PR has not had any activity recently
Projects
None yet
Development

No branches or pull requests

3 participants