From eb9466c8d3d18d65eb4bab2f6770f55cba9d8de3 Mon Sep 17 00:00:00 2001 From: Elizabeth Alexander Hunt Date: Sat, 9 May 2026 18:38:21 -0700 Subject: Adding a simple grid-based camera --- dyl.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'dyl.lua') diff --git a/dyl.lua b/dyl.lua index 8c5f8a2..fa0190d 100644 --- a/dyl.lua +++ b/dyl.lua @@ -231,6 +231,8 @@ end function _init() end +_camera = Camera:new(_player) + _step_t = time() function _update60() -- clear here in case we want to print to screen outside of _draw @@ -251,8 +253,9 @@ function _update60() end function _draw() - World.sort(function(a, b) - return b.render_order < a.render_order - end) - World.foreach(function(e) e:render() end) + -- TODO: FIX THIS + -- World.sort(function(a, b) + -- return b.render_order < a.render_order + -- end) + World.foreach(function(e) _camera:render(e) end) end \ No newline at end of file -- cgit v1.3