I'm working on a tiled roguelike, making the engine from scratch, and it's going well. However, I can't seem to do something very simple: draw the map memory (the part of the map that the player has explored but cannot currently see) in dimmer-than-full-bright characters.
I'm using a plain old courier.ttf for my font "tiles", and it looks about like this:
And if you move around a bit, I've set it up so that wherever you've been gets added to the "map memory", so that I can draw that in darker colors and retain a map of where you've been. Trouble is, even when I set the font color to something darker, it just looks like this:
And just so that there's no question, here's the code for drawing said map and map memory (taken from my Map class module)
Code: Select all
DrawMap = function(self)
love.graphics.setColor(255,255,255,255)
for i = 1, self.board_size.x do
for j = 1, self.board_size.y do
if mob_db.Player:LineOfSight(i, j) and mob_db.Player:DistToPoint(i, j) <= mob_db.Player.sight_dist then
love.graphics.print(self.map_table[i][j], i * self.tile_size, j * self.tile_size)
self.memory[i][j] = self.map_table[i][j]
end
end
end
end,
DrawMapMemory = function(self)
love.graphics.setColor(25,25,25,10)
for i = 1, self.board_size.x do
for j = 1, self.board_size.y do
love.graphics.print(self.memory[i][j], i * self.tile_size, j * self.tile_size)
end
end
end
Update: If I change the color inside DrawMapMemory to love.graphics.setColor(1,1,0,1), I can get something like this:
What would I set it to to get plain old gray? lol