I could really use some help with this collision problem...

firemaplegamesfiremaplegames Member Posts: 3,211
edited November -1 in Tech Support
I could use some help with this one.

http://gamesalad.com/game/play/40288

Use the LEFT/RIGHT arrows to move the blue box.

The blue box SHOULD move smoothly over the blocks. It works mostly, however, it SOMETIMES gets stuck on an edge.

The blocks are all at the same exact Y.

This is driving me crazy. I've tried everything I can think of. I could use a new set of eyes if you have the time to take a look at it.

This is the last remaining bug for my platformer tutorials, I have everything else locked down.

Thanks!!
Joe

Comments

  • butterbeanbutterbean Member Posts: 4,315
    I tested it on the plug-in and couldn't see any issues? Does it come to a complete stop when it gets stuck?

    I'm so excited that you're done with the first set of tutorials!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    yes. it only happens sometimes. try tapping the left/right keys. it will eventually happen.
    it will just stick on one of the tiles.
  • EastboundEastbound Member, BASIC Posts: 1,074
    I just went back and forth for a couple of minutes without a hitch.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I slowed down the speed of the player. It should happen much more easily now. If you guys could try it again...
  • DanielAvniDanielAvni Member Posts: 114
    are the tuts almost out?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    They will once I can figure out a workaround for the above problem...
  • jonmulcahyjonmulcahy Member, Sous Chef Posts: 10,408
    can you try this just to make sure nothing is moving?
    Have each block display it's Y coordinate, every white/grey box, and the blue box, see what (if anything) changes when it get's stuck
  • firemaplegamesfiremaplegames Member Posts: 3,211
    When i trace the linear velocity y of the player, it rapidly goes between 0 and -1
  • SingleSparqSingleSparq Member Posts: 1,339
    I added these comments below the game but I'll place them here - I too had the issue you describe.

    Do you need it to move across those items? or could you not just use a single invisible actor rectangle it could push against?

    Also if you change the player collision shape to a circle it works with a slight overlap

    also interesting - if you take your gravity attribute out and add scene gravity it behaves properly.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    thanks macview, that's helpful, I'll check into those... I can't use an invisible actor in this case, but the other suggestions are interesting.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    rats...

    well, it still happens whether I apply gravity just to the actor or use Scene Gravity.

    And I can't use circle collision because I need the player to be able to stand on the edge of platforms.

    thanks for the suggestions, though! I'll keep trying...
  • rebumprebump Member Posts: 1,058
    @FMG: Have a look at this. It seems to no longer hang with a few minor tweaks:

    http://gamesalad.com/game/play/40351
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    nice!
  • firemaplegamesfiremaplegames Member Posts: 3,211
    AWESOME!!! THANK YOU!!!!
  • quantumsheepquantumsheep Member Posts: 8,188
    I do love this 'community help' stuff that will, in turn, help the community!

    Thanks for doing this, Joe, and thanks to all that are helping!

    Can't *wait* to make a cool platform game!

    QS :)

    Dr. Sam Beckett never returned home...
    Twitter: https://twitter.com/Quantum_Sheep
    Web: https://quantumsheep.itch.io

  • rebumprebump Member Posts: 1,058
    Well, for manually placed platform actors you have to place them on the non-fractional pixel but we should all be doing that anyway since it is a pixel based 2D engine. 3D is a different matter. Spawned platform actors should likely be okay pixel position wise assuming they have no movement also going on.
  • rebumprebump Member Posts: 1,058
    In my reply above, where I say:

    "assuming they have no movement also going on."

    I meant:

    "assuming they have no rotational movement also going on (to throw the Y value off from being non-fractional)."

    ---

    Movement in the X direction by the platforms themselves (for horizontal platforms) should be okay but movement in the Y may require the platforms themselves to constrain their Y position value (using ceil() ) to force non-fractional Y movement values (but I would have to test to see if it causes any shaking but I don't think it would).
Sign In or Register to comment.