Player as Platform, all else as Physics

Get help using Construct 2

Post » Sun Nov 10, 2013 6:22 pm

I know that I should not mix the two together.

I would like objects in the game to have physics properties. But I would like the player to have the unrealistic movement of platformers.

I've tried using a wheel as the main mover for the player so that it can go up slopes with no problem, but it all just feels very loose (got that idea from the thread on making sonic like movement). I'm wondering if I'm going about it the right way.

I want to have some objects with different density and to be able to stack etc., but I don't think I want anything too complicated.

Am I better off making it all physics and doing custom platform movement, or making everything platform and use instance variables etc. to modify the objects behaviour someway?

B
6
S
2
Posts: 89
Reputation: 682

Post » Mon Nov 11, 2013 6:29 pm

If you just use the velocity property for physics, you can emulate the platformer behavior pretty well.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467

Post » Mon Nov 11, 2013 8:08 pm

Hey @Sushin, cheers for replying.

I've been using the velocity property, but there seems to be lots of things to get right, such as going up slopes properly, not flying off slopes at the top etc. which are hard to get right.

You can see how far I've got here:

https://dl.dropboxusercontent.com/u/16226125/ConstructExamples/Phys_Platform.capx

Any suggestions on how to improve?
B
6
S
2
Posts: 89
Reputation: 682

Post » Mon Nov 11, 2013 8:34 pm

Huh. Interesting. If your game has slopes, don't use the velocity property. If you used the platformer behavior, the problem with that is that it doesn't register slopes as uneven surfaces. It was made strictly for platforming w/o slopes.
That's also why velocity won't work. It will push sideways into a slope rather than along a slope.
You're going to have to come up with some other solution I'm afraid. It seems like what you have now is a good start with the torque and all. You just need to make it easier (or challenging but not annoying) to climb slopes.
B
10
S
3
G
3
Posts: 234
Reputation: 3,467


Return to How do I....?

Who is online

Users browsing this forum: draiza and 21 guests