[Obsolete] Perfect 1:1 Window Scaling

Post your own tutorials, guides and demos.

Post » Mon Jul 26, 2010 4:36 am

@Silhouette
The burring is due to how your graphics driver resizes windows.

Here is a way to have 2:1 scaling [u:1bbuufdj]without[/u:1bbuufdj] any filtering:
* Check "unbounded scrolling" in the layout properties.
Then run these actions:
[code:1bbuufdj]-> System: Set Zoom to (200, 200)
-> System: Set layout size to 640 x 640
-> System: Change display size to 640 x 640
-> System: Scroll to X 0
-> System: Scroll to Y 0[/code:1bbuufdj]
B
79
S
24
G
54
Posts: 4,749
Reputation: 40,761

Post » Mon Jul 26, 2010 4:56 am

Hey, thanks for the reply. And thank you so much for the fix. Just so I can be sure though, on some computers, a simple client*2 would work, and it's just in my case that I need to resize like this, correct?
B
3
G
3
Posts: 18
Reputation: 911

Post » Fri Jul 30, 2010 4:01 pm

It looks like it doesn't matter if your display size stays in proportion or anything. Even if I go from 128x128 to 256x256, Construct arbitrarily stretches a line of the sprite horizontally or vertically.

Oh well, I suppose that it works well enough for now. I think that this would be much easier if we could set client width/height as easily as we could get the value for it! Or maybe an action to toggle the window handle on and off. Then I wouldn't have had to do all that silly stuff to get the border size from the window!
B
3
S
1
G
2
Posts: 57
Reputation: 964

Post » Wed Oct 06, 2010 5:22 pm

I got a HUD layer and when i zoom it in it goes offscreen, any ideas on how to place it properly? :shock:
B
12
S
2
G
2
Posts: 54
Reputation: 1,665

Post » Wed Oct 06, 2010 9:52 pm

[quote="alessandroLino":y69rfrd7]I got a HUD layer and when i zoom it in it goes offscreen, any ideas on how to place it properly? :shock:[/quote:y69rfrd7]
you may set zoom rate to 0% in the HUD layer along with 0% scroll rate.
Unless you wanted the HUD to zoom along, in which case you're in the same place I am :P
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Sat Oct 09, 2010 3:11 am

Yeah i wanted it to zoom along with everything. Guess i'll just make a scaled up sprite :lol:
B
12
S
2
G
2
Posts: 54
Reputation: 1,665

Post » Thu Jul 07, 2011 5:50 pm

Sorry to bump but did anyone figure out how to get layers with a 0% scroll rate to work with this?

I tried setting my HUD in a layer with 100% scroll rate then (always) setting it to scrollxleft and scrollytop but it lags behind when scrolling. Setting the zoom and scroll rates to 0% didn't really help either.Tokinsom2011-07-07 17:51:23
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Thu Jul 07, 2011 11:14 pm

If it lags behind when scrolling then it's probably because the set position actions are before the scroll actions.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu Jul 07, 2011 11:50 pm

That's what I thought at first but I'm using MagiCam so the event order doesn't change anything :<
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Previous

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 0 guests