t_bgTexture = new Texture2D(deviceRef, 1, 1, 1, TextureUsage.None, SurfaceFormat.Color);
t_bgTexture.SetData<Color>(new Color[] { c_tilebgColor });
my Question. Is Drawing these custom textures every time I draw going to cause latency(lag) in my game?
Currently I am using a cameraPosition Vector to control movement and simply subtract the current cameraPosition from each tile when it is drawn. And for some reason it is extremely jumpy, as in not smooth scrolling. I have used this method before and it worked fine, the only thing that I can see is different is that last time I was using Textures loaded from a file.
N.B I have an array 23x23 and each tile is 2 textures
23^2 = 529 * 2 = 1058 ... therefore 1058 Textures being Drawn all of different
Colors.
(sory i cant be more specific .. rushing off to bed gotta be up in 4 hours :S)
[Edited by - Andy474 on September 14, 2009 2:55:59 PM]
[Solved] Rendering a Tiled Game using a Custom Texture2D
Hi, a quick performance Question here.
I am current working on a tile engine which is drawn using a int[,]
and foreach tile I draw a Texture in a rectangle using
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement