--Define some graphical objects graphics = {}; graphics["Map"] = love.graphics.newImage("maps/aminusgamemap.png") graphics["HeroSprite"] = love.graphics.newImage("sprites/herosprite.png") graphics["EnemySprite"] = love.graphics.newImage("sprites/enemysprite.png") function love.draw() --Draw the Map love.graphics.draw(graphics["Map"], cell_offset_x, cell_offset_y); --Draw the Characters for i,v in pairs(characters) do love.graphics.draw(graphics[characters[i].graphic_object], (characters[i].location[1]-1)*cell_width + cell_offset_x, (characters[i].location[2]-1)*cell_height + cell_offset_y); end --Draw HP Label for Hero & enemies that are "Near" local c = 0; for i,v in pairs(characters) do if is_near("Hero", characters[i].name) then c = c + 1; local s_label = characters[i].name .. ": HP(" .. characters[i].hp .. "/" .. characters[i].max_hp .. ")"; love.graphics.print(s_label, 20 + 150*(c-1), 20); end end end