Pixel Game Maker MV

Pixel Game Maker MV

Please Fix Wall Detection
My objects frequently get shoved through walls and floors or get embedded. This even happens with objects that only have one motion and one frame (effectively no animation) and therefore have one constant wall detection area. Non-physics objects do it although physics objects seem to do it more.

I would be very surprised if no-one else is experiencing this - it happens A LOT. It really messes up game mechanics.
< >
Showing 1-11 of 11 comments
Bellamy Feb 28, 2019 @ 8:21pm 
Wizard,

Are you using a lot of the forced distance movement commands (such as "Move Object" or "Move Towards Display Direction") or "Generate Object"?

"Move Object" moves the object and then performs a collision check after the move is finished, not during the move itself. So if an Object is near a wall, and then is forced to move a distance that carries it beyond the walls of another object, it is then behind the object.

An improperly configured Generate Object (combined with the Origin Point setting) can also make it easy for an Object to get spawned in the wrong place as well.

Also, heavily overlapping with a wall (over 50%) could cause the system to determine that the Object is on the wrong side of the wall when it performs the check as well.

And additionally, the collision box not rotating with auto-generated rotations limitation that you encountered previously is still in effect.

After taking all of the above into account, are you still having lots of wall issues?
If so, we would definitely consider that a bug and need to re-investigate your project data.
SoyMuMalo Mar 2, 2019 @ 2:08am 
Hello, I'm also having problems with the wall collisions, I had not realized until now because the animation of my character when I was still alone had a frame but I have put 2 frames and when I'm on a tile that only has wall detection at the top the character tries to fall and immediately the animation of falling detects the ground and returns to the animation of being still which produces a movement as if the character was jumping down and standing still all the time. It only happens if the tile only has the detection from above, if they have it in all wall it does not happen.
SoyMuMalo Mar 2, 2019 @ 2:19am 
I just deleted the animation and I've done it again and now it works correctly .......? I've done exactly the same and now it works. If I happen again I'll say it.
Last edited by SoyMuMalo; Mar 2, 2019 @ 2:21am
Thank you for the response, Bellamy. It seems to me that waiting until an object has finished moving before checking for wall detection is a recipe for disaster but I'm sure you know what you're doing. I do sometimes used forced movement but mostly I use set direction and move.

Still, I do think that wall detection is a little problematic. I have done my best to set it up correctly but objects do still sometimes get stuck. Also, the detection areas are rather angular. Would you consider adding nodes that the user could drag to reshape them?

My player character sometimes gets stuck in walls. I think this is due to transitioning from one motion to another rather than moving. Unfortunately, it is sometimes necessary to have different sized wall detection boxes for different motions but perhaps this is what causes problems...?

An in-depth tutorial on configuring wall detection would be really helpful.
Last edited by Wizard Indie Games; Mar 3, 2019 @ 3:54am
Bellamy Mar 4, 2019 @ 3:22am 
For the time being, we will only be using rectangles due to the computational issues surrounding other shapes. So while it can be a hassle to configure multiple boxes for complex or shifting characters, it is still possible to get fine coverage.

When a character moves normally (button input, Template Move Settings), collision detection is performed on every frame.
When using other methods of movement, the object may need to move large distances too quickly for the system to calculate properly, and this can result in wall detection not working 100% as intended.

However, we don't like this to happen, so we do want to figure out what is happening with your project.

The general rules for wall detection are:
1. An Object needs a wall detection collision box enabled for every frame of motion (if a box is enabled on frame 1, as is default, then this works for every frame of motion).
2. Wall detection collision boxes do not rotate in every case. If using auto-rotate and the Object is oddly shaped, unintended behavior is likely to occur.
3. Collision boxes only cover the assigned area. If the box is smaller than the sprite, it can look like the Object is overlapping a wall. In some cases, certain animation or runtime action settings might even cause undesired behavior if the box is too small compared to the entire Object (the whole box shown on the Motion tool, not how much is actually used; your sprites should always have the most minimal dead space as possible).
4. Objects and Tiles must be in the same Layer for collision to occur. Objects will never collide with tiles in other layers.
5. Objects must have the correct Tile group assigned in the Object settings screen for collision to occur. In an update back around November, we added support for multiple tile groups, so please make sure all Objects are registered to collide with every Tile group required. By default, all Tiles are in the default group, and all Objects collide with the default group.
6. Walls are uni-directional; Tiles only care about the assigned wall. If a Tile has a right-side only wall, and you approach it from the left, you will cross over the tile to the right side, but be unable to return.

These are the basic rules to keep in mind when performing stage layouts.
I believe we have covered these rules in previous discussions.

However, it is possible in more advanced design to purposefully disable or remove wall detection from an Object temporarily (such as when making a down-jump to move through a platform in a platformer).

Did any of this help?
If not, let's think of a way I can try to help you in real-time, such a screen-sharing during a Skype session or streaming or something similar.
Thank you for taking the time to outline this. It seems I already have a fair understanding of these rules so that is encouraging. #6 is something I didn't know. It might be useful if I need an object to pass one way but not the other.

I normally use one wall detection for each animation but I might try doing each frame individually. Also multiple boxes to cover the irregular shapes of my characters.
Bellamy Mar 5, 2019 @ 11:48pm 
Yes, do let me know if you see any improvements in the results you are getting.

I'll do my best to help you figure things out!
My NPCs are still getting buried. I think it is happening a lot less but please work on this further. You guys are doing a great job - I know you can fix both this and game performance!
andc1977 Nov 30, 2022 @ 2:47pm 
i have been having issues with the player getting forced into a wall. usually when getting knocked back when many different enemies are attacking. i read this thread and see what the problem is now. i really thing that waiting for the move command to complete before checking for wall detection is an issue. how can i make a knockback on the player without this happening if the wall detection acts in this way?? i changed it to template move away from nearby object and it works better but it does not behave the way i really want
Last edited by andc1977; Nov 30, 2022 @ 3:18pm
Baz Nov 30, 2022 @ 3:08pm 
Originally posted by andc1977:
i have been having issues with the player getting forced into a wall. usually when getting knocked back when many different enemies are attacking. i read this thread and see what the problem is now. i really thing that waiting for the move command to complete before checking for wall detection is an issue. how can i make a knockback on the player without this happening if the wall detection acts in this way??

This is a pretty old thread that was during it's early access. Wizard has gone on to make a few games already after learning the tips I'll discuss below.

Most commonly this is an issue of not having all the wall detections the same size and in the same position throughout -all- motions, directions, and frames. A common thing that can happen is you will use a single side direction and then flip the opposite direction, depending on how the wall detection is positioning (if not centered on the X axis) the wall detection could shift a little ways. Any sort of weird shift like this can cause wall clipping.

See in the video below how when I go back and forth the wall detection is the same? That is how it should always be, very rarely is there a reason to have a different sized and positioned wall detection.
https://i.imgur.com/PHbNmWv.mp4

If for some reason you are still experiencing wall clipping after verifying wall detections, I recommend sending in your project to pgmmv-support@gotchagotcha.jp so we can take a look and find the issue. Of course we will report any bugs found during the process.
Last edited by Baz; Nov 30, 2022 @ 3:08pm
andc1977 Nov 30, 2022 @ 4:13pm 
thanks so much Baz! this was really insightful. i had the number coordinates set the same for all directions but for somereason they were not lined up how you showed in the video. you are a life saver once again!
< >
Showing 1-11 of 11 comments
Per page: 1530 50