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!
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: http://gameml.iowoi.org/GameML-File-Sharing-h3.htmPlease add only games.
Create A GAMEML BLOG!
Make a Blog on GameML:http://gamemlblogs.wetpaint.com
Keywords


Simple Platform Game Code

View previous topic View next topic Go down

Simple Platform Game Code

Post by themastersword on 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}
avatar
themastersword
GameML Noob
GameML Noob

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

View user profile http://blok-studios.com/

Back to top Go down

Re: Simple Platform Game Code

Post by Vivi_IX on 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.
avatar
Vivi_IX
Tres GameML Ninja
Tres GameML Ninja

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

View user profile http://www.yoyogames.com/members/Vivi_IX

Back to top Go down

Re: Simple Platform Game Code

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

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

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

View user profile http://blok-studios.com/

Back to top Go down

Re: Simple Platform Game Code

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

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

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

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

Back to top Go down

Re: Simple Platform Game Code

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

maybe he can't

_________________
we are the champions - my friends
And we'll keep on fighting - till the end -
We are the champions -
We are the champions
No time for losers
'Cause we are the champions - of the world -
avatar
fooey
Moderator
Moderator

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

View user profile

Back to top Go down

Re: Simple Platform Game Code

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

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

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

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

Back to top Go down

Re: Simple Platform Game Code

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

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

_________________
we are the champions - my friends
And we'll keep on fighting - till the end -
We are the champions -
We are the champions
No time for losers
'Cause we are the champions - of the world -
avatar
fooey
Moderator
Moderator

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

View user profile

Back to top Go down

Re: Simple Platform Game Code

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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