openfl / openfl-samples

Haxelib-based OpenFL sample projects
http://www.openfl.org
MIT License
78 stars 41 forks source link

PiratePig resizing #51

Closed xdl closed 6 years ago

xdl commented 6 years ago

I've been playing around with the Haxelib PiratePig sample on html5 and Android and I think the tiles look better when they always rescale (even when the original size is smaller):

Without resizing when smaller (On an Galaxy Note 4): Portrait: screenshot_2018-06-30-17-12-03 Landscape: screenshot_2018-06-30-17-12-07

With resizing when smaller (getting rid of the surrounding if statement check on resize in PiratePigGame.hx: Portrait: screenshot_2018-06-30-17-09-54 Landscape: screenshot_2018-06-30-17-09-59

This is true on the html5 build as well.

I have also checked the npm versions on the desktop browser and they aren't as pronounced (there's something in the npm samples that seems to initiate the dimensions to 650 * 685 but I couldn't figure out where it was, any ideas?).

If this is happening on other people's devices I can proceed to remove the if statement on the npm version as well and then maybe do another check to make sure the grid doesn't overlap too much into the border (as it does in the 'fixed' landscape version), but thought I'd check in first to see if I'm on the right track!