Click here to Skip to main content
15,891,248 members
Home / Discussions / C#
   

C#

 
GeneralRe: IIS virtual Directory Pin
Sarvesvara (BVKS) Dasa23-Aug-05 16:50
Sarvesvara (BVKS) Dasa23-Aug-05 16:50 
GeneralRe: IIS virtual Directory Pin
C0d3_P03t23-Aug-05 23:41
C0d3_P03t23-Aug-05 23:41 
GeneralSerializationException With DataTable Pin
Wender Oliveira23-Aug-05 4:06
Wender Oliveira23-Aug-05 4:06 
GeneralRe: SerializationException With DataTable Pin
SeMartens23-Aug-05 4:21
SeMartens23-Aug-05 4:21 
GeneralRe: SerializationException With DataTable Pin
Wender Oliveira23-Aug-05 4:48
Wender Oliveira23-Aug-05 4:48 
GeneralRe: SerializationException With DataTable Pin
miah alom23-Aug-05 4:39
miah alom23-Aug-05 4:39 
GeneralRe: SerializationException With DataTable Pin
Wender Oliveira23-Aug-05 7:23
Wender Oliveira23-Aug-05 7:23 
GeneralDirectX getting bogged down with nothin to do? - C# Pin
YawgmothIII23-Aug-05 3:41
YawgmothIII23-Aug-05 3:41 
Hello,

I've been programming a C# game engine, mainly just for fun and learning purposes. The project is going very well and i've learned alot seeing as this is my first time working with DirectX, but even though the project is going well i continuously run into the same problem.

I'm building my Engines around the idea of an RTS game and i have 3 seperate engines. The Game Engine(master) and then 2 lower engines the Sprite Engine(DirectDraw) and my Object Engine(Manages Units).

Since i'm still testing things there are times when there are no units on the screen. If this happens and i don't have any debug information being drawn then it begins to lag extremely. Its obviously hard to tell whats going on because it only does it when theres a blank white screen displayed, but i first noticed it in how laggy the responses are in the keyboard.

I'm at a total loss as to why giving DirectX nothing to do would lag my program? any ideas?

Heres a segment of my code from the Sprite engine that actually draws stuff on the screen:

back.ColorFill(Color.White);<br />
				// Draw the Object to the back buffer using source copy blit<br />
				<br />
				for (int i=0; i <= AnimQPt; i++)<br />
				{<br />
					for (int z=0; z <= AnimQ[i].spriteCluster.TotalSprites; z++)<br />
					{<br />
						back.DrawFast(AnimQ[i].spriteCluster.sprites[z].point.X, AnimQ[i].spriteCluster.sprites[z].point.Y, Models[AnimQ[i].intModelID].Sprites[AnimQ[i].spriteCluster.sprites[z].SpriteID].SpriteSurface, AnimQ[i].spriteCluster.sprites[z].rectangle, DrawFastFlags.SourceColorKey);<br />
					}<br />
				}<br />
				if (bObjectNumDisplay)<br />
				{<br />
					for (int i=0; i <= AnimQPt; i++)<br />
					{<br />
						back.DrawText(AnimQ[i].pointDisplay.X, AnimQ[i].pointDisplay.Y, AnimQ[i].intUnitID.ToString("N0"), false);<br />
					}<br />
					back.DrawText(10, 10,"ScreenWidth = " +Screen.Width.ToString()+ "  ScreenHeight = " +Screen.Height.ToString()+ "  XPos = " +AnimQ[0].pointDisplay.X +"  YPos = " +AnimQ[0].pointDisplay.Y +"  Current Point = " +this.AnimQ[0].spriteCluster.sprites[0].rectangle.ToString() + " ElapsedTime = " +this.AnimQ[0].pointDisplay.ToString(), false);<br />
				}


The variable AnimQPt would normally be -1 if there are no units on the screen.
GeneralRe: DirectX getting bogged down with nothin to do? - C# Pin
Judah Gabriel Himango23-Aug-05 5:15
sponsorJudah Gabriel Himango23-Aug-05 5:15 
GeneralNo templates in C# Pin
Tomerland23-Aug-05 2:49
Tomerland23-Aug-05 2:49 
GeneralRe: No templates in C# Pin
mav.northwind23-Aug-05 3:11
mav.northwind23-Aug-05 3:11 
GeneralSSL sockets Pin
g00fyman23-Aug-05 2:45
g00fyman23-Aug-05 2:45 
GeneralRe: SSL sockets Pin
Werdna23-Aug-05 6:32
Werdna23-Aug-05 6:32 
GeneralRe: SSL sockets Pin
g00fyman23-Aug-05 13:25
g00fyman23-Aug-05 13:25 
Questionhow to zip and unzip folder through c# Pin
mkani23-Aug-05 1:58
mkani23-Aug-05 1:58 
AnswerRe: how to zip and unzip folder through c# Pin
Frank Kerrigan23-Aug-05 2:09
Frank Kerrigan23-Aug-05 2:09 
AnswerRe: how to zip and unzip folder through c# Pin
Bojan Rajkovic23-Aug-05 8:45
Bojan Rajkovic23-Aug-05 8:45 
AnswerRe: how to zip and unzip folder through c# Pin
Anonymous26-Aug-05 7:21
Anonymous26-Aug-05 7:21 
QuestionWhat type of project in c# .net Pin
dabuskol23-Aug-05 0:50
dabuskol23-Aug-05 0:50 
AnswerRe: What type of project in c# .net Pin
Frank Kerrigan23-Aug-05 0:56
Frank Kerrigan23-Aug-05 0:56 
GeneralRe: What type of project in c# .net Pin
dabuskol23-Aug-05 1:24
dabuskol23-Aug-05 1:24 
GeneralRe: What type of project in c# .net Pin
Frank Kerrigan23-Aug-05 1:43
Frank Kerrigan23-Aug-05 1:43 
GeneralMeasuringString with complete accuracy Pin
Anonymous23-Aug-05 0:31
Anonymous23-Aug-05 0:31 
GeneralRe: MeasuringString with complete accuracy Pin
Guffa23-Aug-05 0:46
Guffa23-Aug-05 0:46 
GeneralWindows Event Log Pin
afterdeath22-Aug-05 22:31
afterdeath22-Aug-05 22:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.