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 Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

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
19
S
6
G
7
Posts: 1,204
Reputation: 7,296

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
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

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 Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest