A tutorial to how to make a basic platform game.
With a nice wall effect.
Wall download link:
http://www.filefront.com/15109897/block.gif
Codes:
left:
if place_free(x-4,y) //if place free 4 pixels to the left
{
x-=4 // jump 4 pixels to the left (You do not need to have spaces)
sprite_index=spr_player_left // chance sprite
}
else
{
if place_free(x-1,y) // dellets bugs { x-=1 sprite_index=spr_player_left }
}
right:
if place_free(x+4,y) //if place free 4 pixels to the right
{
x+=4 // jump 4 pixels to the right (You do not need to have spaces)
sprite_index=spr_player_right
}
else
{
if place_free(x+1,y) // dellets bugs { x+=1 sprite_index=spr_player_right }
}
step:
if place_free(x,y+1)
{
gravity_direction=270;
gravity=0.4;
}
else
{
gravity_direction=270;
gravity=0;
}
press up:
if place_free(x,y+1)
{
vspeed=-8 // Recomended 6-10
}
More codes and download links later!
it keeps saying "fatal error" and that there's an error in line 9 of the left button code. so i went back and erased all of line 9 (which was just the "{" symbol) and it STILL says fatal error line 9, even though THERE IS NO LINE 9. wtf?
InsomniAndrew 1 month ago
i got errors in mine
gamer3507 10 months ago
awesome bro!
AjourChannel 10 months ago
Hay, I really appreciate you posting this video. It was really helpful, thanks.
jestern001 2 years ago