Log In  


Okay. So, I am brand spankin' new to coding. I am not quite sure what the proper lingo is.

I am attempting to create a sandbox game, but I have no idea how to make it so that when players reach the edge of the playable screen, they can then continue on into a new screen. "Space Delivery!" and "Carmina's World" accomplishes this.

Please let me know if I am not articulating this properly. Any help is appreciated.



duplicate post


You need to make a variable for your mp then you have to change the map variable when you need to move

x=64
map=0
function _update()
 if btn(1) then x+=1 end 
 if x>120 then 
  x=60
  map+=1
 end
end

function _draw()
 print(0,x,60)
 map(map,0,0,0,16,16)
end

At first, all kinds of wacky was happening. But I think I figured it out. Thank you for your help.

function _draw()
		cls()
		camera (cam_x,cam_y)
		cam_x = player.x-60
		cam_y = player.y-60
		map(0,0,0,0,16*8,16*2,0)
		spr (player.sprite, player.x, player.y)
end


[Please log in to post a comment]