07-08-2009, 11:34 PM
james1992_2006 Wrote:because of the way the graphics rendering engine was implemented, not drawing "blank" ground tiles will cause visual artifacts. You're breaking the code and saying its an optimization...
The "engine" is essentially 15 (if that?) lines of dx surface initialization and some calls all over the place to looped texture painting. Explain how preventing tilesheet renders of 0,0 breaks the code in any way shape or form?
You are talking bollocks. 0,0 is by default a black square, its only real purpose was discovered when Magnus wrote a tutorial that made the engine grab the first pixel in a tilesheet and set its RGB to your transparent colour.
Tile 0,0 is ignored by every layer but ground. If you draw it onto the ground, you get black. It just so happens if we don't draw to the surface its black anyway - why draw to the surface if there is no visual change whatsoever?
This breaks nothing, it speeds up drawing on empty maps your players won't ever see. Its an opimization. I see no problem with the code and no reason for this not to go into the next MS release - what I do see is a rather pointless post made by someone who doesn't know what they are talking about.
If the removal of a ground tile leads to an artifact, you just need to clean the surface up instead of expecting vb6 to spoon feed you more than it already does, or throw in a single render of the 0,0 texture to effectively blank that tile location. If you are telling it not to redraw, its not going too. Redraw it ONCE to blank it under given circumstances, then don't draw it again. - its not rocket science. It makes sense that switching maps leaves all your now not drawing' ground tiles with an image of the last map. You've told the DX not to redraw so it isn't.
Map Change and Deletion of Ground Tile in the editor are the only two circumstances I can think of where redraw logic is needed. Death fires off your warp, which fires off (essentially) a map change, so your basics are covered.
As for the actual FPS increase, if you really want to go overkill on what is essentially a micro change, throw in an if statement that does a once over on the map for 0,0 on the ground layer - hell, throw in a number. If you only see a bonus if 100 out of your 700x700 tiles on the map are blank then just if statement the optimisation to only be active under that circumstance. Use some logic, Think ._.
Coke