Parallax Origin point

0 favourites
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Aphrodite Thank you for your explanation <img src="smileys/smiley1.gif" border="0" align="middle" />

    Tokinsom I am sorry for making things complicated, I understand now <img src="smileys/smiley9.gif" border="0" align="middle" />

    BluePhaze This is a very helpful hint and as you can see I am abusing it in this particular reply. Thank you very much for your welcome! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • No problem!

  • End

    ok, Now I saw this post... For some stupid reason I've missed the whole time <img src="smileys/smiley3.gif" border="0" align="middle" />

    Thank you for your input!

    I suppose that a system based on sprites that have frames which are referencing different points of view of an object and it's related on the distance from the center of the screen, could make up for a simple pseudo 3d effect. A simple example,

    -if object is on the right side of the screen-> display frame 2 (object as seen from the left)

    -if object is on the center of the screen-> display frame 1 (object as seen from the front)

    -if object is on the left side of the screen-> display frame 0 (object as seen from the right)

    Adding inbetween frames/points of view will render more fluid results.

    I've used a similar method in a test game to fake the movement of the defensive towers. Please, check it out if you don't mind the waiting time (it's 100Mb, not very well optimized) and somewhat lengthy introduction (which can be skipped).

    eli0s.com/hellrain.html

    Best regards,

    Elias

  • inkBot BluePhaze DrGreenThumbCAN

    Hi Chaps!

    I'm also having trouble predicting where the parallax offset will be.

    Demo

    I'm creating a Slide Show system. My problem is that the slides do not align in the game window properly. I have to align it with rough approximations.

    Is there a way to get the exact offset co-ordinates?

    Capx

  • My initial, non clever, reaction would be to put the photos and all the stuff you want to be framed correctly on a layer with the parallax set to 100,100.

    I guess that you have your reasons for not doing that though...

    Perhaps those new expressions that were added with the r141 Release (System expressions: LayerParallaxX(layer), LayerParallaxY(layer)) will do the job, if only I know how to use them <img src="smileys/smiley36.gif" border="0" align="middle">

    Maybe someone with more experience and knowledge can give a practical example on those expressions (if it applies at all with what you have in mind)...

    Best regards,

    Elias

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • eli0s Thanks. You know when you work on something for so long you don't see the most obvious problem? ...That's what happened. The image layer at 100,100 parallax made sure it aligned nicely! :D

  • NECROKRIEG

    Glad I could help!

  • another still missing and never added feature.

  • The problem is simple to solve: Do Not Use parallax X/Y 2 create depth. It just does not even work that way in the real world.

    Therefor, it is inessential to ask for something like a "...Parallax Origin point...", because it will not solve your problems.

    This is real depth:

    https://www.dropbox.com/s/kvcg1oyidjlp8 ... .capx?dl=0

    (sorry to bump a bumped old topic)

  • The problem is simple to solve: Do Not Use parallax X/Y 2 create depth. It just does not even work that way in the real world.

    Therefor, it is inessential to ask for something like a "...Parallax Origin point...", because it will not solve your problems.

    This is real depth:

    https://www.dropbox.com/s/kvcg1oyidjlp8 ... .capx?dl=0

    (sorry to bump a bumped old topic)

    Since the time of posting this original topic, I had this example made that uses the same scaling trick for pseudo 3d depth (hold the mouse button to shoot and move the plane).

    However, I think this is a very troublesome approach, the setup doesn't reflect on the editor and it uses a ton of sprites... It's nice but it's a taxing (both CPU and workload wise) workaround...

  • eli0s your example is perfect. I would love to make a full game like that in the future.

  • Since the time of posting this original topic, I had this example made that uses the same scaling trick for pseudo 3d depth (hold the mouse button to shoot and move the plane).

    However, I think this is a very troublesome approach, the setup doesn't reflect on the editor and it uses a ton of sprites... It's nice but it's a taxing (both CPU and workload wise) workaround...

    There is always LayerToCanvasX("layer",x,y) and CanvasToLayer.

    The idea is to translate the X/Y cords from a layer to screen and then back to another layer. This way I could nail the exact same "visiual" coords for many objects on different paralaxes.

    The thing is - its a pain in the ass to write in and control. Anyway, my point stands. Missing feature. Something that just doesn't have any reason NOT to be in the editor. It could and it should. But it isn't.

  • eli0s

    I just used (as you did) that many sprites (aka layers) to showcase the point. Most only need a foreground layer, a middle layer and a background layer. It is a flawless 'trick', with no overhead in events. In stead of fiddling with the parallax X&Y. And then complain that something that is wrong in the base dont work as expected.

    Your Showcase is just plain beautiful !

  • Since the time of posting this original topic, I had this example made that uses the same scaling trick for pseudo 3d depth (hold the mouse button to shoot and move the plane).

    However, I think this is a very troublesome approach, the setup doesn't reflect on the editor and it uses a ton of sprites... It's nice but it's a taxing (both CPU and workload wise) workaround...

    It looks awesome. Can you share the capx for this example?

  • Burvey , Thanks! I'd like to play your game when you make it

    Irbis , I agree, it's just too complicated and doesn't show within the editor's environment...

    99Instances2Go , First of all, thank you! Also, I agree that with few elements it's manageable and if you set it up right, it works. But on the other hand, Placing things within the editor from the camera's point of view, is very liberating and creative. Not having to guess or make loops with events just to achieve something nice. Having both worlds is the best!

    glerikud , Thanks!

    For anyone interested, the capx is already avalable in this topic, just make sure you get the extra plugins otherwise the capx wont open.

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