Parallax Origin point

0 favourites
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hello!

    I would like to know if there is a way to change the point of origin for the parallax's point of view.

    As I understand, the origin from which everything begins to offset in relation to the layer's parallax value, is the layout's 0,0 coordinates. Everything is fixed in that point and as you start to move away from it, the graphics on the layers "above" or "bellow" (with greater or lesser parallax values) scale or move away from that point faster or slower, depending of their parallax value.

    For me, most of the time this is inconvenient, because I can't really predict the actual offset of a layer the further I go from the 0,0 coordinates. I know that there is a "Parallax in the editor" option but that doesn't work as I would expect it, it feel's like it is depended of the editor's layout view zoom level and not from the layer's actual z depth position.

    Further more, at some times I would like to have a fixed "0,0 like" parallax focal point, which always scroll with the camera.

    A great example of what I am trying to say can be seen in the Space Ship Demo at the Construct Classic Demo page. The walls and the floor seem to be on a different depth, but they always move accordingly to the player's position, not a fixed 0,0 point.

    Is there a way to achieve a similar result in Construct 2?

    Contrasting the example above, here you can see in action the problem I am talking about:

    http://www.eli0s.com/Tests/parallax/index.html

    The starting position of the player is on the top-left of the layout and his shadow/bulletholes are being generated in a layer below, with lower parallax values (90,90). At the beginning, everything seems to work ok, the shadow is in place and the bulletholes appear at the mouse.X, mouse.Y. The further you stray away from the starting point though, the more you can observe the offset I am talking about.

    Oh, and turning "Unbounded Scrolling" on doesn't do any noticeable difference to my eye.

    I would appreciate any input on the subject!

    PS: Sorry for my lengthy and probably poor written post    eli0s2013-05-26 16:29:54

  • +1

    Being able to change the parallax origin at runtime will make parallaxing BGs for Metroidvanias (or any game with multiple rooms per layout) much easier. Currently I'm making my own with events and families and it's kind of a pain with the different object types and so on.

    It'll also allow you to set the parallax origin to the middle of a room or layout like it should be in the first place ;)

  • ...

    Contrasting the example above, here you can see in action the problem I am talking about:

    http://www.eli0s.com/parallax/index.html

    The starting position of the player is on the top-left of the layout and his shadow/bulletholes are being generated in a layer below, with lower parallax values (90,90). At the beginning, everything seems to work ok, the shadow is in place and the bulletholes appear at the mouse.X, mouse.Y. The further you stray away from the starting point though, the more you can observe the offset I am talking about. You can download the capx file here if you like:

    http://www.eli0s.com/parallax/ParallaxExample.capx

    ...

    eli0s

    Why are you wanting the shadow/bulletholes to have lower parallax rate than your player?

    parallax would start out being fine because little variation in layers' position but parallax is meant to create that offset that you are saying is error

    That's my take on parallax anyways

  • Hello DrGreenThumbCAN, thank you for the reply,

    Well, in the particular example the shadow is being used in order to illustrate the problem. The bulletholes on the other hand should appear on the floor layer and stay there, that should create a pseudo-3d feel, just like in the Space Ship Demo example I was referring to.

    My main argument is that having the layout's 0,0 coordinates being a fixed point that everything scale and move away from, in some cases is limiting and at least in my case somewhat disorienting, since I don't really understand where everything I put on stage actually exist in the game. Perhaps my background with 3d software has made me to expect a "look thru camera" view of the scene/stage, where the world x,y,z, coordinates doesn't affect the result of what you see.

  • Mr Tokinsom,

    Could you care to elaborate on that? Are you describing a workaround that achieves a similar result to the one that I am referring to?

    Can you please be more specific, I am a newbie to all this      <img src="smileys/smiley9.gif" border="0" align="middle" />

    Thank you in advance!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Basically I use 2 global variables "X_Origin" and "Y_Origin" and system expressions ScrollX and ScrollY to make my own parallaxing backgrounds...

    +Every tick

    -Set Background.X to (X_Origin+ScrollX)/2

    -Set Background.Y to (Y_Origin+ScrollY)/2

    That's the same as setting a layer's parallax to 50, except with this you can change the parallax origin (the 2 global vars)

    It's an alright workaround...but you'll probably want to use a family for all objects you want to parallax, and if you have a lot..well..it gets messy. That's why I'd love for this feature to be added!

  • +1

    I've wanted more functionality regarding parallax for quite a while. Say you want something to appear in the fore/background at a specific point in a level. Currently, parallax won't help you achieve that, so you'll have to do it all manually anyway.

    It's not really a huge priority, compared to other things, so not surprising it has less functionality than I'd like.

    Hello!

    use I can't really predict the actual offset of a layer the further I go from the 0,0 coordinates. I know that there is a "Parallax in the editor" option but that doesn't work as I would expect it, it feel's like it is depended of the editor's layout view zoom level and not from the layer's actual z depth position.

    Quite a while ago I wrote about the "parallax in editor" feature and how it's not really useful. I suggested adding a frame the size of the window size of the game on the layout, similar to the one in the upper left corner, but this one would move with you as you scroll around, acting as a 1:1 preview of how the game would look at that position. That way you could use it to predict how parallax would look, etc.

    I don't really care if that particular feature was actually implemented, as long as some form of more in depth parallax control is implemented.

  • +1

    For 2D platformer type games, parallax is an absolute necessity if you want to achieve any sense of depth. I guess you could always do the "pseudo-3D" route by having 3D backgrounds and the 2D overlaid over it, but I doubt Construct 2 can even handle that.

  • Tokinsom,

    Thank you for your kind reply! As I understand it, by using families you are actually creating something like a precomposition (in after effects terms) or a symbol (in flash), in order to manipulate all the sprites as one element..?

    In my example, I tried to make a family with both a floor sprite and the bullet holes (in essence the objects that I want to be on the same parallax level), but the bulletholes are being spawned on the family's origin point, not at the collision point which is at mouse.X, mouse.Y.

    So, I am guessing that your method applies on static elements only..?

    Never the less, it's a brilliant workaround that I am sure I will put in use!

    Thank you again!

    Elias

  • inkBot,

    You are absolutely right!Although I did search the forums, I hadn't had the chance to read the post you are referring to, however, the particular method that you suggest will surely help staging all the sprites at the correct position while being in the editor.

    Ideally, a real 3D workspace and a camera (like the one that can be found in Toon Boom Animate or Hitfilm) would be perfect, at least for me, based on how I have used to work.

    I know nothing about programming but I am curtain that this isn't an easy task to tackle though..

    I'll keep my finger crossed nevertheless <img src="smileys/smiley1.gif" border="0" align="middle" />

  • End Construct has parallax settings for layers already, the goal of this thread is to get some control over the origin point of the parallax scroll to allow for more in depth control over the effect and some more predictability.

  • Hello BluePhaze,

    I am not sure that I understand what you mean by Infinitys End, is that some kind of plugin? I don't find anything in the forum except from a post about a "Bubble Bobble Blitz" project. Are you perhaps addressing mr Tokinsom..?

    Please excuse me if I overlook something obvious, I am new to the forums and to this community.

    I certainly agree about the goal of this thread as you put it    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Infinitys End is the name of a member, he was responding to him

  • He's a friend I asked to +1 because the ability to change the parallax origin point at runtime will greatly benefit our project. GUILTY -.-;;

    moving on..

  • eli0s Putting someones name with a in front of it will send them an alert on the site that they have a reply in a topic. :) Oh and welcome to the community.

    Tokinsom LOL you have to make sure they get the context before you have them +1 :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)