What is the '100% will never happen' way to keep the player from getting stuck in walls?

0 favourites
  • 13 posts
From the Asset Store
This sound pack comes with 100 high quality, ready-to-use sound effects for all kinds of games.
  • Anyone else notice that Construct can Almost do everything. It doesn't quite do it, it just almost does it.

    I have a player that teleport from one place to another. If the player enters the teleport going right and when it comes out of the teleport the exit is on the left and there is a wall to the right the player get stuck in the wall.

    The wall is solid, the player is solid, so why does the player get stuck in the wall?

    If I am running and I run into a tree I don't get stuck in the tree. I don't become part of the tree. The player shouldn't either.

    Offset is already setup and doesn't work for stopping the player from entering the wall when it exits the teleport.

    Unless there is nothing on any side of the teleport the player risks getting stuck in a wall when it comes out of the teleport.

    What will always stop a player from getting stuck in a wall - Always - 100% of the time?

    Are they working on fixing this? This shouldn't have to be something that is worked around. A player should never get stuck in a wall unless the developer designs it to do so.

  • It should never happen. All behaviors have rigorous algorithms to prevent them ever becoming stuck in solids wherever possible, except in extreme circumstances such as crushing it with solids in a confined space. It's hard to say more without seeing a sample project.

  • This isn't the teleportation, but with this one I was trying to make the push-ball bounce the player ball backwards.

    It bounces, but it usually bounces it right into a wall: drive.google.com/file/d/1UI7sZ38LOdQmOQ0BRu7L1h5zK06wmKbx/view

  • I was testing the teleport with the pacman demo: drive.google.com/file/d/1RaN1in2EEneba26MLunKdb2PJtRhKQb0/view

    The teleports are the purple blocks. Walls are pink. When the yellow player goes into the purple teleport if it's going up and there is a wall behind the next teleport the player gets stuck in the wall.

  • As far as I can tell, both the moving "push" object and the walls are solid, so if it pushes you in to a wall it's exactly the "crushing in a confined space" situation I described. There's literally nowhere the player can go that isn't overlapping a solid. So what is the engine supposed to do? It's an impossible situation, so the problem is with your game design - you should avoid doing that.

  • Ashley,

    Thank you for your reply.

    "So what is the engine supposed to do?"

    The engine should stop the player and not allow the player to move into the wall. When users, especially newbies, select the Solid option - we expect that Solid will make the sprite - Solid, like a tree or a brick wall.

    Solid should be Solid. Like in reality if I am running and I run into a brick wall I don't become part of the wall, I don't get stuck in the wall. I hit the wall and stop. That's what I'm looking for. How do I do that?

    Construct 3 needs to be fixed or an option or a plugin so solid means just that 'solid as a brick wall'.

    Solid should be solid 100% of the time with no exception - just like a tree in reality.

    I mean seriously, what purpose does getting stuck in a wall serve? I have a hard time believing that the C3 developers said "Lets add 'Stuck in the wall' to the solid behavior." lol (:

    Construct needs away for solid to always be solid no matter what. A solid that doesn't allow other sprites to get stuck in it.

    Ok, rant over.

    Does anyone know how to get the walls and the player to be solid like a brick wall so they never get stuck no matter what happens?

  • But the "push" object is solid too. So if the player doesn't go in to the solid wall, it goes in to the solid "push" object. So it still goes in to a solid, just a different one.

    What else can it do?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley

    "What else can it do?"

    Stop. It should stop. Like a person hitting a brick wall.

    How do I make the solid sprite stop when it hits another solid sprite - like in reality?

  • This is working at the moment:

    Event:

    Player > is overlapping wall.

    Action:

    Player > set bullet bounce off solid TRUE.

    One would think that would be included in the solid behavior so solids wouldn't end up in other solids, but for now it's a work around. Fingers crossed it doesn't fail.

    drive.google.com/file/d/18UZO9HMWaPX5cjvSDDxnRPsCjCcAyZ4A/view

  • Stop. It should stop. Like a person hitting a brick wall.

    I don't understand. This means the "push" object still runs in to it, so it still ends up overlapping a solid. From the engine's point of view, that is the same as being stuck in the wall. So there is no solution.

  • In the case of the push ball, they were both supposed to stop. That allows the player to go in a different direction. The way it was, everything I tried got the player stuck in the wall and it would no longer move.

    However for the teleport now it means the player doesn't end up in the wall after coming out of the teleport.

    The goal is the player Not ending up in the wall ever.

  • Bullet behavior is not a very good choice for this game, where you need to move between walls with pixel-perfect precision. Tiled Movement works much better, have a look:

    dropbox.com/s/faxzep882wm43gw/GoingIntoWall-fixed.c3p

  • dop2000,

    Seriously when are you going to do a Udemy course for all these demos. You're amazing. Every time you have the answer. I haven't even looked at tile movement before.

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