Log in
Search
GameML File Sharing
USERNAME: gamemladmin@gmail.com PASSWORD: gamemlsite Upload Here: https://gameml.forumotion.com/GameML-File-Sharing-h3.htmPlease add only games.Simple Platform Game Code
4 posters
:: Game Making :: Game Maker Help :: Code Database
Page 1 of 1
Simple Platform Game Code
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}
Re: Simple Platform Game Code
Pretty cool. One simple code for platforming. Maybe you could make another one with more detail, like sprite changing.
Re: Simple Platform Game Code
maybe he can't
fooey- Moderator
- Posts : 1422
Points : 55660
GameML Reputation : 1
Join date : 2009-07-10
Age : 29
Location : here
Re: Simple Platform Game Code
go me!!! i deserve some,... stuff...
fooey- Moderator
- Posts : 1422
Points : 55660
GameML Reputation : 1
Join date : 2009-07-10
Age : 29
Location : here
Similar topics
» A simple code
» Simple 2D Rain Code-Lite
» Redbrix : a platform game
» How do you make simple blood in a game?
» Simple(but good) Sliding Movement
» Simple 2D Rain Code-Lite
» Redbrix : a platform game
» How do you make simple blood in a game?
» Simple(but good) Sliding Movement
:: Game Making :: Game Maker Help :: Code Database
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|