Workaround for screen shake function

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Template for dungeon/maze generation, using wave function collapse
  • I want to keep the screen shake function in my game. My layout size is 3840x1080, and the viewport is 1920x1080.

    I’ve added the ScrollTo behavior to the Hero.

    I couldn’t use the Hero's ScrollTo behavior for screen shake. If I enable Unbounded Scrolling for the layout, an empty screen becomes visible at the bottom.

    So, I decided to use a sprite with the size 1920x1080 and give it the ScrollTo behavior. But I’m getting some issues:

    1. The screen doesn’t shake when the Hero is at the very left edge of the game page, but it works when he is further to the right.

    Video: webmshare.com/play/QGnG1

    2. Since both the Hero and the screen shake sprite have the ScrollTo behavior, the camera doesn't follow the Hero smoothly—he ends up moving out of the screen.

    Video: webmshare.com/play/xV9V3

    Can anyone please help me resolve this?

  • i dont understand

    the videos you showed are showing you spawn missiles for the first vid

    the second video wont load for me

    did you mix up the links when you posted your earlier forum on missile spawn issue?

  • i dont understand

    the videos you showed are showing you spawn missiles for the first vid

    the second video wont load for me

    did you mix up the links when you posted your earlier forum on missile spawn issue?

    that missile issue, i got it fixed...

    this is about screen shake effect when the missiles blasting on the ground....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If I enable Unbounded Scrolling for the layout, an empty screen becomes visible at the bottom.

    Screen shake doesn't work when there is nowhere to scroll. You need to:

    • enable the Unbounded Scrolling
    • use a separate Camera sprite with ScrollTo behavior (its size doesn't matter)
    • move tha camera to player position
    • limit the camera movement to layout bounds

    Example:

    dropbox.com/scl/fi/ins0stjp4a58gxdoryh9v/BoundedScroll-with-shake.c3p

  • > If I enable Unbounded Scrolling for the layout, an empty screen becomes visible at the bottom.

    Screen shake doesn't work when there is nowhere to scroll. You need to:

    • enable the Unbounded Scrolling
    • use a separate Camera sprite with ScrollTo behavior (its size doesn't matter)
    • move tha camera to player position
    • limit the camera movement to layout bounds

    Example:

    https://www.dropbox.com/scl/fi/ins0stjp4a58gxdoryh9v/BoundedScroll-with-shake.c3p?rlkey=x3tud71wkscppzivo8bugzlga&st=xd3ead60&dl=0

    Thank you very much

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