How do I scale only part of the screen?

Get help using Construct 2

Post » Sun Oct 02, 2016 1:48 pm

I'm creating an android game that gives the impression of playing with a gameboy-like console.
This means that the touch controls must be photorealistic and in HD, while the game itself runs at 160x160.
Is there a way to upscale the low res portion of the screen to fit the HD resolution of the controls?

example image to better explain what I'd like to do. The red part is in native 1080 resolution, while the green part is 160x160
Image
B
8
S
1
Posts: 20
Reputation: 490

Post » Sun Oct 02, 2016 2:26 pm

Does system layout scale work or are you looking for something else? I'm no artist so you might be looking for something specific.
B
46
S
16
G
79
Posts: 2,171
Reputation: 46,859

Post » Sun Oct 02, 2016 2:34 pm

Couldn't you get that effect from your image editor?

Create the controls with a higher res and the rest with a lower res, or soften them up a bit.

I don't know if C2 can do this. Accept for maybe adding an 'effect' behavior... Try adding the Sharpen effect and see if that suits your needs.
B
38
S
18
G
19
Posts: 664
Reputation: 14,107

Post » Sun Oct 02, 2016 2:44 pm

plinkie wrote:Does system layout scale work or are you looking for something else? I'm no artist so you might be looking for something specific.

Doesn't layout scale resize everything on the screen?
I must resize only the green part of the example picture I posted, let's call it the "screen" of the console.

jeffige wrote:Couldn't you get that effect from your image editor?

Create the controls with a higher res and the rest with a lower res, or soften them up a bit.

I don't know if C2 can do this. Accept for maybe adding an 'effect' behavior... Try adding the Sharpen effect and see if that suits your needs.


For now I'm drawing sprites low res, then I upscale them and put it in game directly in "HD" (I don't use Construct's built in resize feature because it makes them blurry). The problem is that, this way, the movement isn't congruent with the 160x160 look of the "screen".
For example, after I upscale my low res sprites every pixel becomes a 7x7 pixels square, so if something moves 1 pixel in the game, it moves an actual pixel not 7 pixels, and characters become misaligned to the game world and other sprites.
B
8
S
1
Posts: 20
Reputation: 490

Post » Sun Oct 02, 2016 2:45 pm

Yeah we can do that, I just wanted to make sure the layout scale was good enough. Put the green bit on its own layer that scales. Everything else put it on a layer with scale rate set to 0 and it will be unaffected when you use layout scale.
B
46
S
16
G
79
Posts: 2,171
Reputation: 46,859

Post » Sun Oct 02, 2016 7:44 pm

plinkie wrote:Yeah we can do that, I just wanted to make sure the layout scale was good enough. Put the green bit on its own layer that scales. Everything else put it on a layer with scale rate set to 0 and it will be unaffected when you use layout scale.

It works! This brings us to 2 problems though:
1) I don't understand how scaling works, I thought it scaled starting from the origin of the layout but that's not the case... It zooms everything and puts it completely off the center.
2) The upscaled layer is blurry, If I set the project sampling to "linear" it's not blurry anymore but the pixel art becomes very imprecise
B
8
S
1
Posts: 20
Reputation: 490

Post » Sun Oct 02, 2016 8:28 pm

1) Set the parallax in the layer properties to 0,0.
2) Not an artist but there may have been some responses on this before about what to set that option to. I think pixel rounding set to On is supposed to get rid of seams or offset edges.
B
46
S
16
G
79
Posts: 2,171
Reputation: 46,859


Return to How do I....?

Who is online

Users browsing this forum: batto and 24 guests