NaN:NaN
NaN:NaN
--:-- / --:--
Newgrounds Background Image Theme

windows83 just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

A question for the EggHeadsJumping?

676 Views | 22 Replies
New Topic Respond to this Topic

Hello guys, i'm trying to make a game similar to castle crasher, the 3D style kind of thing, I have learnt that Gravity is not needed in this type of Game which makes me think how would I get my character to jump, The only solution I can think of is Jumping is just a animation and the anchor point gets raised higher than the walking animation.

I have 1 maybe 2 questions for you Geniuses.

Q.1 : Am I correct in thinking this ? If not what is the correct way of jumping in that style of game?
Q.2: ( IF I AM RIGHT ) How would I go about making the script Example :

if key.isDown(Key.69){ gotoAndStop(2); }

That would play that animation of jumping but how would I get it to stop playing that animation?

All help will be greatly appreciated :D THANKS :D

Response to A question for the EggHeadsJumping? Oct 7, 2010


When I do it I use gravity, it's easier and more logical to handle from a coding standpoint.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 7, 2010


Yeah I think so too, but using gravity in that type of Game is that even possible? I'll Whip up a quick demonstration to show you what I mean. Done :D

Click here.

Any help? Or also if its possible to put gravity on here, can ya tell me how or atleast shine me in the right direction? Thanks :D

Response to A question for the EggHeadsJumping? Oct 7, 2010


Gravity is possible, it's all just maths anyway. Basically you are going to need to set up x,y and z coordinates considering this type of game is three dimensional.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 7, 2010


Is there any chance you could give me a quick script just so I understand :P

Response to A question for the EggHeadsJumping? Oct 7, 2010


At 10/7/10 04:15 AM, creeper112 wrote: Is there any chance you could give me a quick script just so I understand :P

Eh depends how you want to translate the 3 dimensions to the 2, you could do something like:

_x = x2;
_y = y2/2-z2;

which would keep x the same so you could just not use x2, so have left and right move you in _x axis, then up and down can move you in y2 axis and then apply the gravity and jumping in the z axis. Also you don't need to divide the y2 by 2 that just sort of gives perspective and you can use a constand speed for the x2 and y2 axis.

You could change it and have it so your y2-axis is sort of on an angle to add more to perspective, really I'm just rambling on crap now.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 7, 2010


I don't fully understand this, but i'll give it a shot :D

Response to A question for the EggHeadsJumping? Oct 7, 2010


sorry to double post but how would you go about making the ground then? if you was to put gravity on it would shoot you down, correct? So the ground would have to be 2D which defeats the point, or am I wrong?

Response to A question for the EggHeadsJumping? Oct 7, 2010


I thought about this when I played Castle Crashers. I'm not the best programmer here and I haven't put this into practice, but I would assume you would create a point under the player that would be the landing point and have it move accordingly with the player. When the player is in the "air", set a boolean to true and upon reaching the landing points co-ordinates set it to false.

Response to A question for the EggHeadsJumping? Oct 7, 2010


Ah, very clever indeed :D I will give it a shot now.

Response to A question for the EggHeadsJumping? Oct 7, 2010


Or move away from the idea that code should depend on graphical content. If your whole floor is flat you can simply have a point on the Z axis be defined as the floor. If there are raised and lowered platforms on your floor it shouldn't take too much more to realise that you just need to redefine the point on the Z axis to equate to the floor.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 7, 2010


That idea didn't work. :(
And Fion yeah my Platforms are raised etc and I'm not great at scripting so asking me to do something like that is like asking a monkey to give you a lap dance, I need more of an explanation or a hint in the right direction I understand making the _z axis as the floor but how would I do it on raised/multiple platforms

Response to A question for the EggHeadsJumping? Oct 7, 2010


That old Chinese fairytale...

Fion tried his best to teach the monkey the lap dance.
Sadly, the monkey didn't know anything about lap dancing.
The monkey admitted that he doesn't know how to do dance at all.
The monkey didn't even know how to walk.

One end of the storry tells that the monkey kept on dancing, but having no clue how to stand on his feet, he fell down frm his tree. Being angry about failing the millionth time, a tiger got close and bit both his arms off. The barely alive monkey, still not knowing how to dance got caught by a crocodile which drowned him slowly.

The other end tells of the monkey first learning how to walk, so he miraculously turned into a human, left the djungle and won the hearts of all the hot chicks in town, because he was such a sexy dancer.

sorry, couldn't resist

Response to A question for the EggHeadsJumping? Oct 8, 2010


At 10/7/10 09:45 PM, creeper112 wrote: That idea didn't work. :(
And Fion yeah my Platforms are raised etc and I'm not great at scripting so asking me to do something like that is like asking a monkey to give you a lap dance, I need more of an explanation or a hint in the right direction I understand making the _z axis as the floor but how would I do it on raised/multiple platforms

ehhhh, non raised platform (z == 0) OMG on the ground, raised platform (z==something bigger than zero) lowered platform (z==something smaller than zero).

Basically milchreish has an odd way of saying it but he has a point. You need to learn how to code more complicated things before you try and approach this, possibly also furthering your math education, depending on where you are at in your schooling.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 8, 2010


At 10/8/10 01:28 AM, Fion wrote: You need to learn how to code more complicated things before you try and approach this

Wait that came out wrong, you don't need to learn things more complicated than this. You just need to better your coding abilities, like, get beyond the basic tutorial style platformer or mouse avoider game.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 8, 2010


Lol nice chinese poem thing :D, And yeah I have done platforms and mouse avoiding games, but I know where your coming from.

And so it would be something like

if(this.hitTest(_z = 10)) {
touchingGround = true
}

and that would be a higher platform?

Response to A question for the EggHeadsJumping? Oct 8, 2010


At 10/8/10 09:55 AM, creeper112 wrote: and that would be a higher platform?

That's a pity, you really just showed everyone you barely even know the basics of actionscript. Not likely to get much more help on this subject until you learn to code. :(


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 10, 2010


At 10/8/10 09:42 PM, Fion wrote:
At 10/8/10 09:55 AM, creeper112 wrote: and that would be a higher platform?
That's a pity, you really just showed everyone you barely even know the basics of actionscript. Not likely to get much more help on this subject until you learn to code. :(

LOL your acting as if i was trying to pretend i did know the basics lmao... No i don't know them and I never said I have so it's kinda a pity that you judge people without actually knowing anything about them.. Also on a side note, i highly suggest you stop trying to help people because your help is not help you just tell people to go learn action script LOL ? thats kinda what we are trying to do, if you can't help then don't try. I'm not having a go at you i'm just saying this is a request for help not a request to be told to go learn basic actionscript lol..

Response to A question for the EggHeadsJumping? Oct 10, 2010


Read the fairytale again.
Try to figure out the 2 differences between the two endings.
They are the key to understand Fion's behaviour.

Response to A question for the EggHeadsJumping? Oct 10, 2010


At 10/10/10 07:00 PM, creeper112 wrote: LOL your acting as if i was trying to pretend i did know the basics lmao... No i don't know them and I never said I have so it's kinda a pity that you judge people without actually knowing anything about them..

All I did was judge (correctly) your skill in actionscript, I've made no mention about you as a person and don't intend to.

Also on a side note, i highly suggest you stop trying to help people because your help is not help you just tell people to go learn action script LOL ? thats kinda what we are trying to do, if you can't help then don't try. I'm not having a go at you i'm just saying this is a request for help not a request to be told to go learn basic actionscript lol..

Plenty of people on these forums benefit from and appreciate my help. I even helped you, had you already known how to code it would have been a help. But that's the difference, the forums are more of a place to get some ideas on how to go about doing certain things or specific questions on how to code. For example a person who knows all the syntax that needs help on how to approach a certain issue or a person who doesn't know how to code asking for help on a specific function.

I'm not just saying "EL OH EL U R USELESS GO LEANR 2 COED", I'm saying, this is above your head, I could sit here and right out all the code for you to use to do what you want to do but you wouldn't understand and yes, sure, you would learn some stuff but you still wouldnt really know how to code. What I am saying here is, go learn some more basic stuff, learn it on your own. Okay sure you can make a platformer with a tutorial, but can you code one without a tutorial. If you had an abstract idea for a game which wouldn't have a tutorial for it would you know how to make that?

This is going to be my last post in this thread, go learn how to code, stop complaining when someone doesn't come along and post the code you need to answer your question. I hope to see you back here in the forum in 4 months time asking for some feedback on your awesome psuedo-3D beat-em up game. Good luck.


.

BBS Signature

Response to A question for the EggHeadsJumping? Oct 10, 2010


At 10/10/10 07:08 PM, milchreis wrote: Read the fairytale again.
Try to figure out the 2 differences between the two endings.
They are the key to understand Fion's behaviour.

Damn i like you.


website :: hugostonge.com

my job :: we+are

Response to A question for the EggHeadsJumping? Oct 11, 2010


Fairytale?
Newgrounds has a vast amount of "unique" people ( NOT AN INSULT..)

Fion, I admit you helped a little and as far as accuracy goes you're way off mark, I did in actual fact script that without the help of a tutorial, Not that its a big deal since its only very mildly basic scripting, I am not doubting you have helped other people but if you have no intentions of helping somebody such as me there is no need to try and insult them, no matter which angle I look at your "What a pity" comment, its meant to be an insult..

Also I would like to add that I have found an easy way to jump without the use of the z axis or any other depth usage, This whole thread was opened as a question to people willing to find a way to help, not to tell me to go learn basic scripting, I do realise I have to learn basic AS scripting first and that is what I am trying to do by building this little game but by profession I am a PHP/C# and C++ Scripting I have also dabbled in making Java script games and I am trying to widen my knowledge with the ever growing AS script's And no by stating my profession I am not trying to gloat or anything like that I am trying to state that I am no noob to scripting and AS scripting is one if not THE simplest form of scripting I have come across not including EaScripting which is basically story telling, anyway I came to the conclusion that If I asked around I would pick it up in no time. That was my assumption but since there is no room for beginners on here I shall use other methods. Thank you for your help.

Response to A question for the EggHeadsJumping? Apr 18, 2025


At 10/11/10 07:57 PM, creeper112 wrote:Fairytale?
Newgrounds has a vast amount of "unique" people ( NOT AN INSULT..)

Fion, I admit you helped a little and as far as accuracy goes you're way off mark, I did in actual fact script that without the help of a tutorial, Not that its a big deal since its only very mildly basic scripting, I am not doubting you have helped other people but if you have no intentions of helping somebody such as me there is no need to try and insult them, no matter which angle I look at your "What a pity" comment, its meant to be an insult..

Also I would like to add that I have found an easy way to jump without the use of the z axis or any other depth usage, This whole thread was opened as a question to people willing to find a way to help, not to tell me to go learn basic scripting, I do realise I have to learn basic AS scripting first and that is what I am trying to do by building this little game but by profession I am a PHP/C# and C++ Scripting I have also dabbled in making Java script games and I am trying to widen my knowledge with the ever growing AS script's And no by stating my profession I am not trying to gloat or anything like that I am trying to state that I am no noob to scripting and AS scripting is one if not THE simplest form of scripting I have come across not including EaScripting which is basically story telling, anyway I came to the conclusion that If I asked around I would pick it up in no time. That was my assumption but since there is no room for beginners on here I shall use other methods. Thank you for your help.


I miss you Jay.