[Request] Camera Shake effect

  • Hi, all!

    I have been trying to get into shaders - sometimes even with a little bit of success. And working on something else I noticed that (at least on my hardware) a shifted texture gets nicely "stretched out" near the boundaries. Sounds like a great way to shift a texture around its draw rectangle.

    Put an effect like that on a layer and in the editor it is just shifted:

    But at runtime it's a different story:

    So then you can shift a value dynamically:

    And get some neat shake (looks much better at full speed):

    Or shift both values:

    ...for a full-on earthquake:

    It takes "real" pixels as input, so if "Fullscreen scaling" is set to High quality the shifts will be based on the screen resolution, if set to low it will work "right"

    Installation: Extract the c2addon and drag into an open C2 window.

    [attachment=0:2xejyanw][/attachment:2xejyanw]

    My skills are limited so I'm not sure if it could be made to shift everything below if placed on an upper level - but currently you can have parallax shaking, for example. I have kept things extra slim - so if the values are 0 it will still run (or perhaps automatically won't) - so please enable/disable the effect as needed.

    It would be super-great if someone could test this with something real and say what the performance is like.

    Dude, this is amazing!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)