How can I create some impassable walls ?

Hello!
I’m trying to create a game that will have 8 directional character but the problem i have now is how to make the wall sprites impassable to the player. I mean the player wont be able to go across the wall like in pacman games. I can think of how to use the event system to achieve that but i will be glad if there’s an easier way to do that.

Thank!

yikes! Never mind! I saw something call “stop the object” from one of the examples. that will do the trick! I underestimated the power of Gdev there.

There are even more easiest ways. For example there are predefined physics, platform objects and impassable objects. Check the “Space Marine” template and take a look at the collision masks of the objects (open the object editor for an obstacle object and find the collision mask button).

Thanks. that’s exactly what i’m looking for.

I can’t make the walls of my game impassable, even with this tip.
can you please help me out?

1 Like

Welcome. It’s good to search the forum 1st but it’s best to start a new thread. This one is from 10 years ago. I didn’t even know GD was around 10 years ago. A lot has changed since then.

Be sure to include the type of project that you’re making meaning top down or platform and how you’re moving the object like whether it’s with a behavior or using forces.

There are plenty of good people here willing to help.

1 Like

thanks for this tips,
i shall start a new thread and i’m going to tell more about my game.

1 Like