External Exam Download Resources Web Applications Games Recycle Bin

platform | irregular shapes | gml

to find a path around irregular shapes:

objPlayer Step

if(keyboard_check(vk_right) && place_free (x + 1, y))
{
    x += 1;
}
if(keyboard_check(vk_left) && place_free (x - 1, y))
{
    x -= 1;
}
if(keyboard_check(vk_up) && place_free (x, y - 1))
{
    y -= 1;
}
if(keyboard_check(vk_down) && place_free (x, y + 1))
{
    y += 1;
}