Layer Scroll X/Y

New releases and general discussions.

Post » Fri Aug 31, 2012 2:53 am

Is there any chance in hell of these ever being made operational? I've been having a nightmare of a time with resolution related parallax issues (like just about everyone else who's ever dealt with this) and I was just thinking about how wonderful it would be if I could just offset layers and be done with it.

Was there some horrible issue that stopped this feature from ever actually working or did no one get to it? Is it a way serious problem? Most solutions I've seen seem pretty dreadful for situations where you have lots of parallax with lots of different objects.

I'm expecting the answer to be "Not going to happen" but who knows, figure I'll throw this out there. I know C1 development is pretty dead, but this is driving me nuts.

(alternatively, an option to base parallax on screen center might be wonderful instead but whatever)

edit: .... Idea springs to mind to use offset layer effect. Will be back.kayin2012-08-31 03:00:03
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Thu Sep 20, 2012 10:33 pm

Just curious, did you ever find any kind of solution to this? I'm having similar issues right now and despite trying just about everything I can think of, have come up with nothing short of opting never to use zoom (Which is the worst case scenario for me)
B
16
S
2
G
1
Posts: 156
Reputation: 2,112

Post » Fri Sep 21, 2012 8:39 am

No luck. Offset filter doesn't work either, because the offset filter merely offsets what would fit on the screen. I'll save this problem for later. Hopefully by the time I have to address it, a solution will exist. Considering how far I am along, doing it now isn't going to be significantly easier than doing it later anyhow.

I wonder if someone could make a plugin that'd move an entire layout? Not sure if that's even possible, but it's a thought.
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Mon Nov 19, 2012 11:34 pm

I'm going to bump this again and be annoying because I think this is really important and solves a lot of aspect ratio/parallax issues that are really gross to hack around and seems like it should be very basic functionality.

I dunno if C1 will get another update ever but it sorta feels worth being a pain in the ass about this.kayin2012-11-19 23:36:05
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Wed Nov 21, 2012 4:22 pm

Hey, I'll second being a pain. I flat-out won't support multiple resolutions in Blight because of this. One would think offsetting a layer would be easier than this.
B
90
S
32
G
14
Posts: 935
Reputation: 14,540

Post » Thu Nov 22, 2012 2:22 am

It'd at least be nice if parallax was calculated from screen center instead of screen of the screen corner, so that parallax behavior would then at least be consistent. But yeah, this is a big issue I think for several of us are trying to finish up large projects. :(
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Mon Jun 03, 2013 4:59 am

Since this will probably never be fixed, this is what I ended up doing...


((((displayheight - 114 - (displayheight /2)) - 114) * (1 - (LayerScrollRateY(bk.Layer) / 100) ))-(((global('oldyres') - 114 - (global('oldyres') /2)) - 114) * (1 - (LayerScrollRatey(bk.Layer) / 100) ))) + bk.y

Replace 114 with whatever half of your default vertical resolution is. Use oldres as a 'detector' for resolution changes (if oldres != display res, run the above math on all the 'bk' objects.

Anyways basically you put this family on any object that is ever on a parallaxing layer. If an object already has a family, just apply the above math to that whole family. If the object is on a gameplay layer, it'll know and won't move anything. It also doesn't require any variables or anything like that either.

Obviously this isn't an ideal solution and might not be appropriate for a lot of projects who might require certain backround objects not to move, but it's what ended up working for me.

Obviously this is an incomplete solution too, so you'll need to figure out the details of your implementation. If anyone really cares, maybe I'll make an example file to show how I'm handling things.kayin2013-06-03 05:00:19
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Mon Jun 03, 2013 7:08 pm

Thanks for sharing this Kayin It's a shame that a workaround was needed but good to see it's possible to do.
"Construct 4 lets YOU make advanced games! (maybe)" Construct Classic - Examples Kit
B
86
S
28
G
13
Posts: 2,092
Reputation: 15,009


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 0 guests