How do I fix this?

Get help using Construct 2

Post » Wed Apr 02, 2014 9:37 pm

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.
B
3
Posts: 18
Reputation: 211

Post » Wed Apr 02, 2014 11:27 pm

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.)
B
241
S
63
G
33
Posts: 903
Reputation: 40,729

Post » Thu Apr 03, 2014 1:43 pm

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.
B
3
Posts: 18
Reputation: 211

Post » Thu Apr 03, 2014 6:41 pm

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.
B
241
S
63
G
33
Posts: 903
Reputation: 40,729

Post » Thu Apr 03, 2014 6:58 pm

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.
B
23
S
7
G
4
Posts: 154
Reputation: 3,749

Post » Fri Apr 04, 2014 5:47 pm

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.
B
3
Posts: 18
Reputation: 211

Post » Mon Apr 07, 2014 4:49 pm

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.
B
241
S
63
G
33
Posts: 903
Reputation: 40,729


Return to How do I....?

Who is online

Users browsing this forum: adelwich, kizlengames, matriax, Yahoo [Bot] and 4 guests