Jump to content


Photo
* * * * * 1 votes

Jump Through Platforms


  • Please log in to reply
33 replies to this topic

#1 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 02 September 2007 - 06:05 PM

  • Title: Jump Through Platforms
  • Description: This example shows how to easily and quickly create jump through platforms that work with multiple characters.
  • File Type Zipped .gmk
  • Game Maker version gm7
  • Direct Link: Link
  • Filesize: 14.5 KB when zipped. 22.4 KB when unzipped.
Most of the code is commented and you can view the Game Information (press F1) to look at the examples controls.
If used please give credit to Bill23.
Please Comment!

Edited by icuurd12b42, 22 September 2011 - 03:42 AM.

  • 0
Posted Image
Posted ImagePosted Image

#2 evilnms

evilnms

    GMC Member

  • New Member
  • 6 posts

Posted 26 September 2007 - 03:01 AM

Wow.... This is just what i needed....
Thank you!
  • 0

#3 AjDeF3

AjDeF3

    Platform Game Lover

  • New Member
  • 1264 posts

Posted 29 September 2007 - 02:17 AM

Great example, except i find this code alot more customizable and accurate.

jump_through_position = collision_line(x-12,y+7,x+12,y+7,Jumperthrougher,0,1);
if jump_through_position > 0 and vspeed >= 0  
{
gravity = 0;
vspeed = 0;
y = jump_through_position.y-7;
if keyboard_check_pressed(vk_space)
    {
    vspeed = -7
    
 
;
    }
}

  • 0
My game: NEW VERSION! 5 Levels!


Play Sonic Super Dash!
And last but not least... Play my FAVORITE game ever made with GM, and purchase the full version. Here

#4 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 30 September 2007 - 01:45 PM

Wow.... This is just what i needed....
Thank you!

<{POST_SNAPBACK}>

Thanks, I'm glad it's helped you.


Great example, except i find this code alot more customizable and accurate.

jump_through_position = collision_line(x-12,y+7,x+12,y+7,Jumperthrougher,0,1);
if jump_through_position > 0 and vspeed >= 0  
{
gravity = 0;
vspeed = 0;
y = jump_through_position.y-7;
if keyboard_check_pressed(vk_space)
    {
    vspeed = -7
    
 
;
    }
}

<{POST_SNAPBACK}>

That code should work (I'm only saying 'should' because I didn't actually test it), but I don't see why it's more accurate or customizable. Can you explain why?
  • 0
Posted Image
Posted ImagePosted Image

#5 Simke

Simke

    GMC Member

  • New Member
  • 134 posts

Posted 09 October 2007 - 07:10 AM

nice , but why is that if you are on the corner of a block you can't jump ??
  • 0

#6 BrokenGlass

BrokenGlass

    GMC Member

  • New Member
  • 524 posts

Posted 09 October 2007 - 01:31 PM

Nice, just fix the corner block glitch
  • 0

#7 Chao

Chao

    GMC Member

  • New Member
  • 63 posts

Posted 09 October 2007 - 04:43 PM

Yay! I was looking for something like this! thanks!

nice , but why is that if you are on the corner of a block you can't jump ??

<{POST_SNAPBACK}>

Its because it will ony jump if the origin is on the block. Since the origin is at the bottom left corner, if the origin is hanging the edge, it wont jump. :D
  • 0

#8 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 11 October 2007 - 12:21 AM

nice , but why is that if you are on the corner of a block you can't jump ??


Chao is correct. To fix this problem replace the code in the up event with this:
if position_meeting(x,y+1,obt_jump_through_floor)||position_meeting(x+sprite_width,y+1,obt_jump_through_floor)
vspeed=-10;

  • 0
Posted Image
Posted ImagePosted Image

#9 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 16 November 2007 - 12:38 AM

I finally updated the demo so it no longer has that glitch.
  • 0
Posted Image
Posted ImagePosted Image

#10 c_raethke

c_raethke

    TeamSkyfire

  • GMC Member
  • 2010 posts

Posted 16 March 2008 - 12:52 PM

I get this error:

Failed to run the game.


Edited by c_raethke, 24 March 2008 - 05:26 PM.

  • 0

Stasis server: Offline
On a scale of 3 to 9, how awesome is this game:
sig.png
IndieDB | World In War | Stasis [UPDATE 1/7/12]


#11 budman189

budman189

    GMC Member

  • New Member
  • 2 posts

Posted 17 March 2008 - 04:05 PM

:D Yeah, Same here... It Says "Failed To Run The Game." Someone Help Please. ^_^
  • 0

#12 xot

xot

    GMC Dismember

  • GMC Elder
  • 4785 posts
  • Version:GM:Studio

Posted 18 March 2008 - 12:54 AM

That's strange. I've tested this example from multiple mirrors and it works for me. I suggest downloading from another mirror if you haven't already, and possibly clearing your browser cache.

Edited by xot, 18 March 2008 - 06:14 AM.

  • 0
GMLscripts.com, rise from your grave!

If any of my posts contain broken images or links, I can probably supply them for you. PM with a link to the post.

#13 Doogie_Forever

Doogie_Forever

    Dog Warrior

  • GMC Member
  • 824 posts
  • Version:GM:Studio

Posted 18 March 2008 - 06:05 AM

I like this method a lot.

I never thought to use Yprevious to check for that variable. Thanks.
  • 0

#14 JaketheSnake3636

JaketheSnake3636

    GMC Member

  • New Member
  • 1905 posts

Posted 21 March 2008 - 05:14 AM

This engine has a lot of potential, yet it is flawed in at least a couple of areas. For one, when standing on a jump-through platform, if you move to the right off the platform and then move back quickly, the player object will appear to float for a short amount of time. Secondly, the y-axis of the player seems to jitter quite a lot. I'm not sure what you did to cause this, but it feels very awkward.
  • 0

#15 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 05 April 2008 - 12:43 AM

That's strange. I've tested this example from multiple mirrors and it works for me. I suggest downloading from another mirror if you haven't already, and possibly clearing your browser cache.

I just downloaded it and it's working fine for me too.

I like this method a lot.

I never thought to use Yprevious to check for that variable. Thanks.

No problem.

This engine has a lot of potential, yet it is flawed in at least a couple of areas. For one, when standing on a jump-through platform, if you move to the right off the platform and then move back quickly, the player object will appear to float for a short amount of time. Secondly, the y-axis of the player seems to jitter quite a lot. I'm not sure what you did to cause this, but it feels very awkward.

I'm not sure if this is what you're talking about, but I just discovered that sometimes the block will slowly fall through the platforms if you don't quite make it all the way through. I'll try to fix this. If this is not what you are talking about, I'm not sure what the jittering is. It doesn't happen to me.
Edit: There's a new version.

Edited by Bill23, 05 April 2008 - 02:12 PM.

  • 0
Posted Image
Posted ImagePosted Image

#16 AlexAR

AlexAR

    GMC Member

  • GMC Member
  • 173 posts
  • Version:GM:Studio

Posted 06 April 2008 - 10:37 PM

This is very nice. But another problem is if you jump and move left and hit the vertical wall, gravity gets turned off. You can then slide up the wall. But only on the right side of the wall.
  • 0

#17 Seth52

Seth52

    TeamSkyfire

  • GMC Member
  • 664 posts

Posted 07 April 2008 - 01:49 AM

I'm getting the "Failed to run" error. Is it GM or the host?

Seth
  • 0

Posted Image
[ Like us! -Posted Image : Posted Image- Follow us! ]


#18 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 07 April 2008 - 07:07 PM

Maybe it's because it's a .gmk file. Do you have GM7?
  • 0
Posted Image
Posted ImagePosted Image

#19 supermariomaster

supermariomaster

    GMC Member

  • GMC Member
  • 132 posts
  • Version:GM:Studio

Posted 08 April 2008 - 08:10 PM

This is so cool but what part of the code do I change?

//this part may need to be ajusted slightly depending on the origin of your
//character

Thanks!
  • 0

#20 Seth52

Seth52

    TeamSkyfire

  • GMC Member
  • 664 posts

Posted 09 April 2008 - 11:28 PM

Maybe it's because it's a .gmk file. Do you have GM7?


Yeah. I have GM7 Pro.

Seth
  • 0

Posted Image
[ Like us! -Posted Image : Posted Image- Follow us! ]


#21 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 10 April 2008 - 11:10 PM

This is very nice. But another problem is if you jump and move left and hit the vertical wall, gravity gets turned off. You can then slide up the wall. But only on the right side of the wall.

I've got a new version I'll post in couple of seconds that will fix this.

This is so cool but what part of the code do I change?

//this part may need to be ajusted slightly depending on the origin of your
//character

Thanks!

This part:

if !position_meeting(x+1,y+1,obt_jump_through_floor)&&!position_meeting(x+15,y+1,obt_jump_through_floor)

The numbers I bolded need to be changed so that the chack to see if you are on a jump through floor is in the right place.

Maybe it's because it's a .gmk file. Do you have GM7?


Yeah. I have GM7 Pro.

Seth

I don't know what the problem is then. <_<
  • 0
Posted Image
Posted ImagePosted Image

#22 MrBlack

MrBlack

    GMC Member

  • GMC Member
  • 158 posts

Posted 04 May 2008 - 11:47 AM

This is very nice. But another problem is if you jump and move left and hit the vertical wall, gravity gets turned off. You can then slide up the wall. But only on the right side of the wall.

I've got a new version I'll post in couple of seconds that will fix this.


I downloaded it and that problem still exists... how can I fix it?
  • 0

#23 Bill23

Bill23

    GMC Member

  • GMC Member
  • 460 posts
  • Version:GM:Studio

Posted 10 May 2008 - 04:52 PM

Replace the first line of code in the blue boxes step event with this:
if !position_meeting(x+1,y+1,obt_jump_through_floor)&&!position_meeting(x+15,y+1,obt_jump_through_floor)
It actually did work for the red box, but not the blue one. Thanks for pointing that at. The new version has this fixed.
  • 0
Posted Image
Posted ImagePosted Image

#24 Obj_Control

Obj_Control

    GM Mentor

  • New Member
  • 2561 posts

Posted 03 December 2008 - 12:50 AM

I'm getting the "Failed to run" error. Is it GM or the host?

Seth

I know how to solve this error. When you open the file to launch the game, DO NOT close it. Keep the file location oped when you run the game.
  • 0

#25 daman123125

daman123125

    AZN Game Programmer

  • GMC Member
  • 1957 posts
  • Version:GM8

Posted 18 January 2009 - 01:39 AM

This is a nice example. Great job. :)
  • 0
Posted ImagePosted Image
Posted ImagePosted Image

Tuts/Examples: Ultimate Weapon Arsenal(AI included) | Wall-Jumping | Plasma Pistol/Rifle Overheating System | Cash Register Example | Two Objects In One View
PM me if one or more of my posted examples have a broken link.

#26 kikuliku

kikuliku

    GMC Member

  • New Member
  • 22 posts

Posted 15 February 2009 - 01:05 PM

THNX!! it helped me alot :] :) :whistle: :) :) :lol:
  • 0
Nice and Easy Gaming Community

Join us now! It has to become famous sooner or later!

I am an in the GM Quiz!

#27 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 25708 posts
  • Version:GM:Studio

Posted 16 August 2011 - 09:03 PM

Std Msg: Please use the tutorial template header.

Std Msg: Please fix the errors so people can see your tutorial/example in action properly.

  • 0

U1FVsm3.png

40799.png


#28 CharlieMcShane

CharlieMcShane

    GMC Member

  • GMC Member
  • 259 posts
  • Version:GM:Studio

Posted 27 August 2012 - 02:28 AM

The engine works fine, it is people being silly and launching the .gmk through the .zip.

If you are getting "failed to run" error, open it, save it to your local drive (Anywhere, it doesn't matter where) and then run.

The game cannot compile when it is executed through temporary files, it needs a origin on your local drive. Never open a .gm6 .gmk .gm81 or .gmx through winrar or Windows built in .zip viewer.
  • 0

#29 raphaelle

raphaelle

    GMC Member

  • GMC Member
  • 106 posts
  • Version:GM:Studio

Posted 05 February 2013 - 06:36 AM

it automatically jumps when it lands on a jump through platforms... please help me fix this :D

thanks in advance

-raphaelle
  • 0

#30 DBoyWheeler

DBoyWheeler

    GMC Member

  • GMC Member
  • 14 posts
  • Version:GM7

Posted 05 August 2013 - 12:53 AM

Hey, um, is there a GM Studio version of this, since I recently (and at last) got GM Studio (Standard Version)?  I'd like to someday learn how to do jump through platforms with Studio.


  • 0
"The Way of the Paladin: To Seek, To Learn, To Do" (from Quest for Glory II: Trial By Fire)

#31 mrnorx

mrnorx

    GMC Member

  • New Member
  • 2 posts
  • Version:GM:Studio

Posted 18 August 2013 - 10:20 AM

Hey, um, is there a GM Studio version of this, since I recently (and at last) got GM Studio (Standard Version)?  I'd like to someday learn how to do jump through platforms with Studio.

Ive just tried this using GM Studio and it works fine. You have to import the project not open it.

This is the best and easiest jump through ive tried. Many thanks to BILL23


  • 0

#32 Notsac

Notsac

    GMC Member

  • New Member
  • 1 posts
  • Version:GM8.1

Posted 30 December 2013 - 07:04 AM

How do I delete a post?


Edited by Notsac, 30 December 2013 - 07:05 AM.

  • 0

#33 enstrdec

enstrdec

    GMC Member

  • GMC Member
  • 55 posts
  • Version:GM8

Posted 20 March 2014 - 02:59 PM

Hello! I see this post is very old, but... can anyone help me? My sprite doesnt change on that platform even if i press left or right. Any suggestions?

(I'm newbie, so i will be very happy if you write me that code) =)
Bye!


  • 0

#34 july15

july15

    GMC Member

  • New Member
  • 3 posts
  • Version:None

Posted 01 July 2015 - 04:17 PM

this have a error... o bug... if i jump and let the up pressed, jump when touch the floor, it should jump only with contact the floor downing or... after the jump, something like that...  the worst is than i dont know how repair :(


  • 0