Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!

Join the forum, it's quick and easy

Hello, thanks for visiting GameML, if you are a Game Maker user, this is the site for you, please sign up, or login if you are already a member, or just browse the site! Welcome to GameML!

ATTENTION MEMBERS!!! USERS CAN NOW SIGN UP AGAIN!
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Log in

I forgot my password

Search
 
 

Display results as :
 


Rechercher Advanced Search

Site Hits
Free hit counter
These stats started at 0 on July 7th 2009
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com

Simple Platform Game Code

4 posters

Go down

Simple Platform Game Code Empty Simple Platform Game Code

Post by themastersword Sun Mar 14, 2010 1:54 am

This is a platform code. Put code in the STEP event.

Code:
// simple Platforming code!//
if place_free(x,y+1)//check if in the air
{
gravity = 0.7//reasonable gravity!
gravity_direction = 270//DOWNWARDS \/
}
else//if NOT in the air...
{
gravity=0//no more gravity!
gravity_direction = 270//  \/
}
//the arrow keys<,>,^
if place_free(x-4,y)and keyboard_check(vk_left){x-=4}//go left

if place_free(x+4,y)and keyboard_check(vk_right){x+=4}//go right
if !place_free(x,y+1)//Check for a instance under neath the player
and keyboard_check(vk_up){vspeed=-10}
themastersword
themastersword
GameML Noob
GameML Noob

Posts : 5
Points : 52373
GameML Reputation : 2
Join date : 2010-01-06
Age : 27
Location : Australia

http://blok-studios.com/

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by Vivi_IX Sun Mar 14, 2010 3:22 pm

Pretty cool. One simple code for platforming. Maybe you could make another one with more detail, like sprite changing.
Vivi_IX
Vivi_IX
Tres GameML Ninja
Tres GameML Ninja

Posts : 164
Points : 54388
GameML Reputation : 14
Join date : 2009-07-09
Age : 34
Location : USA: Painesville, Ohio

http://www.yoyogames.com/members/Vivi_IX

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by themastersword Mon Mar 15, 2010 3:10 am

Maybe, but this is just for starters.
themastersword
themastersword
GameML Noob
GameML Noob

Posts : 5
Points : 52373
GameML Reputation : 2
Join date : 2010-01-06
Age : 27
Location : Australia

http://blok-studios.com/

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by Sparx the Cy-Wolf Tue Mar 16, 2010 4:10 pm

maybe you could explain it in better detail?
Sparx the Cy-Wolf
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 56395
GameML Reputation : 5
Join date : 2009-06-07
Age : 33
Location : Mother ship

http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by fooey Fri Mar 19, 2010 7:44 pm

maybe he can't
fooey
fooey
Moderator
Moderator

Posts : 1422
Points : 55660
GameML Reputation : 1
Join date : 2009-07-10
Age : 29
Location : here

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by Sparx the Cy-Wolf Sat Mar 20, 2010 2:40 am

Your probably right actually
Sparx the Cy-Wolf
Sparx the Cy-Wolf
Admin
Admin

Posts : 1775
Points : 56395
GameML Reputation : 5
Join date : 2009-06-07
Age : 33
Location : Mother ship

http://www.yoyogames.com/members/Sparx%20the%20Cy-wolf

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by fooey Sat Mar 20, 2010 12:56 pm

go me!!! i deserve some,... stuff...
fooey
fooey
Moderator
Moderator

Posts : 1422
Points : 55660
GameML Reputation : 1
Join date : 2009-07-10
Age : 29
Location : here

Back to top Go down

Simple Platform Game Code Empty Re: Simple Platform Game Code

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum