Strange behaviour with multi-1x1px walls. How to fix it? A bug?

0 favourites
  • 7 posts
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • In my retro, pixel art game, I have created a wall, lets say 8x100px, made of 800 1-pixel blocks, placed next to each other.

    The idea was to let the player destroy the wall pixel by pixel.

    But there is a strange behaviour:

    The player can literraly climb on that wall, like spiderman, because a player can walk onto 1px higher stage.

    But, in my opinion, when the plyer climbs on first bottom pixel, should be stopped, because there is no space for him to walk foreward.

    I hope I made myself clear.

    Does anyone struggled with similar issue, and if so, did anyone find some solution?

  • Could you please upload some screenshots ?

    Then we could see the problem :)

  • Absolutely :-)

    animated:

    imgur.com/a/XOcj2gj

    still screenshot:

    imgur.com/a/42qBAfz

  • haopl Please try and avoid multiposting like that - you should have the ability to edit your own posts (in the top right corner of a post there should be a button) should you need to add something later :)

    If you can't see that edit button, please let us know!

  • Laura_D: You are right, sorry about that :-)

  • Absolutely :-)

    animated:

    imgur.com/a/XOcj2gj

    still screenshot:

    imgur.com/a/42qBAfz

    I suggest that you could add a invisible object at the gun's head, to stop the player when it reaches the wall.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Maverick1912: It would be a good tip...

    If HERO is ON COLLISION with 1PX-BRICK:

    --- HERO.Positiox.X-1

    (or on any other element collision/tip of gun). The animation is nice and smooth, no glitches.

    Unfortunately, this will not work, until there is no pixel-bricks on the floor at all.

    And I need a character to be able to walk on some lefted over 1pxBricks.

    And also, in my case, the hand with a gun is a seperate spirite, that rotates, so this solution will not work corectly:

    imgur.com/a/HXFQxQd

    (don't mind shooting through the wall, it's just an early stage of this project, it needs to be fixed obviously)

    -----------------------------------------------

    PROBLEM SOLVED.

    The collision polygon was not exact quare. It was skewed 1 pixel. I don't remember, which angled side coused that behaviour, but the lesson is that: always make sure your collision polygon is a perfect rectangle or square.

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