ThinkBoxly is the personal developer blog of Lucas Chasteen, author, programmer, artist, and always learning. Read more

Wednesday, April 08, 2015

Edge Display Scaler Gets Another Minor Update (v1.2.1)

Sometimes it feels like there's always more that can be done with display scaling. Just when Edge Display Scaler got its first major update to 1.2.0, 1.2.1 is already a thing and out in the wild! The new update adds just one new feature: edgeds_set_screenres, an alternative script to the default edgeds_set_scale that gives the developer a bit more control over the display while still utilizing the 1:1 scaling Edge DS is designed for.

To be more specific, edgeds_set_scale runs with each CPU cycle to check for changes in the display and scale the game window to match, whatever resolution that display might be. This means you can resize the game window however you like on desktop platforms, or on mobile devices not have to worry about how many pixels navigation and status bars occupy.

But sometimes there can be too much of a good thing, and allowing the user absolute scaling freedom isn't always the easiest design choice to work with. Therefore, edgeds_set_screenres takes a different approach to scaling, allowing the developer to specify a particular screen resolution for the game to run in. It will still scale accordingly, but only within the given parameters. This means developers can now elect to design games for one 16:9 resolution, one 16:10, and one 4:3 just to cover their bases, and not have to worry about the game looking good in any other resolution. It also means that fullscreen games don't necessarily have to operate at a 1:1 resolution with the display. This can be especially helpful for achieving higher performance on lower-powered devices. Plenty of modern smartphones, tablets, and laptops are built with high-DPI displays, but don't have the GPU power to run games at native res. With edgeds_set_screenres, it's now possible to run at sub-native resolution while maintaining aspect ratio, as percentages can be supplied in place of absolute pixel values (e.g. edgeds_set_screenres(display_get_width()/2, display_get_height()/2)). Furthermore, unlike edgeds_set_scale, edgeds_set_screenres only needs to be run once to function, thus consuming fewer CPU cycles.

Like the previous update, 1.2.1 includes a .zip of legacy scripts for anyone developing projects based on 1.1.x. These legacy scripts won't be around forever, but I'll be sure to include them long enough to ensure everyone is able to migrate to the new version.

If this update sounds good to you, simply open GameMaker Studio and check your Marketplace Library to download the update right from inside GMS. And as always, new users can purchase the asset from the Marketplace, here.