Construct Team, please reveal your window sizing secrets!

0 favourites
  • 7 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • I've recently noticed this console message when running Construct 3 pop-up preview windows.

    Could you please share the workaround used for this long standing issue?

    Despite the ongoing effort to get this window size issue fixed and how "dirty" the workaround might be, I would really like to know it for personal use.

    Tagged:

  • Why? Does this affect a separate web page that you maintain yourself or something? The hack is ugly and doesn't actually completely solve the problem anyway, so it's not something I'd recommend anyone using - just live with the quirk if you can.

  • Why? Does this affect a separate web page that you maintain yourself or something? The hack is ugly and doesn't actually completely solve the problem anyway, so it's not something I'd recommend anyone using - just live with the quirk if you can.

    NWjs games are also affected and show pretty ugly black bars, as if the game failed to letterbox correctly.

    You decided to use this hack inside C3 so it can't be that bad.

    It's been 4 years and the Chromium team still didn't provide a fix, despite multiple reminders.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not convinced it was a good idea to include in C3, really, since it doesn't really fix the problem and means you get inconsistent results across devices... but if you really want to... it just compares window.innerWidth/window.innerHeight to the size it really wanted, and calls window.resizeBy() with the difference to compensate. But resizeBy() doesn't correctly take in to account devicePixelRatio, so sometimes you still end up with the wrong size.

  • I'm not convinced it was a good idea to include in C3, really, since it doesn't really fix the problem and means you get inconsistent results across devices... but if you really want to... it just compares window.innerWidth/window.innerHeight to the size it really wanted, and calls window.resizeBy() with the difference to compensate. But resizeBy() doesn't correctly take in to account devicePixelRatio, so sometimes you still end up with the wrong size.

    Alright I should be able to create a testing project and see how well it works. It's ok for me if it only works on some devices for now, feels better than waiting for an official fix and doing nothing.

    Thanks for sharing!

  • I own a number of games produced by medium sized studios that have to be manually resized each time they are launched... I think the windows API just isn't very friendly to use!

  • NW2 seems to have this fixed. Felt like posting a heads up.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)