Click here to Skip to main content
15,904,935 members
Home / Discussions / C#
   

C#

 
GeneralRe: internet connected state Pin
gnjunge23-Aug-05 7:45
gnjunge23-Aug-05 7:45 
GeneralPassing values to methods. Pin
zaboboa23-Aug-05 6:05
zaboboa23-Aug-05 6:05 
GeneralRe: Passing values to methods. Pin
Werdna23-Aug-05 6:26
Werdna23-Aug-05 6:26 
GeneralRe: Passing values to methods. Pin
zaboboa23-Aug-05 6:39
zaboboa23-Aug-05 6:39 
GeneralRe: Passing values to methods. Pin
Guffa23-Aug-05 7:02
Guffa23-Aug-05 7:02 
GeneralRe: Passing values to methods. Pin
Matt Gerrans23-Aug-05 9:43
Matt Gerrans23-Aug-05 9:43 
GeneralNewsletter/Massemail Pin
cyonite23-Aug-05 6:04
cyonite23-Aug-05 6:04 
GeneralSystem.Diagonastics.Process.GetProcesses throws error if the user does not have admin rights. Pin
manivannan.p23-Aug-05 5:14
manivannan.p23-Aug-05 5:14 
GeneralRe: System.Diagonastics.Process.GetProcesses throws error if the user does not have admin rights. Pin
Judah Gabriel Himango23-Aug-05 5:19
sponsorJudah Gabriel Himango23-Aug-05 5:19 
GeneralRe: System.Diagonastics.Process.GetProcesses throws error if the user does not have admin rights. Pin
manivannan.p23-Aug-05 18:45
manivannan.p23-Aug-05 18:45 
GeneralDynamic Event Handler Pin
pssuresh23-Aug-05 4:52
pssuresh23-Aug-05 4:52 
GeneralRe: Dynamic Event Handler Pin
SeMartens23-Aug-05 5:12
SeMartens23-Aug-05 5:12 
GeneralIIS virtual Directory Pin
C0d3_P03t23-Aug-05 4:26
C0d3_P03t23-Aug-05 4:26 
GeneralRe: IIS virtual Directory Pin
BammBamm23-Aug-05 5:34
BammBamm23-Aug-05 5:34 
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 

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.