From bc52ad3e36ecb0918eca17ea68a0dc54852a3392 Mon Sep 17 00:00:00 2001 From: ne_mene Date: Fri, 13 Mar 2026 17:52:50 +0100 Subject: player is fat, ha ha --- main.lua | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'main.lua') diff --git a/main.lua b/main.lua index ed1a48a..da681fe 100644 --- a/main.lua +++ b/main.lua @@ -16,15 +16,14 @@ function love.load() set_scene(scn) + local tilemap = new_tilemap(64, 64) + scn.tilemap = tilemap + set_tile(tilemap, 0, 0, 1) + player = new_player(100, 100) ground1 = phys.Box.new(5, 50, 64, 16, {}) ground2 = phys.Box.new(64 - 16, 50 + 16, 16, 64, {}) - - local tilemap = new_tilemap(64, 64) - scn.tilemap = tilemap - - set_tile(tilemap, 0, 0, 1) end function love.update(dt) @@ -64,16 +63,16 @@ function love.draw(dt) fire_event(scn.on_ui) im.draw() - im.end_step() lg.print(tostring(love.timer.getFPS())) - lg.print("left "..tostring(player.box:touching_left()), 0, 20) - lg.print("right "..tostring(player.box:touching_right()), 0, 40) - lg.print("horizontal "..tostring(player.box:touching_horizontal()), 0, 60) - lg.print("up "..tostring(player.box:touching_up()), 0, 80) - lg.print("down "..tostring(player.box:touching_down()), 0, 100) - lg.print("vertical "..tostring(player.box:touching_vertical()), 0, 120) - lg.print("any "..tostring(player.box:touching()), 0, 140) + -- lg.print("left "..tostring(player.box:touching_left()), 0, 20) + -- lg.print("right "..tostring(player.box:touching_right()), 0, 40) + -- lg.print("horizontal "..tostring(player.box:touching_horizontal()), 0, 60) + -- lg.print("up "..tostring(player.box:touching_up()), 0, 80) + -- lg.print("down "..tostring(player.box:touching_down()), 0, 100) + -- lg.print("vertical "..tostring(player.box:touching_vertical()), 0, 120) + -- lg.print("any "..tostring(player.box:touching()), 0, 140) + input_step() end -- cgit v1.3-2-g0d8e