Log In  


Cart #jotupmubo-0 | 2021-03-12 | Code ▽ | Embed ▽ | No License

I finally made my first game! Sprite Movement. Its a game where you move around. Even though it might be boring, I'm gonna make more versions! For now, Bye!



nice job! can you paste the code so i can use this in a game?


--sprite movement
--by demdem551
-->8
--game loops

function _init()

player={
x=64,
y=64,
}

end

function _update()

if btn(⬆️) then
player.y-=1
end
if btn(⬇️) then
player.y+=1
end
if btn(⬅️) then
player.x-=1
end
if btn(➡️) then
player.x+=1
end

end

function _draw()

cls()
spr(1,player.x,player.y)

end



[Please log in to post a comment]