How do I Fall between blocks

Get help using Construct 2

Post » Tue Feb 17, 2015 10:32 pm

Looks like your Characters Collision Area(Bounding box) is larger i pixel size that the actual gap. This is making him runover the gap withiut falling inside. Either Increase the gap between the blocks or reduce the character's Collision box.

Or Check if any other sprite attached to your Character has a bounding box thats set to solid and is bigger in width than the gap
Create your own Isometric Runner Game using C2:

Image

Check out my game "Last of the Survivors":
Play Store
App Store
B
45
S
7
G
1
Posts: 378
Reputation: 3,826

Post » Tue Feb 17, 2015 11:38 pm

SamRock wrote:Looks like your Characters Collision Area(Bounding box) is larger i pixel size that the actual gap. This is making him runover the gap withiut falling inside. Either Increase the gap between the blocks or reduce the character's Collision box.

Or Check if any other sprite attached to your Character has a bounding box thats set to solid and is bigger in width than the gap


You should read the older posts.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Wed Feb 18, 2015 12:23 am

R0J0hound wrote:The platform behavior isn't exactly suitable for low res pixel perfect games like that. The use of floating point positions makes it nearly impossible to drop into a gap just as wide as the player. So the first solution is to make the player's width a little smaller. Then next issue is how the platform behavior handles collisions. What it does is move the sprite and if it's overlapping any solids it then moves out of the solids in the closest direction. The side effect is the "auto-climbs" as you call it, and it's what enables the player to move up slopes.

One possible solution is to detect when you're walking over a hole and put a decoy wall at the other side of it for the player to hit and drop in.


I'm having trouble reusing you events in my game, the tilemaps blocks are 8x8 used to make 16x16 tiles, the character is 12x32 but could be 16x32. I tried it a few ways but it always ends up spawning off the edge blocking the player from falling or too far from the edge doing nothing.

EDIT:I got it working with a 8x8 sprite, but it doesn't stop the player.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Wed Feb 18, 2015 12:33 am

Also, it's making my character get stuck, when there's a ledge and a wall directly next to it. Might just have to make the gaps twice as wide.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Wed Feb 18, 2015 5:25 am

Earlier I mentioned widening the gap, but not to the full two-spaces wide. Well, here's my prototype of that, using a tilemap.
You can still run over the gap, but it's a lot easier to drop into.

Blue box controls with arrow keys. It's a little shorter and a little narrower than green box, which controls with WASD (well, except no S)
Green box cannot fit through *any* gaps.
You do not have the required permissions to view the files attached to this post.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Wed Feb 18, 2015 12:46 pm

@Unnatural20

It's still not as good as coming to a full stop due to the gap and falling down it. Rojohound's .capx was the closest to get there, but even it has its problems (mostly corners and if the tilemap is 8x8, the dummy wall needed to be 8x8 which doesn't stop the player.

The best possible thing would be if someone took the platformer behaviour and modified it to exclude the autoclimb slope detection, or at least make an option to disable it.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Wed Feb 18, 2015 12:52 pm

I had to hard-code this in my old metroid engine. If I remember correctly, I had a variable that was set to 0.1 when Samus walked off a ledge, and it was subtracted by dt. If this var was > 0 and Samus overlapped a wall at an offset of ~(4,8) in the direction she was facing, I would push her down a pixel or two, set her y velocity to ~100, then reset the var to 0.

Was pretty stupid but it worked...

edit: Just checked out R0j0's .capx...That's probably your best bet.
Image
B
231
S
27
G
13
Posts: 1,782
Reputation: 18,195

Post » Wed Feb 18, 2015 1:48 pm

Tokinsom wrote:I had to hard-code this in my old metroid engine. If I remember correctly, I had a variable that was set to 0.1 when Samus walked off a ledge, and it was subtracted by dt. If this var was > 0 and Samus overlapped a wall at an offset of ~(4,8) in the direction she was facing, I would push her down a pixel or two, set her y velocity to ~100, then reset the var to 0.

Was pretty stupid but it worked...

edit: Just checked out R0j0's .capx...That's probably your best bet.


Speaking of your old Metroid engine, I never got to see it.

So the events went like what,

Variable > (Greater than) 0
Samus is overlapping wall at offset x,x | Move Samus X Down
...................................................................| Set Y Velocity to 100
...................................................................|Set Y Velocity to 0


Something like that? I have trouble making events out of descriptions, kind of a visual learner over textbooks.
The moderators are corrupt and ban for no reason, especially that condescending neckbeard asshole Kyatric. The forums are filled with fanboys.
Banned User
B
22
S
7
G
1
Posts: 558
Reputation: 2,925

Post » Wed Feb 18, 2015 6:04 pm

@Nesteris - here's how I solved this, where the player sprite is my invisible player object:

player.platform is moving & player.platform is not on floor & trigger once
-player set platform vector x to 0
-player set platform vector y to (whatever your default fall speed is)
B
64
S
16
G
9
Posts: 372
Reputation: 8,698

Post » Wed Feb 18, 2015 6:27 pm

@Nesteris - you probably want to use delta time, too, and a lerp, just to keep the falling from feeling really fast... so here's what I did:

lerp(self.platform.Gravity/2, self.platform.Gravity, dt)
B
64
S
16
G
9
Posts: 372
Reputation: 8,698

PreviousNext

Return to How do I....?

Who is online

Users browsing this forum: Phoenixbowman, Zion and 7 guests