Custom Platform best ways?

For questions about using Classic.

Post » Thu Apr 14, 2011 6:07 pm

Was thinking about setting up my own pure custom platform movement without using any behaviors, and I was wondering what would be the best way to go about the fall, and walking, etc.

I would want to use states so that I could simulate timescale, as well as something like a turn based system.

My initial thoughts for a fall were:
player pv= falling
player set y to .y+n*td

But you would of course need a way to stop it.
I can either add an event to the fall set, something like:
+player pv= falling
-+player overlaps at offset family ground -1 player set pv to onground
--+player set y to .y+n*td

or
+player pv= falling
-+player (negated)overlaps at offset family ground -1
--+player set y to .y+n*td

But that still leaves room for errors as you could go past the offset point quite easily.

Any thoughts on how to avoid that issue?
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216

Post » Thu Apr 14, 2011 6:36 pm

[quote="newt":3k1rq5hk]Was thinking about setting up my own pure custom platform movement without using any behaviors, and I was wondering what would be the best way to go about the fall, and walking, etc.

I would want to use states so that I could simulate timescale, as well as something like a turn based system.

My initial thoughts for a fall were:
player pv= falling
player set y to .y+n*td

But you would of course need a way to stop it.
I can either add an event to the fall set, something like:
+player pv= falling
-+player overlaps at offset family ground -1 player set pv to onground
--+player set y to .y+n*td

or
+player pv= falling
-+player (negated)overlaps at offset family ground -1
--+player set y to .y+n*td

But that still leaves room for errors as you could go past the offset point quite easily.

Any thoughts on how to avoid that issue?[/quote:3k1rq5hk]



I did a bit of research into this, came up with the following -

1, Couple of tutorials which include all the math needed to do it-
[url:3k1rq5hk]http://dl.dropbox.com/u/22173473/Collisions.rar[/url:3k1rq5hk]
( i'm still trying to decipher it)


2, monsharen made some examples with C2, using the theory and they work!

[url:3k1rq5hk]http://www.lionsinvests.com/scirra/physics/physics.capx[/url:3k1rq5hk]
[url:3k1rq5hk]http://www.lionsinvests.com/scirra/platformphysics/[/url:3k1rq5hk]
[url:3k1rq5hk]http://www.lionsinvests.com/scirra/platformphysics/platform_physics.capx[/url:3k1rq5hk]
:mrgreen:
B
21
S
6
G
8
Posts: 1,215
Reputation: 7,881

Post » Thu Apr 14, 2011 6:39 pm

I made a topic on this a little while ago: viewtopic.php?f=3&t=8926

R0jo uploaded a very nice example near the end. Maybe it can help!
Image
B
243
S
30
G
13
Posts: 1,787
Reputation: 18,770

Post » Thu Apr 14, 2011 7:17 pm

Ahh, thanks guys, I'll check those out.

Actually some of that does give me an idea or two for a my tile based system.
Image ImageImage
B
169
S
50
G
169
Posts: 8,286
Reputation: 108,216


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests