Custom Platform Movement

Post your own tutorials, guides and demos.

Post » Thu Jun 05, 2008 7:35 am

I made a custom loop movement engine thats remarkably similar to those found in MMF2 games. It features a double jump and not much else, but I figured since the topic hasn't been discussed much and only a basic movement engine has had an example uploaded, I'd upload this. Also would be nice to know if anything can be cleaned up with Construct features I'm unaware of.

You can tweak things by modifying the variables in the red cube, like speed and mount of air jumps and the likes.

(oh right Z to jump, arrows to move)
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Thu Jun 05, 2008 9:57 am

This is really well done, if anyone needs extras on platformers this is a great base. :)
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Thu Jun 05, 2008 2:26 pm

Good job :)

Since you asked on possible ways to clean up the events, it's only a matter of preference but I prefer to use loops based on subevents like this:

+ For "i" from 1 to count
----+ Condition A
--------: Actions A
----+ Condition B
--------: Actions B ...

As opposed to the 'on loop' system you have already:

(start loop "i" count times)

+ On loop "i"
+ Conditions A
----: Actions A

+ On loop "i"
+ Conditions B
----: Actions B

I prefer the original system with subevents since it avoids the repetition of 'On loop', and I think it's easier to read. Also, the system condition loops (like 'for') perform much better than 'On loop', but it's a minor point when less than 10,000 iterations are run :P
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Jun 05, 2008 9:29 pm

Ah yes, that worked out quite well. Ah, more stuff I wish I had in MMF2. I'll add some more basic features and reupload eventually.
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Sat Jun 07, 2008 7:45 pm

Great example and double jump FTW!
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Tue Jun 10, 2008 3:39 am

More stuff. Slopes, moving platforms, inertia from said platforms...
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Tue Jun 10, 2008 4:37 am

Great update! I might convert to this movement! I found a bug though!

I was playing around on the up-down moving platform (second counting down from top) and I don't know what triggered it, but I fell and the platform went with me!

*edit: try doubling jumping underneath that smae platform when it is at the top, you can indefinitely double jump!

*the first bug: jump and press down when the platform is at the bottom of it's path. Hard to describe exactly.
B
13
S
3
G
5
Posts: 286
Reputation: 3,193

Post » Tue Jun 10, 2008 6:42 am

The drop bug seems like it'd be a pain to bust. I think I'm going to change the nature of platforms to be pass throughable and to suggest avoiding situations where platforms go flush with the ceiling. Ill set a system up in my next update. It think it'll be more conventional and more useful and less buggy. The other bug was a quick fix.

Thanks. (also down doesn't do anything, I was able to do it without it)
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Sun Jun 22, 2008 10:41 pm

Last little update. Fixes platforms. You can jump though platforms and press down to pass through them. You can lower your self into the platform. Not terribly desireable, but not a huge deal in my opinion.

Now to start working the engine for my own uses. :3
B
12
S
4
G
4
Posts: 238
Reputation: 2,426

Post » Mon Mar 25, 2013 9:22 pm

Link ? :C
B
5
Posts: 6
Reputation: 518

Next

Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest