How to debug game applications

Started by
13 comments, last by dullboy 20 years, 8 months ago
I don''t have two machines so I can''t take advantage of remote debugging. Also log files sometimes do not help or are awkward. Usually game window would cover the whole windows area so that I can''t see the visual studio. Probably I can set up the game as a regular windows application. So please tell me how to set it up. Thanks a lot.
Advertisement
well when i debug, i think logic first of all. make sure that after each component of your game that you add, that it runs properly. and when you add something new, and it crashes, doesnt work right or something, then logically you have to asasume its what you just wrote. think through, what your problem is, and what could possibly be doing that. comment out code, write quick hacks to display information on your game screen. it may take a little work but i always find a solution.
Because you touch yourself at night!
I put my game in windowed mode for debugging, always.
I know with DX previous to 9 this can be a horrible mess. Fortunately the DX9 SDK let me do it pretty quick (a day''s work to allow runtime switching between fullscreen and windowed).


~BenDilts( void );
What rendering API are you using, DullBoy?

If it''s OpenGL, there shouldn''t be a problem.

If it''s DirectX, then I think you should look into the D3DPRESENT_PARAMETERS passed to CreateDevice - there''s a flag there to start it in windowed mode.

Superpig
- saving pigs from untimely fates, and when he''s not doing that, runs The Binary Refinery.
Enginuity1 | Enginuity2 | Enginuity3 | Enginuity4

Richard "Superpig" Fine - saving pigs from untimely fates - Microsoft DirectX MVP 2006/2007/2008/2009
"Shaders are not meant to do everything. Of course you can try to use it for everything, but it's like playing football using cabbage." - MickeyMouse

I am using DirectDraw, so there isn''t anything as you mentioned there. So does that mean if using DirectDraw, there is no way to run the program under windowed mode?
One more thing. If I update DirectX SDK to 9.0, do I have to give up DirectDraw? I heard there isn''t DirectDraw any more in DirectX 9.0, is that true?
You can still use DirectDraw, but it''ll still be only version 7.
quote:Original post by dullboy
I am using DirectDraw, so there isn''t anything as you mentioned there. So does that mean if using DirectDraw, there is no way to run the program under windowed mode?


Yes you can still run it in windowed mode, check out the flags for SetCooperativeLevel. Use DDSCL_NORMAL instead of DDSCL_FULLSCREEN.
quote:Original post by DukeAtreides076
quote:Original post by dullboy
I am using DirectDraw, so there isn''t anything as you mentioned there. So does that mean if using DirectDraw, there is no way to run the program under windowed mode?


Yes you can still run it in windowed mode, check out the flags for SetCooperativeLevel. Use DDSCL_NORMAL instead of DDSCL_FULLSCREEN.


Actually, I did try to change DDSCL_FULLSCREEN to DDSCL_NORMAL, but the program crashed. Do I have to change something else in the mean time?

quote:Original post by dullboy
Actually, I did try to change DDSCL_FULLSCREEN to DDSCL_NORMAL, but the program crashed. Do I have to change something else in the mean time?


Make sure youre not using it with DDSCL_ALLOWMODEX or DDSCL_EXCLUSIVE, you just need DDSCL_NORMAL.

When you create your primary surface, dont set the width, height, or color depth.

Do you know where it crashed out?

This topic is closed to new replies.

Advertisement