tiles can be drawn now

This commit is contained in:
2026-09-26 21:29:19 -06:00
parent a96b58adf2
commit 68d9bec872
6 changed files with 32 additions and 0 deletions
+2
View File
@@ -4,6 +4,8 @@ Strange motion. Idle toy inspired by Progress Quest.
WARNING: Opens a console to LAN which can run *any* code as the user Love2D is
running as! There is no security on this.
Tileset from [OpenGameArt.org](https://opengameart.org/content/dungeon-crawl-32x32-tiles).
## Brainstroming
Name the Race. Motto.
Level Class (xp bar)
+6
View File
@@ -0,0 +1,6 @@
{
"grass":{
"x":56,
"y":15
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

+1
View File
@@ -3,6 +3,7 @@ local utility = require "lib.utility"
local constants = {
progress_bar_height = 30,
reading_time_multiplier = 1 / 9,
tile_size = 32,
}
constants.fix_stats_tasks = function(data)
+21
View File
@@ -0,0 +1,21 @@
local constants = require "data.constants"
local utility = require "lib.utility"
local file = io.open("./assets/tileset.png", "rb")
local raw_data = file:read("*all")
file:close()
local file_data = love.filesystem.newFileData(raw_data, "./assets/tileset.png")
local love_image = love.graphics.newImage(file_data)
local tile_data = utility.load_data("./assets/images.json")
local images = {
love_image = love_image,
}
for name, data in pairs(tile_data) do
images[name] = love.graphics.newQuad( (data.x - 1) * constants.tile_size, (data.y - 1) * constants.tile_size, constants.tile_size, constants.tile_size, love_image )
end
return images
+2
View File
@@ -17,6 +17,7 @@ log{
local constants = require "data.constants"
local classes = require "data.classes"
local images = require "data.images"
local races = require "data.races"
@@ -156,6 +157,7 @@ love.update = function(dt)
end
love.draw = function()
love.graphics.draw(images.love_image, images.grass, 50, 50) -- TEMP
test_bar:draw()
book_progress:draw()