Jump to content


Photo

Moving Platforms.


  • Please log in to reply
11 replies to this topic

#1 Super Trombone

Super Trombone

    Walking, Talking, Brass.

  • New Member
  • 1568 posts

Posted 17 June 2007 - 06:20 PM

Anyone know a good sure-fire to work code for moving platforms? Ones where the character jumps on them ond moves with them? ^_^
Please??? ;)
Note: I am a un-regestered user of GM-7 :(
  • 0

#2 crazydude765

crazydude765

    The Ultimate Life Form

  • New Member
  • 326 posts

Posted 17 June 2007 - 06:48 PM

search the forums for a platform engine, i know of a good one-

Platform Engine  v2.3
Demo
By Martin Piecyk

The arrow keys move and control jumps. On examples 16 and 17, shift runs.

Pressing "Z" moves to the next example
Pressing "X" moves to the previous example
Pressing "R" restarts the current example

You can use this platform engine in your game as long as you state somewhere in your documentation, "Platform engine by Martin Piecyk." Also, Mario and Goomba are copyrighted by Nintendo, Inc. Thanks to Mark Overmars for creating Game Maker. My email is mpiecyk@gmail.com. If you use this engine, email me your finished game -- I would be happy to see it.

The Mario sprites used in this demo were ripped by Bacon.
Thanks to DiasRaven who made the ladder and ground sprites. You may use these sprites in your game as long as you mention that DiasRaven was the original creator.

Changes from v2.2
Fixed the double-jumping tutorial to allow double-jumping on jump-through platforms.

Changes from v2.1
Added sprites contributed by DiasRaven
Character now can't move faster horizontally when in air while holding shift
Added two player support
Added water
Changed the code which allows the character to run up hills to stop the character from appearing to "warp" up blocks brought to my attention by Deowin.

Changes from v2.0
Precise collision checking for moveable solids has been added

Changes from v1.7
The move functions now support decimal values
Altered some of the Mario sprites so their origins are exact
Fixed a problem where the character has a little "hiccup" when jumping to the left
Mario now takes longer to change the running direction from left to right
The flying system was changed a little
The ability of sliding down hills while ducking was removed since it didn't look too good
Precise collision checking with solids, ladders, and platforms are now allowed
Precise collision checking is still not allowed for the character and movable solids
Solids, ladders, and platforms now can have an origin other than (0,0)
The character can now run down hills (without falling)
The character slows down when running up hills

Changes from v1.6
The image speed is now the same when running both directions
2 scripts where added to check for moveable solids
If you press tap left or right quickly Mario moves only one or two pixels
The friction was increased
The flying system was changed a little
When Mario jumps, he moves to the left a little more if the user is pressing left
When Mario jumps, he moves to the right a little more if the user is pressing right

Changes from v1.4
When you hold shift, Mario can run faster
Mario has a slower acceleration
Mario doesn't automatically jump on ladders
Mario doesn't get stuck to the bottom of moving solids
When Mario is running at full speed, you can press control to make Mario jump higher or "fly"
When Mario is on a slope and you press down, Mario slides down the slope.
There are now "moveable solids" which Mario can push.
Changed many of the scripts
Removed many scripts (there are now 25 scripts, 6 of which the user should know, and still 1,200 lines of code)
Removed the game object


not sure of the link, though... ^_^
  • 0

#3 Crispy

Crispy

    Black Sun Empire

  • GMC Member
  • 1214 posts
  • Version:GM8

Posted 17 June 2007 - 06:53 PM

search for the Fox Engine in Game Maker Creations. thats a good engine.
-crispy
  • 0

#4 winner122333

winner122333

    GMC Member

  • New Member
  • 143 posts

Posted 17 June 2007 - 08:12 PM

well if you want to make a moving platform all you have to do is make a line in the object screen make the object invisible. then the platform that you want to move for the object screen put create then start moving in a diractioon left or right then choose the speed then also bounce of objects.when you make the level put to line the line have to be vertical then put the moving platform in between then there ^_^
  • 0

#5 Super Trombone

Super Trombone

    Walking, Talking, Brass.

  • New Member
  • 1568 posts

Posted 20 June 2007 - 03:50 PM

Any specific codes you guys know of? :D
I have the Mario example, but it's too big (like 7mb.) and the codes are too long and complicated.
Fox engine. I downloaded it, but I am unregestered, and therefore can not play it.
  • 0

#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Retired Staff
  • 15415 posts
  • Version:GM:Studio

Posted 20 June 2007 - 09:51 PM

http://host-a.net/ic...ngplatforms.gmk
  • 0

#7 Super Trombone

Super Trombone

    Walking, Talking, Brass.

  • New Member
  • 1568 posts

Posted 22 June 2007 - 01:45 PM

http://host-a.net/ic...ngplatforms.gmk

<{POST_SNAPBACK}>


Nice example :P , but how do the platforms know which path to use? They have no coding. ;)
  • 0

#8 AjDeF3

AjDeF3

    Platform Game Lover

  • New Member
  • 1264 posts

Posted 22 June 2007 - 01:49 PM

This might help

http://gamemaker.sim....com/tutorial/3

=D
  • 0

#9 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Retired Staff
  • 15415 posts
  • Version:GM:Studio

Posted 23 June 2007 - 01:12 AM

http://host-a.net/ic...ngplatforms.gmk

<{POST_SNAPBACK}>


Nice example :mellow: , but how do the platforms know which path to use? They have no coding. :)

<{POST_SNAPBACK}>


Ctrl+rightclick object in the room editor and click Creation Code to see the path assignment code.
  • 0

#10 Grievous

Grievous

    GMC Member

  • New Member
  • 1262 posts

Posted 23 June 2007 - 01:23 AM

Guys, he's just looking for a code! :) Here, I'll just give you a VERY simple one I'm using in the Platform Example I'm making. Tested it even, and it works. Make sure the platform is solid, and is using hspeed to move, then do:

Horizontal Platform Step Event:
with (obj_player) {
     if (place_meeting(x,y+1,other) && place_free(x+other.hspeed,y)) x = round(x+other.hspeed)
}

  • 0

#11 program_1357

program_1357

    GMC Member

  • New Member
  • 212 posts

Posted 15 September 2007 - 02:35 PM

Well, I tried it. And it didn't quite work. I would jump on it... and stay! But then it would slide right out from under me!
  • 0

#12 Game_Constructor

Game_Constructor

    GMC Member

  • New Member
  • 5 posts

Posted 31 August 2010 - 10:00 AM

Guys, he's just looking for a code! :) Here, I'll just give you a VERY simple one I'm using in the Platform Example I'm making. Tested it even, and it works. Make sure the platform is solid, and is using hspeed to move, then do:

Horizontal Platform Step Event:

with (obj_player) {
     if (place_meeting(x,y+1,other) && place_free(x+other.hspeed,y)) x = round(x+other.hspeed)
}

When your platform get collised with marker that reverse direction of platform, its speed set to 0 for a while. To make this code really good, you should fix that. Otherwise player will stop while being on it so he can fll out.
2 program_1357:
Its working. Just be sure that you MAKE MOVING PLATFORM SOLID AND PLACE THE FLOOR AS THE PARENT FOR IT.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users