After another period of cleaning up the code I decided to put off making the inventory menu, and work a little on the map instead.
It’s going to be an exploration game, so the map is important. I want to make it consisting of rooms, pretty much how it looks so far, in the good old Rogue style. However, there is no exploration if you can see the whole map at once – you have to discover the map by visiting it. It means that initially the screen should be empty, and the rooms appear only ofter you have visited them at least once. To simplify things, once a room appears, it stays visible – the player character is supposed to have hearing and memory good enough for this.
Of course, just drawing the rooms suddenly as you enter them would be jarring in a fully animated game – I decided that I will make them fade in gradually. To do that, I don’t draw the tiles on the background layer directly, but instead create “tile sprites”, that will gradually fade in and, at the end of their lives, draw themselves on the background layer. This works pretty fine, assuming the rooms are not too big.
There are however several problems caused by the fact, that the floor tiles are larger than the space they represent – they have a bottom part, that is covered by the tiles being closer to the eye. This makes an ugly effect when the tiles are still translucent, and the background can be seen, and also makes some problems when the sprites die and draw themselves on the background – because they will overwrite the tiles that are already there, but closer to the eye. A temporary solution is just drawing a part of the tile if it’s supposed to be covered, but I need to think of something better.
Another problem that I need to solve is that right now it’s impossible to tell if a room just ends, or if it’s just the end of your field of view – I will probably add some kind of an edge to the room tiles.
I might also decide to change the way the tiles are drawn altogether – use walls for “blocked” tiles, instead of the “chasm” I use now. However, the mockups I made so far don’t really look right...