Phew, this was probably the most difficult feature to implement ever. Now it works though. A lot of you probably forgot about what project I was working on, so let me remind you: I am trying to make a isometric roguelike, with a lot of monsters and items and stuff. A game like this usually has a lot of levels, and finally, the same can be said for my game. Using some smart though buggy code, the level is generated in a seporate thread, then piped back to the main thread, partially parsed, and displayed. A level can usually be generated after only a few moves from the player, way before the player actually finds the exit.
While working, I kept getting extra strings and bytes stuck in the pipe. It turned out that the pipe was taking a really long time to start up, and the very first message took until much later in my other thread to actually come out, right in the middle of a check status loop. Luckilly, I found the solution in the middle of solving another bug.
A lot still needs to be done on this system though. Right now, only downwards motion is supported. The game generates the level immediately below your current level in advance, if the player somehow skips right on to another level, the game needs to start generating that level right away. I also need to store old levels before moving on to new levels. This way, if the player comes back up, he can get back his old stuff.
I am also probably going to decrease the size of each level dramatically. I hope to find a artist who can draw some higher resolution graphics, then display 10 times less pictures in 10 times higher quality. This way, the player won't have to spend a long time walking around the level, and can focus on interacting with stuff.