#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# [Help] Movement glitches

Posts: 194Member
Hello to GS community,

I am developing a sort of platformer game and just stuck on annoying glitches regarding movement.

I have set up a few platform rectangulars in a line. I can assure you that all of the platforms, which play the role of a floor, are put in the same X. Also, there are two or three platforms that have more space between each other but I can assure you that's not the issue.

I have a video for you:

Thank you

• Posts: 194Member
I have used the following rules:

FOR PLAYER:

FOR PLATFORM INSTANCES:

I hope that helps, if there is anything to do with rules.
• ImagineLabs.rocks Posts: 5,325Member, BASIC
Make the collision shape on your main actor a circle instead of the rectangle.
• Posts: 194Member
@jamie_c

Thank you for your suggestion but unfortunately it does not help. It became even worse.

Still the problem remains in the picture below.

Player still move only in Y axis after colliding with an edge of a platform, which is in the air.

• Posts: 194Member
Bump.

Really need help.
• ImagineLabs.rocks Posts: 5,325Member, BASIC
edited February 2014
Hey there, sorry about my quick, useless answer earlier. I was on my iPad and hate typing on there...

Here are a couple more useful ideas I hope:

1. Instead of physically repeating the same actor over and over again for you platforms, go into that actors attributes and under the graphics settings choose Tile for both horizontal and vertical. Then you can drag that actor larger and smaller in the editor and it will tile so you don't have to place multiple copies of the actor by hand.

2. If you have to place them by hand for some reason, make absolutely sure the Y locations are 100% identical and make them whole numbers, not decimals. So for example all the platform actors for a given horizontal platform should be at Y = 20 not Y=20.345.

3. You could also consider using a separate actor, constrained to the feet of your main character for your collision. You would make the actor a perfect square, make it invisible and makes it's collision shape a circle. This would allow it to kind of roll over the bumps in your platforms more easily.

I hope some of these ideas help.
Jamie
• Posts: 194Member
@jamie_c

1. I have placed the tiles one by one because for each tile there is a rule that says every 10s change random tile to another image which lasts 5 seconds before changing back to the initial one.

2. I have placed the tiles exactly at the same Y axis.

3. Could you please show me with pictures or make a demo of it?

I just want to tell that it is extremely important player actor to touch those tiles because the player will be awarded bonus points for touching green platforms when they are available.

Thank you
• ImagineLabs.rocks Posts: 5,325Member, BASIC
Check out the attached sample. You would want to make the green actor invisible, I've only left it visible so you could see it there...
• Posts: 194Member
@jamie_c

Thank you for the demo but it does not help at all. It keeps on "blocking" with the platforms from time to time.

Really, I am desperate about it.
• Posts: 2,320Member, PRO
make the ground 1 actor and make his alpha 0. place other actors with images on the ground but dont let them collide with the player.

# ✮ Available for hire! support@gsinvention.com ✮

• Posts: 194Member
@jamie_c

I can't really figure it out why you constrained game.playerY to self.positionY+26 on the main actor rather than on the collision actor.

I cant really make that thing like this because I have missiles positions interpolating to playerX and playerY.
• Posts: 194Member
@timolapre1998

I can't really understand what you want me to do.
• Posts: 194Member
@timolapre1998

I do really need to place them one by one instead of trying your suggestion because those platforms that are red are "inactive" when one of them turns green the player should touch them in order to get bonus points. Following your suggestion, it might not work.
• Posts: 2,320Member, PRO
like this? https://www.dropbox.com/s/ohb85nlvn0lcn1u/floor collision.zip
you have 2 floors one fake one and one real one. the real one collides with the player, the fake one doesn't. the real one Y pos is 49.9 and the fake on 50. see file

# ✮ Available for hire! support@gsinvention.com ✮

• Posts: 194Member
@timolapre1998

Thank you, I made it even without your demo. Thanks to your explanation even though I keep the platforms collidable with player it still triggers the active platforms.

However, I still encounter the problem with the air-platforms. You can see the exact problem on the video on my first post in this thread starting from 00:34.

Please, come up with something because it is annoying

Thank you
• ImagineLabs.rocks Posts: 5,325Member, BASIC
@BonepileGames, I'm using the collision actor constrained to your main actor so it rolls smoothly over any bumps in your platforms. You can have your missiles still tracking the main actors X and Y location if you like.

There are so many different ways to accomplish the same thing in any game you really need to do what is right for your particular instance.

What timolapre1998 is suggesting for the floor collisions should work fine too.
• Posts: 194Member
@jamie_c

It works wonder. Anyway, thank you for you suggestion.

But the problem with being blocked by the air-platform still remains. I have come up with an idea but let me see.
• Posts: 194Member
No workaround for now.
• Posts: 2,320Member, PRO
whats wrong with my solution? good luck with this.

# ✮ Available for hire! support@gsinvention.com ✮

• ImagineLabs.rocks Posts: 5,325Member, BASIC
You're welcome, good luck with the game!
• Posts: 194Member
@timolapre1998

I just said that your solution made the running smooth without being blocked anymore.

However, the problem with jumping and being blocked by AIR-platforms still remains as you can see on the video after 00:34 seconds.
• Posts: 2,320Member, PRO
edited February 2014
If left button is 1
Do
Every 0 seconds change self.motion.linear velocity.x to -255
Hope this helps

# ✮ Available for hire! support@gsinvention.com ✮

• Posts: 194Member
@timolapre1998

Thank you! All of your suggestions worked well.
• Posts: 27Member, PRO

Did this ever get reported as a bug? I want to make a similar kind of tile platformer in order to have dynamic levels, and not have to set up everything for every possibility by hand... Can work around, but it will lead to a huge amount of bloat and extra calculation.