00:00
00:00
Newgrounds Background Image Theme

kyzakay 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!

I've made a jumping engine for all.

48,449 Views | 365 Replies
New Topic Respond to this Topic

Response to I've made a jumping engine for all. 2005-04-15 00:48:27


At 4/14/05 05:34 PM, Rystic wrote: I'll play with the code when I have the time. Unfortunately, I've got an english essay due tommorow. :(

lol, I had a essay do today, well the rough draft anyway

Response to I've made a jumping engine for all. 2005-04-16 21:36:28


Hey i was tryin out your engine but my character cant jump heres what happens...

Im makin a simple game where you jump over some spikes and into the portal to next level...

When my guy gets to the spikes i press up and nothing happens and he dies cause he fell threw the spikes.

Response to I've made a jumping engine for all. 2005-04-17 00:07:59


who's engine? if its mine then jump is space

Response to I've made a jumping engine for all. 2005-05-02 14:15:30


Rystic: I was trying out your engine but every time my character lands on the "Ground" he falls halfway through before he stops. Also when I press jump he sticks in the air until I stop holding space. Could you please help me fix this?

Also is there any chance you could tell me how to make the character able to turn around? Or make the objects move like a side scroller?

Thanks!

Response to I've made a jumping engine for all. 2005-05-11 01:58:04


At 4/30/05 03:59 PM, Shadow_of_sonic wrote: For some reason my character get's stuck in the block. It can't jump out of it either.

Same thing happens to me... How do I fix that?

Response to I've made a jumping engine for all. 2005-05-11 03:11:50


This was also happening to me, but i fixed it by adjusting the little x on the character/hero MC.

Response to I've made a jumping engine for all. 2005-05-11 10:52:06


ok yall i dont know wut program to use is it flash mx 2004 pro? if it is i got it and how do i script it i am new as u can tell rofl

Response to I've made a jumping engine for all. 2005-05-12 04:07:38


What do you mean little x?

Response to I've made a jumping engine for all. 2005-05-12 07:34:41


At 4/13/05 11:38 PM, iameatingjam wrote: could some1 help me? when my guy animates he falls half way through the flatform :(

a lot of people seem to be having problems with this. i'll explain.
when you create the character's mc (movie clip), go to the symbol pop-up. inside that window, go to the part that says "registration." you are probably registering the middle, or top right corner. that is default i think. if you do not click the center bottom square, the movie clip will land on the block somewhere else. remember. the computer has to be told what part of the movie clip to land on the block, or it will not know!

+ + +

+ + + <---------(registration)

+ + +

^
|
|
This points to the registration circle you have to click.

Response to I've made a jumping engine for all. 2005-05-12 16:59:17


Everyone, listen to Insignificance. That's how you stop the character from falling through.

Response to I've made a jumping engine for all. 2005-05-12 18:11:01


Everything is good, but the character stands like inside the block, and that makes it bad.


Say what you mean, then shut up.

BBS Signature

Response to I've made a jumping engine for all. 2005-05-12 18:14:19


Eh, I make my own engines, but I would like to see an art-based engine that rotates your character to match the ground.

Response to I've made a jumping engine for all. 2005-05-12 20:34:07


At 5/12/05 06:14 PM, Glaiel_Gamer wrote: Eh, I make my own engines, but I would like to see an art-based engine that rotates your character to match the ground.

thats not too hard, if you mean what I think you mean

Response to I've made a jumping engine for all. 2005-05-12 22:05:12


Rystic: Your script is superb. I love it: no instance names. It feels quite liberating.

Response to I've made a jumping engine for all. 2005-05-13 13:47:46


PLZ HELP! I've made some Mario game. You can jump, he stops at teh jumping sprite. But when you press the left/right buttons, he will PLAY THE WALKING SPRITE IN MID-AIR! Who can fix my script? Mario's instance name is "mario".

His script is:

onClipEvent (load) {
fall = false;
_name = "mario";
jump = 0;
speed = 4;
jumpheight = 12;
maxfall = -54;
}
onClipEvent (enterFrame) {
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (Key.isDown(Key.SPACE) && fall == false && jump == undefined) {
fall = true;
jump = jumpheight;
}
if (jump<>undefined) {
if (jump>maxfall) {
jump--;
}
_y -= jump;
}
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
this.gotoAndStop(2);
_x -= speed;
this._xscale = -110;
}
else if (Key.isDown(Key.RIGHT)) {
this.gotoAndStop(2);
_x += speed;
this._xscale = 110;
}
else if (jump <> undefined){
this.gotoAndStop(4);
}
else if(Key.isDown(Key.SHIFT)){
this.gotoAndStop(3);
}
else if(this.hitTest(_root.enemy)){
_root.health.nextFrame();
}
else if(fall == true){
this.gotoAndStop(4);
}
else
this.gotoAndStop(1);
}

The ground's script is:

onClipEvent (load) {
activated = false;
down = false;
}
onClipEvent (enterFrame) {
_root.report.text = Math.round(_root.mario.yMax)+" "+Math.round(yMin);
xmin = getBounds(_root).xMin;
xmax = getBounds(_root).xMax;
ymin = getBounds(_root).yMin;
ymax = getBounds(_root).yMax;
if (_root.mario.xMax>xMin && _root.mario.xMin<xMax && _root.mario.yMax<yMin) {
if (_root.mario.yMax-_root.mario.jump*2>yMin) {
_root.mario._y = ymin-_root.mario._height/2;
_root.mario.jump = undefined;
_root.mario.fall = false;
activated = true;
}
}
if (Math.round(_root.mario.yMax)>Math.round(yMin)) {
if (hitTest(_root.mario) && _root.mario.xmax<xmin) {
_root.mario._x -= _root.mario.speed;
}
if (hitTest(_root.mario) && _root.mario.xmin>xmax) {
_root.mario._x += _root.mario.speed;
}
if (hitTest(_root.mario) && _root.mario.ymin>ymax && _root.mario.jump>-1) {
_root.mario.jump = -1*(_root.mario.jump);
}
}
if (activated == true && not hitTest(_root.mario) && _root.mario.jump == undefined) {
_root.mario.jump = 0;
activated = false;
}
if (hitTest(_root.mario) && _root.mario.ymax>ymin && _root.mario.jump<>undefined && _root.mario._y<_y) {
_root.mario._y = ymin-_root.mario._height/2;
_root.mario.jump = undefined;
_root.mario.fall = false;
activated = true;
}
if (_root.mario.ymax-_root.mario.jump>ymin && _root.mario.xMin<xMax && _root.mario.xMax>xMin && _root.mario.jump<>undefined && _root.mario._y<_y) {
_root.mario._y = ymin-_root.mario._height/2;
_root.mario.jump = undefined;
_root.mario.fall = false;
activated = true;
}
}

Help please.

I AM USING FLASH MX, not FLASH MX 2004. Thanks in advance.


I'm one of the people who doesn't have text in his signature.

Response to I've made a jumping engine for all. 2005-05-13 14:35:08


Like in the original sonic games, sonic rotates to the ground, only that is tile based. I'd like to see an art based engine that does that.

Response to I've made a jumping engine for all. 2005-05-13 15:47:36


At 5/13/05 02:35 PM, Glaiel_Gamer wrote: Like in the original sonic games, sonic rotates to the ground, only that is tile based. I'd like to see an art based engine that does that.

art based engines are hard to make, what you have to do is put plain tiles and cover it up with an actual background, thats how I make my platformers. That what my engine is all about, well and there is another step to it, thats making everything off-screen disappear so the game doesnt lag as much as it would. Though, if the game has a fairly large level with decent graphics its probably gonna lag on high.

Response to I've made a jumping engine for all. 2005-05-13 17:00:20


Whenever my character lands on the block he is half eaten by it and cannot jump, he just sort of moves upwards a little. help please.

Response to I've made a jumping engine for all. 2005-05-20 00:52:00


Double click the character and move it so that the cross is below it. but not too down, or it'l fall away.

Response to I've made a jumping engine for all. 2005-06-06 16:39:52


This is Amazing! that you so much!

Response to I've made a jumping engine for all. 2005-06-12 12:26:19


I Started an platform game with Rystic engine i modified a bit (But im a newb to actionscript)
and i want an other MC for when it jumps how do u think i can do that?

Response to I've made a jumping engine for all. 2005-06-12 14:35:06


one thing, if u fall from to high you will fall thrue a block!
Nice actionscripting!

Response to I've made a jumping engine for all. 2005-06-28 21:00:55


I tried this and when I jump sometimes on it my ball goes through the platforms! :(


black dick

BBS Signature

Response to I've made a jumping engine for all. 2005-07-02 13:24:28


At 6/6/05 04:39 PM, etchandsketchdesigns wrote: This is Amazing! that you so much!

You're a fucking thief. Don't post here, n00b.

Response to I've made a jumping engine for all. 2005-07-02 13:27:12


At 7/2/05 01:24 PM, Rystic wrote:
At 6/6/05 04:39 PM, etchandsketchdesigns wrote: This is Amazing! that you so much!
You're a fucking thief. Don't post here, n00b.

Agreed!

The portal is flood with games that have no actionscript but this code.
Noobs think they can make a game without typing a single line of AS!


BBS Signature

Response to I've made a jumping engine for all. 2005-07-02 13:30:53


They're a disgrace to hard-working actionscripters everywhere.

Remember, the point of this engine isn't to BE the game... it's to start you off. I don't want people spamming the portal with 2-minute side scrollers because of this code.

Response to I've made a jumping engine for all. 2005-07-04 13:04:40


For some reason it doesnt work for me :( the guy just falls right through the block as soon as I test it.


BBS Signature

Response to I've made a jumping engine for all. 2005-07-07 15:43:46


I found messing around with the maxfall variable stopped my guy from falling thru. (Mine was 10 and i had three platofrms, he fell off the 1st and landed ok, but the other two he went thru the floor). My guy is 25x25, movespeed of 5, maxfall of 8.

I do reccommend trying the altering of the maxfall var. It worked for me. I find about character height devided by 3 works quite well, but thats for me.

hope this can help anyone

Response to I've made a jumping engine for all. 2005-07-18 16:10:40


At 7/2/05 01:24 PM, Rystic wrote:
At 6/6/05 04:39 PM, etchandsketchdesigns wrote: This is Amazing! that you so much!
You're a fucking thief. Don't post here, n00b.

How am I a thief for saying thank-you, shut up you stuiped n00b!. and to let all you know, I am -trix-
-toast- you wouldn't know me but plenty on NG do :P...some good some bad things about me, but i am no n00b, and i don't steal rystic, so shut the hell up.


BBS Signature

Response to I've made a jumping engine for all. 2005-07-31 17:22:34


i like that platformer thing its handy