Flip part of screen? (shader?)

0 favourites
  • 8 posts
From the Asset Store
Goodbye to sprite fonts, when you have something new on the anvil for your upcoming Games !
  • I was thinking this could be done with a shader. I just want part of the screen to be flipped vertically. Maybe this Construct Classic effect is what I'm looking for:


    But I have no idea if there's a way to use it in Construct2.

  • You can use "Set Layout Angle" in system

  • If you mean just certain layers, then you can flip horizontal by using what Joannesalfa proposed, with 180? as the angle. A vertical flip would be difficult (I can't think of any C2 option right now that would allow that, besides "set flipped"/"set mirrored" specifically for sprites)

    If you are looking for a vertical flip, or if you meant a portion of the output (like just the left half of the screen) by "part of the screen", it would have to be done with an effect as of now. HLSL (used in my effect for CC) is pretty close to GLSL, so it shouldn't be a problem to use the "flip layout"-effect as a base for a C2 effect, for someone who already programmed a pixel shader in GLSL.

    I'm afraid I won't have the time to do it, as I am concentrating on other things in my life.

    EDIT: rotating the layer by 180? equals to both, vertical flip/horizontal mirroring at the same time.

  • I guess rotating by 180� really is what I'm looking for, but doing it that way would mean redefining a lot of the behaviors.

    Basically I want to make a split screen layout for tablets, so you can two people playing on the same tablet, on opposite sides, with each side facing each player. Like this game does:


    The problem is, my game is a bit more complex than that, and a lot of the behaviors depend on the orientation (gravity, platform movement, etc), so a shader effect would be what I'm looking for, inverting image with a shader would make gravity point up instead of down without having to redefine any behavior.

  • Yes, you're right. A shader would be the easiest solution to that. The disadvantage is that it consumes a lot of gpu power (drawing half of the screen pixel by pixel on every tick is quite some task). It might not run very well on mobile devices, at least on older tablets. But that's something you would have to test.

    Beforehand, the best way would be to post in "help wanted". You are free to offer my effect as a base for a convertion to a C2 effect and the necessary adjustment to just the half of the screen.

  • Wait... I was just testing the Rotate 180� thing and it works perfectly, no need to change any of the behaviors, gravity points up, controls are inverted, etc, I though it only rotated the layers but apparently Construct is that great and does the work for you. Awesome.

  • Rotating the entire layout seems to cause a really big framerate drop... On my computer it goes down to about 50%! But it does exactly what I was looking for, hopefully I'll be able to make the game more efficient so it works better in this situation.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you try 2 half screens then compose all objects in one layer and rotate layer?

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