Page 1 of 2

Platform game development: A little bit further

PostPosted: Tue Dec 13, 2005 9:24 pm
by robin.deman
Hi there,

I know many have asked this issue, and i know there are ways to fix it.
Searching through the forum didn't made me find the answer to my question.

I am currently busy building a platform game.
I already finished all the animations for the player/actor.

>> 20-12-05 Update:
But I came across the following problems:
The player can crouch, and crawl but crawling is just to the right.
The character still need to be able to climb up, down, climb left, climb right and hang in both directions.
The character still needs to be able to shoot.
>> The player can now jump, and the double jump bug is solved!

I've put my file of the project online for anyone who could help out..
This file is clean without the jump scripts but with all the animations.
http://www.ace-mobile.net/Source.zip

Is there anybody who could help me? i would really be greatfull.
I am a noob when it comes to programming.

Screenshot so far:
Image

PostPosted: Tue Dec 13, 2005 9:45 pm
by qwas
1. i got the same problem
2. remember u need to have changeanimation on
3. i had the same problem put your physical response only to 0.1 in all of em!
4. think its the changeanimation again

i like your art you are a very good drawer dude! :shock:

PostPosted: Wed Dec 14, 2005 8:01 am
by robin.deman
Hi qwas!

About 2,3 and 4: Give it a try tonight!
(didn't work) :cry:

Thanks for your compliment! :D
What you see is just a little for what's to come, i really want to make some good looking and fun to show what we can do with GE.

Stop multiple jumps

PostPosted: Wed Dec 14, 2005 11:37 am
by robin.deman
Is there anyone who can explain how we can make a smooth jump of an actor without the possibility that it can jump again in mid-air.
I know that this is able to solve this through an extra actor.

Is there anyone who can explain how to do this in noob/dummy language?

PostPosted: Wed Dec 14, 2005 12:07 pm
by Novice
Il try to help:
1.Use this
Code: Select all
//Make a CanJump variable and put this in draw actor
if (player.yvelocity==0) CanJump=1;
//On the jump key down event
if (CanJump==1) yvelocity=-4;

2.Use on animation finsh change animation direction STOPPED

3.Dont know anything bout that, youl have to ask Makslane

4.Use a varibale like PlayerDirection when you pres left PlayerDirection is 0, when you press right PlayerDirection is 1.
Code: Select all
//On crouch key down event
if (PlayerDirection==0) ChangeAnim (crounch_left.pgn);
else if (PlayerDirection==1) ChangeAnim(crounch_right.pgn);

Dont paste this code functions are not good.
Hope it helped.

PostPosted: Wed Dec 14, 2005 12:46 pm
by Kodo
It's always worth searching the forums for stuff like this as most of it has been covered before. If you are still stuck try looking at this thread which gives you a good starting point:

http://game-editor.com/forum/viewtopic. ... umping+ged

Nice artwork by the way :)

PostPosted: Wed Dec 14, 2005 1:50 pm
by robin.deman
>> Thank you Novice, i tried it but i still can't get it to work.. :cry:

Hi Dr Reed,

i did try that page/toptic and it helped to give a smooth jump but still gives the double jump bug. :?
Also, i tried jazz_e_bob's demo but I didn't understand the source nor how he made it.

By the way, thanks for the compliment! :D

PostPosted: Wed Dec 14, 2005 11:10 pm
by makslane
Try this to avoid double jump:

1) Create a canJump variable
2) When player collide with ground:
canJump = 1;

3) Key Down (up, no repeat):

if(canJump)
{
yvelocity = -8;
canJump = 0;
}

5) Now, put the gravity in a Draw Actor event:
yvelocity += .6;

6) Put a Physical Response action when player collide with ground and set velocities to zero

PostPosted: Thu Dec 15, 2005 11:56 am
by Novice
I sent the reworked file to you by email.

PostPosted: Thu Dec 15, 2005 12:01 pm
by robin.deman
Do you mean with a canJump variable an keydown action?
And must the canJump = 1 put in the script of add event -> collision?
I follow the tutorial in GE in Game stuff / Gravity

I'm a noob when it comes about this :roll:
I hope im not making you impatient..

PostPosted: Thu Dec 15, 2005 1:22 pm
by makslane
robin.deman wrote:Do you mean with a canJump variable an keydown action?


In the Key Down event, jump the player and disable new jumps by make canJump = 0


And must the canJump = 1 put in the script of add event -> collision?


Yes

PostPosted: Thu Dec 15, 2005 4:50 pm
by qwas
ty guys i got it to work

PostPosted: Thu Dec 15, 2005 6:11 pm
by robin.deman
Thanks for all your help guys!
I really appriciate it :)

Thank you alot! :D

I can walk, jump, crouch and crawl! (almost)

PostPosted: Tue Dec 20, 2005 8:23 am
by robin.deman
Nikola Lajic did a few thing for the events of the right and left side animations, also added gravity and stopped the animations from changing undesirably on key up events, he also did a crouch.

Exelent work and really helped with this process.
Although it works wonderfull, i was hoping it could crawl in both directions. Looking at the variables, i cannot figure out why the players character can crawl left?

Any chance some one could check this out?

The source is at:
http://www.ace-mobile.net/Source.rar

Thanks in advance,

PostPosted: Tue Dec 20, 2005 11:28 am
by Novice
Sorry i didnt leave a signature in the mail. I would help you again but my LAN card is broken and GE is on the other computer.

Il try to explain it like this, you have variables for jumping, crouching, and player side depending wich variables are active animations change.
So on key down down if crouch==1&&PlayerSide==1; animation changes to right crouch, on key down right if crouch==1&&PlayerSide==1; x+=3 and change animation to crawl right. On key up change animation depending on the variables etc.

Im sorry if this dosent make any sense, i hope il fiks my LAN card soon.