Custom Platform Movement

Get help using Construct 2

Post » Thu Dec 29, 2011 6:08 pm

I just created some custom platform movement:



And I wondered if anybody has any ideas for improvement?

There seems to be some glitches like: I can slowly walk through the side of the "Block" object and when I'm fully in it then it slowly falls down.

I know this is possible to do custom movement, I'm pretty damn sure (99%) that people do it in there 2D games all the time.

Thanks!
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Thu Dec 29, 2011 8:10 pm

Anyone?
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Thu Dec 29, 2011 8:24 pm

It would be alot easier for the others to "check" you code, if you'd post the CAPX
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Thu Dec 29, 2011 9:03 pm

[QUOTE=Weishaupt] It would be alot easier for the others to "check" you code, if you'd post the CAPX[/QUOTE]

That IS ALL the code in that image.

EDIT: Of the player, the other code is all GUI stuff etc.dcrew2011-12-29 21:04:36
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Thu Dec 29, 2011 9:03 pm

Remind me of a custom platform movement I did before the corresponding behavior was created.
Did you do that as an exercise?

You should use dt to ensure smooth and non fps-dependant movement.
add 50*dt to xSpeed will add 50 per seconds but bit by bits every tick ('cause dt is the time between two ticks)
And then set X to player.X + xSpeed*dt you will go at xSpeed px/seconds

Also as Weishaupt said it's better if you provide the capx, there's some other information we need to judge your work or at least to try it.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Dec 29, 2011 9:09 pm

[QUOTE=Yann] Remind me of a custom platform movement I did before the corresponding behavior was created.
Did you do that as an exercise?

You should use dt to ensure smooth and non fps-dependant movement.
add 50*dt to xSpeed will add 50 per seconds but bit by bits every tick ('cause dt is the time between two ticks)
And then set X to player.X + xSpeed*dt you will go at xSpeed px/seconds

Also as Weishaupt said it's better if you provide the capx, there's some other information we need to judge your work or at least to try it.[/QUOTE]

Thanks gonna try that now, The thing is the capx is my major game that I would not like to get released publicly.
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Thu Dec 29, 2011 9:35 pm

Well:



It seems to be now glitch free :D

It just needs some more work to make it better, thank-you guys/girls!!
B
17
S
4
G
5
Posts: 226
Reputation: 4,042

Post » Thu Dec 29, 2011 10:54 pm

You sure you don't want to use the in-built platform behavior?Yann2011-12-29 22:54:18
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Fri Dec 30, 2011 12:35 am

[QUOTE=Yann] You sure you don't want to use the in-built platform behavior?[/QUOTE]

I need to design custom movement, Since built-in one when it collides with Block it would stop, and I want it to only stop if the block animation is equal to certain values. Plus this is my first ever attempt in game-creation at custom movement, so it's interesting and exciting!
B
17
S
4
G
5
Posts: 226
Reputation: 4,042


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, MChiz, plinkie, Radulepy and 0 guests