feature request: layer offset

Discussion and feedback on Construct 2

Post » Thu Jan 22, 2015 6:07 pm

Hey everyone,

You should be able to specify a layer offset, changeable at run-time! I should think adding this would be pretty easy, but it would give total control over how each layer is rendered. if you wanted to move a layer, not in conjunction with the camera, you would just change offset values (x,y). When construct 2 renders the layer, it simply adds these offset values to the draw call.

Some kids in a class I run thought this should be a feature, and I think that it is a good idea!

What do people think? I can think of uses for independent layer movement that is not tied to the camera. Sure you, can do it already bu moving each object in the layer, but that can get tedious (even when using families).
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Thu Jan 22, 2015 9:59 pm

What about something like Scroll To per layer? Could make for some interesting render possibilities...

I have only a limited imagination and can only think that layer offset would be useful if you're looking to control your own parallax (nothing wrong with that, so +1 here), but only if the default parallax has to be opted out from.
A big fan of JavaScript.
B
74
S
20
G
71
Posts: 2,228
Reputation: 44,888

Post » Fri Jan 23, 2015 12:10 am

You can set parallax at runtime. Maybe play around with that?
B
35
S
9
G
4
Posts: 201
Reputation: 5,170

Post » Fri Jan 23, 2015 12:24 am

@ruskul , I find this to be a very good proposition! I think that layers should have x,y position coordinates (defaulted to 0,0), just like they have angle and scale options. The ability to move each layer interdependently from an other or the "camera", can be very useful.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Fri Jan 23, 2015 12:30 am

I can think of a few interesting uses for this :P

+1!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Fri Jan 23, 2015 12:35 am

Ahr Ech wrote:You can set parallax at runtime. Maybe play around with that?


Ya, but that would kinda be a mess of calculations to get the same thing... for an permanent of offesetX = 5

you would have to do... :

layer parralax X value = (scrollX + 5) / scrollx or something

but here is the thing... it will never work when scroll is at 0,0 or when crossing the origin. (scroll x=0 and scrollx = -2)


It would be way more straight forward to just add the offset at a draw call
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Fri Jan 23, 2015 12:48 am

Quickest method would be variables used as a modifier: my glayerOffsetx= n glayerOffsety=n
Image ImageImage
B
169
S
50
G
173
Posts: 8,319
Reputation: 110,282

Post » Fri Jan 23, 2015 1:36 am

@newt - right, and that is what I am imagining you could do. But as it is you have to calculate it by some other means
Image
B
33
S
11
G
2
Posts: 564
Reputation: 5,153

Post » Fri Jan 23, 2015 1:40 am

ruskul wrote: but here is the thing... it will never work when scroll is at 0,0 or when crossing the origin. (scroll x=0 and scrollx = -2)

Ah right, I hadn't thought of that. You're right then, we totally need this!
B
35
S
9
G
4
Posts: 201
Reputation: 5,170

Post » Fri Jan 23, 2015 12:31 pm

+1 for me too, it is simply disturbing to rely just on the relative scroll speed but not having any offset control.
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

Next

Return to Construct 2 General

Who is online

Users browsing this forum: AnimH01, Yahoo [Bot] and 16 guests