Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / A simple platform jumping engine thing

Author
Message
OldTifu
22
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 15th Oct 2004 23:33
Little ball jumps around cubes... nothing terribly complex.


I have noticed a lot of fangames (mainly mario and megaman games that i've seen made in that Gamemaker program) don't do jumping right, like, when you jump you always jump up the same distance... most actual games, you jump higher the longer you hold the jump button.

So that is what i've done here. A simple little platform thing, where a little ball walks around on some cubes, can jump, and the longer you hold space the higher you will jump. No external media, written in DBpro (though I imagine it'd work in classic, very simple stuff)
FoxBlitzz
21
Years of Service
User Offline
Joined: 19th Nov 2003
Location: United States
Posted: 16th Oct 2004 11:28
I'm sorry, but the gravity isn't very good. You need to make it so that it accelerates and decelerates. Not only does that jumping look unrealistic, but it's hard to tell when you reach the maximum jumping height due to the fact that the Y velocity doesn't slow down as you are reaching your maximum height.

Other than that, collision looks good, although the ball goes a little too far into the floor.

HP Pavilion | Intel Pentium 4 CPU 2.40 GHz
512 MB Ram | NVIDIA GeForceFX 5600 AGP, with 256 MB Ram
OldTifu
22
Years of Service
User Offline
Joined: 10th Jan 2003
Location: Scotland
Posted: 16th Oct 2004 18:12 Edited at: 16th Oct 2004 18:12
*shrug*
Wasn't meant to be anything realistic, it was more about the 'jumping higher by holding button' thing

Change the line

to

and he'll probably fall into the ground less
Cian Rice
20
Years of Service
User Offline
Joined: 8th Jun 2004
Location:
Posted: 17th Oct 2004 09:59
I might make this into a little platformer in a giant world where the only way to save yourself is by jumping over enemies and having them collide with walls to hurt them selves.

There is only one way to package shaolin: Shaolin Soccer...

Login to post a reply

Server time is: 2025-05-10 08:43:40
Your offset time is: 2025-05-10 08:43:40