Anybody got diagonal jump thru platforms working?

Get help using Construct 2

Post » Mon Aug 06, 2012 4:19 pm

I can't seem to get diagonal platforms working reliably. Most of the time the character hits them and stays on, sometimes he goes right through. I have messed around with a non-animated dummy character and it's collision polygon. It is better but still not reliable :(

Anyone know how to fix this one?
B
20
S
3
G
4
Posts: 77
Reputation: 3,346

Post » Tue Aug 07, 2012 1:39 am

Really, no one has managed to fix this one? Seems pretty important and I've tested it on another computer and still no joy. Bad collision detection pretty much renders the whole game useless :(

B
20
S
3
G
4
Posts: 77
Reputation: 3,346

Post » Tue Aug 07, 2012 4:34 am

Ive jumped at an angled platform maybe 100-200 times straight and it seems when im paying attention, i have no problems but its pretty much if the corner of the player box is off by 1 pixel it will miss the jump even if it looks like it should make it. I think this is a case where it's technically correct, but it 'seems' broken since if you're just playing normally, jumps that 'should' work, don't...

not sure what could be done to fix tho.. I would say maybe use special sprites for the diagonals where the collision is 'sunken' a bit... the player will aim for the 'visual border' but they have a bit of wiggle room since you've brought back the actual collision by 5 pixels or something..... maybe...?
Made Cosmochoria - www.cosmochoria.com
Currently working on Slayaway Camp - www.slayawaycamp.com
B
23
S
7
G
3
Posts: 375
Reputation: 4,797

Post » Tue Aug 07, 2012 12:43 pm

Cheers for the reply 80bit. It is worth a try, I'll have a go with that method and report back!
B
20
S
3
G
4
Posts: 77
Reputation: 3,346

Post » Tue Aug 07, 2012 2:41 pm

I don't think the engine supports sloped jumpthrus. It's very difficult for the engine to tell if it's a slope or just something it can walk through (e.g. a big background jumpthru which shouldn't affect collision).
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Aug 07, 2012 3:33 pm

Cheers Ashley,

So why does it work 9 times out of 10? It is literally so close and would be disappointing if I had to take the slopes out of the game.

Have you ever tried it out?
B
20
S
3
G
4
Posts: 77
Reputation: 3,346

Post » Tue Aug 07, 2012 4:10 pm

I think it has somethin to do with the y of the slope and the player y. Thats what Ive noticed most when messin with it. Jump thru is only solid when the player is above it so if the slopes y is above the players the whole thing isnt solid
B
13
S
5
G
2
Posts: 306
Reputation: 3,262

Post » Fri Feb 08, 2013 12:32 pm

To do it, even if it's not perfect (but working), i created a variable for the ground.
For example, with the value of "1" when the ground is with a value of 45 degres.
Then, i had an action, testing when the main sprite (the collision box) is in collision with the ground, and the value of the variable : if the value is "1", the sprite is set to a 45 angle, otherwise to 0.
It enables jump in diagonal, even if the jump is very little, but it's better than nothing, and not give the impression to the payer that the character is stuck, even if it's not very useful, as a platform game feature.
As i'm just starting my game, i will keep in mind it's a pb in my constructiuon of levels.
Sorry for my english, and i hope it can maybe help.
If someone has an idea to make "real" jumps in diagonal, i wiil be happy :)
(to resolve the pb of the hight of jump, i add in the action the thing to set the strengh of jump : for example set to 1000 when the value is "1", and to 800 otherwise. It seems to work)goldentreee2013-02-08 12:40:13
B
11
S
6
G
2
Posts: 105
Reputation: 3,910


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt and 20 guests