The Daily Click ::. Forums ::. Klik Coding Help ::. Jumping in platformers
 

Post Reply  Post Oekaki 
 

Posted By Message

Dave S.



Registered
  26/09/2003
Points
  924
5th May, 2004 at 16:04:13 -

I think the basic platform engine that comes with MMF is fine except for one thing... you can change the direction of the jump in mid air... impossible in real life of course!

In fact all the platform engines I have tried so far do the same. Is there any way to disable the cursor keys whilst in flight as it would make for a more consistent leap.

Dave S. aka Orangery.



 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
5th May, 2004 at 16:48:31 -

if you make your own custom engine, you wouldn't have that problem

 
Mr Icekirby says so!
OBEY ME!

Teapot

Does he even go here

Registered
  02/10/2003
Points
  2631

VIP Member
6th May, 2004 at 02:21:23 -

Hey Mr.S, you emailed me earlier about this. If you are still using my engine it'll take a bit of group switching.

You need to take the horizontal movement group and split it into two different groups.

You must put the events related to actualising the movement in one group, and the events related to changing the B value in another group.

Change the jumping event so that it adds or subtracts from the B value depending on what direction you are facing. Also make it deactivate the B changing group.

To re-activate the B-value group, go back to the event in the "gravity" group that goes like:

Bottom detector collides with obstacle set value A to zero

Add another effect to the event that activates the B-changing group.

 
n/a

Dave S.



Registered
  26/09/2003
Points
  924
6th May, 2004 at 03:08:40 -

So you don't know either icekirby, eh! Of course you are right though, I should have a go at writing my own.

Damien, I tweaked a few things in your (excellent) demo engine (before my original post) but couldn't get it to work but then I am a so called newbie!

I'll give what you said a go when I get round to it... currently working on other games and puzzles, one four years old!

Thanks for your help, Dave S. aka Orangery.


 
n/a

Assault Andy

Administrator
I make other people create vaporware

Registered
  29/07/2002
Points
  5686

Game of the Week WinnerVIP Member360 OwnerGOTM JUNE - 2009 - WINNER!GOTM FEB - 2010 - WINNER!	I donated an open source project
7th May, 2004 at 08:12:23 -

Icekirby's solution was fine. Making your own engine would pose no problems (unless you had problems making the engine). You could always add some code that disallows you to change direction when you are not touching the ground. Or use the Platform Movement Object.

 
Creator of Faerie Solitaire:
http://www.create-games.com/download.asp?id=7792
Also creator of ZDay20 and Dungeon Dash.
http://www.Jigxor.com
http://twitter.com/JigxorAndy

Retired Kliker Lazarus

The Ed Wood JR of TDC

Registered
  18/07/2003
Points
  7363
7th May, 2004 at 14:59:07 -

Yes, create an engine of your own. Just use the one that came with MMF is a guide-line.

 
Fine Garbage since 2003.
CURRENT PROJECT:
-Paying off a massive amount of debt in college loans.
-Working in television.

Dave S.



Registered
  26/09/2003
Points
  924
7th May, 2004 at 15:02:36 -

Andy, I have just read (and printed out) your article and have since downloaded the PMO.

I shall also have a go at making my own custom movement for left, right and jump...

Thanks, Dave S.


 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
7th May, 2004 at 16:42:24 -

one thing you could do is

bottom detector is overlapping backdrop
plus user is pressing left

>>set player X to X( "player" ) - [whatever]

so the bottom colision detector has to be touching some floor

then you have to figure out how to include momentum how ever you want it to work

 
Mr Icekirby says so!
OBEY ME!
   

Post Reply



 



Advertisement

Worth A Click