Sprites Resize to Screen Size

Discussion and feedback on Construct 2

Post » Tue Jul 15, 2014 11:53 pm

I am not sure if this is a simple question, or a complicated question... but is it possible to prevent my sprites from scaling up (for bigger resolutions) or scaling down (smaller resolutions).

My issue is my app on my phone the sprites are a good ratio where the sprites are not blown up too much. However when I view them on a tablet with a 8.4 inch screen, the sprites are scaled to the size of the screen. I want my sprites to retain their ratio regardless of the screen size. How would I go about doing this?

Thank you! :D
B
17
S
6
Posts: 348
Reputation: 2,608

Post » Wed Jul 16, 2014 12:56 am

If you're experiencing, for instance, your menu elements being too big and going off screen on different screens with different aspect ratios you could use the ViewportBottom and ViewportRight expressions to get the aspect ratio of the screen and then calculate and compensate for the increased size of the elements with set height, set width and some creative math.

At least that's how I did it for my project's main menu. If there's an simpler way to do it I'd like to hear it.
B
33
S
12
G
7
Posts: 227
Reputation: 7,582

Post » Wed Jul 16, 2014 8:41 am

This question seems a bit confusing, if you want no scaling at all, you can set the fullscreen mode to crop, which effectively scales nothing but show more or less, but I doubt it is what you actually want
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed Jul 16, 2014 3:03 pm

Aphrodite wrote:This question seems a bit confusing, if you want no scaling at all, you can set the fullscreen mode to crop, which effectively scales nothing but show more or less, but I doubt it is what you actually want



@Aphrodite

I am using Scale Outer right now, it works perfectly with different resolution ratios... however I do not like that my sprites scale huge on bigger resolutions. I would like the app to maintain the size of all sprites so the app looks the same on all resolutions. Sort of how Facebook app looks the same reguardless of screen size. This is probably not possible if I use scale outer however.
B
17
S
6
Posts: 348
Reputation: 2,608


Return to Construct 2 General

Who is online

Users browsing this forum: The Mnk and 30 guests