Page 1 of 1

Platformer

PostPosted: Thu Sep 09, 2004 8:00 pm
by jazz_e_bob
I am going crazy here trying to build a platformer system. :roll:
The demo platformer is far too simplistic and has the jumping bug. :oops:
Forum advice solves some problems but creates others. :cry:
If we can just build a stronger demo... :idea:

:arrow:

Player Specification:

Responds to a global gravity variable.
Slows down when on surface of platforms using the platforms friction variable.
Lands neatly, while maintaining momentum, on tops of platforms.
Bounces off bottoms and sides of platforms.
Only jumps when on platform.
When jumping, accellerates left or right at slower speed than when on platform.
Falls off edge if walks to end of platform.


I have been working on this for weeks now and have gotten nowhere fast. :(

Any help would be appreciated. Please post working GEDs.

PostPosted: Tue Sep 14, 2004 9:23 am
by jazz_e_bob
Hmmm

No takers? :wink:

OK I will write a different style of game then...

Stay tuned. :)

Much love and respect to the GE posse.

8)

PostPosted: Wed Sep 15, 2004 6:51 pm
by Just4Fun
Sorry Jazz:
I wish that I could help you, but I'm not too swift when it comes to platform games. I never played many of them and I've designed exactly *none*... :(

PostPosted: Wed Sep 15, 2004 11:02 pm
by jazz_e_bob
That's OK.

I'll put this one on the backburner for a bit. May need a new approach.

Having fun making something else in the meantime. :)

PostPosted: Thu Sep 16, 2004 9:53 am
by ingsan
Hello Jazz :wink:

I just came back from holidays ! Pff, I'm so glad to be back on the forum !!! I can see that there have been great and awesome improvements to GE ! Just CRAZY :idea: GREAT JOB Maxslane ! Hi Rachel. How are you going ?

Well, maybe I should start to be more helpful (and less talkative) here :?

Maybe I can help you, Jazz, for platform game is what I do the most.

- To make actor jump only when on platform :
Let's say that on collision with ground, actor has a yvelocity of 0.
Put a condition on KeyDown[Up],
if ( yvelocity == 0 )
{
make actor jump ; // your code to make actor jump
}


In other hand, if your actor takes a Physical Response Action on collision with ground, you can create a variable "jump".
onCollision with ground, jump == 1 ;
onCollisionFinish, jump == 0 ;
on KeyDown[Up],
if ( jump == 1 )
{
make actor jump ;
}

Those will be the only conditions for your actor to jump. I hope that I was clear enough in my explanation.

- When jumping, accellerates left or right at slower speed than when on platform :
Then you could use the conditions told above to tell your actor to have a slower left or right move while he is jumping.

onKeyDown[LEFT or RIGHT] > Script :
if ( jump == 0 )
{
slower x-move;
}


- Slows down when on surface of platforms using the platforms friction variable :
Do you mean that whenever your actor is walking and then stops, he slides a little bit on the platform before he stops completely ? As if he's walking on ice ?
If this is the case, then you could do this :
onKeyUp[LEFT or RIGHT], x-- ; // actor will slow down when your finger is no more on the Left/Rigth key
if ( x == 0 ), x = 0 ; // actor will stop

It might work ... maybe.

- Responds to a global gravity variable :
What do you mean by global gravity "VARIABLE" ?
Lands neatly, while maintaining momentum, on tops of platforms.
Bounces off bottoms and sides of platforms

Can you explain :(

:wink: Cheers