How do I fix this?

0 favourites
  • 7 posts
  • I'm in the process of making a game for my little brother and it's almost done, although i cant figure out how to fix this issue. Before outlining the problem itself i will explain what i have done with my game.

    the game is a side on running game similar to kawairun, i have made it so that the back ground as well as the flooring scroll along the screen and reset themselves every 4 seconds, this means that i can use the same textures over and over without having to create multiple instances of them.

    Now for the problem, my player character randomly jumps around the screen when the 4 seconds ticks over, for example if its at the left hand of the screen it will randomly teleport to the middle, obviously in a game where you need to work with reaction times this would be an issue as it may mess up the players timing. As this is my first time using Construct 2 i'm at a loss for what to do as well as what I'd search for to fix this issue, if anyone can help me out it'd be greatly appreciated.

  • Are you using parallax to scroll the background around? It sounds like the player's layer also has some parallax on so his layer moves too. Make sure the player layer has 0,0 parallax.

    If not we may need some more clues.

    Can you strip it down to just the scroller and player sprite and upload it? (you can replace the sprites with sketches if you want. (stripping them down will sometimes reveal the bug as well.)

  • As far as i'm aware i'm not using parallax, i've set a custom movement onto the background image as well as the flooring, every 4 secs it moves back to its start position to ensure that the player only sees the game. after a nights sleep i had a thought, might it have to do with the behaviors? the floor has custom movement and solid behaviors, while the player hit box has platform as its behavior.

  • That is a thought, however all the games I've made I've never worked with the Platform behavior.

    I know the physics behavior can be sensitive to things like that.

    Any Platformer people reading this, can teleporting the platform under the player cause player shifting or teleporting?

    You could test it, put an invisible solid floor that doesn't move and take the solid off the moving one, and see if that changes it.

  • I guess you're right.

    Think of it as a moving platform in a platformer game.

    The Player stands on the solid, and the solid is moving. therefore the player is moving with it.

    you might wanna drop the platformer behavior and integrate something else instead.

  • Creating an invisible floor with the solid setting worked after i removed the solid setting from the moving one, he no longer teleports. Thanks for the help Paradox and 5Type, as long as i don't mess up the spawning for the items he has to jump over and under.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you ever need a hole in that platform, it could be another obstacle drawing the hole, and when the player collides with it, disable the solid behavior. After the player loses contact with the hole object, turn it back on.

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