Okay, so since I completed the minimap in my game, I figured it would be nice to work on a clean zooming of the game. So I went back to the Display.cs class and I'm trying to understand where those strange ugly lines come from when I resize the game window.
I'm just thinking and fishing for ideas here, but here is what I am thinking now:
In our previous conversations, bluemonkmn said the lines could appear because each tile drawn on the display could be off by a pixel. But I wonder, if it is the case, why won't the lines appear when the game is at it's normal size? It should be off by a pixel too I think. Since I don't know anything about OpenGL, I'm just toying with the DrawFrame function in Display.cs to see what effect each element has. I figured that the function uses coordinates to pick up the right texture on the graphic sheet, draws a rectangle on display and binds the texture to the rectangle (not necessarily in that order). Then the graphic appears. The operations is repeated for each cell and each sprite to display if I understand correctly.
I played with the coordinates related to the texture (image on the graphic sheet to display) and it does not seem to be the problem. In fact, when the lines appear, the graphics are still entirely there, but there is space between them. So I put this aside.
I played with the coordinate of the rectangle drawn on the display and when I augment by one pixel one side of the rectangle, I can the tile overlap each other... and still the lines appear. So it doesn't seem to be the problem either.
So now, I ponder about this. I'm probably wrong, but still... When the game starts, the native size of the game is set and the display is perfect. At this time, the size of each "pixel" in the game is exactly the size of a pixel "on screen". When the game window is zoomed, the size of the game pixels are zoomed in too. It's easily visible since pixels calculations are still working inside the game, so the pixels are zoomed in proportion with the display area. But the pixels "on screen" are not getting bigger. The pixels in the game seem to be based on integers. But suppose that when you zoom the game, you zoom it by a factor of 33%. So each game-pixel is now worth 1.33 screen-pixel. Maybe, when the display is drawn, a rounded value is taken (so 1.33 pixel goes back to 1 pixel) so it leaves a .33 pixel that is empty: thus a line is created. That would explain why, when the game is at it's original size, there are no lines, but if you zoom the game, it leaves lines.
I already see the failing in this theory, because the size of the lines remains the same no matter how big or how the small the game window is zoomed. The lines are always exactly one pixel large. If my theory was exact, it would mean the lines would be of a different size depending on the zoom ratio.
Anyway, I still gave it a try. I tried making a different DrawFrame function to fill the theoretical .33 pixel , but I have been unable to do so. Maybe because I don't do it properly (possible) or I am simply not on the right problem (most probable).
There is also an observation that I do when I zoom the game that troubles me. I have a layer on top of each level map that is called "SpiritViewLayer". It's a very simple layer containing one tile repeated to fill the display area. The tile is an animated tile with one invisible frame and one semi-transparent green pixel. Without getting into the details of the reasons why I have such a layer, let's just say that it is very easy to identify the green tiles. The tiles switch from completely transparent to green when a power is activated, but it is almost always completely transparent. Okay, now this is what troubles me: when I zoom the game window, I can see green lines, most probably coming from the "SpiritViewLayer", with it's very distinctive green, but at this moment the tiles are supposed to be invisible and they are since only the lines are green and not the tiles. Could it be a sort of "buffer" problem, a cache that would paint over the display area when it shouldn't?

Does someone knows if I'm actually looking at the right place to solve this problem? (the DrawFrameFunction) Or could the problem originate before the call to this function?
Need a little help here please!

Thanks guys!