summaryrefslogtreecommitdiff
path: root/dyl.lua
diff options
context:
space:
mode:
authorElizabeth Alexander Hunt <me@liz.coffee>2026-05-09 18:38:21 -0700
committerElizabeth Alexander Hunt <me@liz.coffee>2026-05-09 18:38:21 -0700
commiteb9466c8d3d18d65eb4bab2f6770f55cba9d8de3 (patch)
treebd2c49b56d9a4bdc30e3aec5ad0b3139b398c566 /dyl.lua
parent78fd742b1e276aec3eb1e939542ef51c3231b060 (diff)
downloaddyl8-eb9466c8d3d18d65eb4bab2f6770f55cba9d8de3.tar.gz
dyl8-eb9466c8d3d18d65eb4bab2f6770f55cba9d8de3.zip
Adding a simple grid-based camera
Diffstat (limited to 'dyl.lua')
-rw-r--r--dyl.lua11
1 files changed, 7 insertions, 4 deletions
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