Cant find whats wrong!!!! (Help would be much appreciated)
Hey all,
Well I''ve been digging away at this game. I started out as a project for the company I work for, and nows its part of a College degree course that Im doing at night.
Anyway I cant find the problem and its due on Friday.
The full project is located here, (Minus some of the other classes)
http://www.welcome.ie/ronan/BSP.zip
(I am aware that after I change States to create the HUD that I need to reset them, but if you comment of those calls the error is more central to the BSP area. I dont know what the error is)
I would really appreciate if anyone could locate exactly whats causing the error. (The scene not to be rendered.)
(Heck I''d nearly pay for help at this stage !!!! or give free webspace to you....., or 3D models, or anything (well no sexual favours) )
Im new to C++ and DirectX and well I cant for the life of me find the problem.
Please can anyone help. Im due to demostrate this on friday morning and its worth 33% of my degree...
Any help would be much appreciated.
Cheers
Edge
Two things -
* If providing full source, please make sure it''s all there so it will compile correctly. Otherwise, please post code bits where you think the problem is located.
* Please provide details on the errors or problem you are having.
* If providing full source, please make sure it''s all there so it will compile correctly. Otherwise, please post code bits where you think the problem is located.
* Please provide details on the errors or problem you are having.
I''m looking over the source now. I get a grey quad drawing.
Any idea what the error is? I''m not sure exactly what the program should be doing at this stage. I''ve written a BSP loader/renderer/converter before so I may be able to help but I need to know what is actually going wrong. If you can, direct me to the general area(s) of where you think the problem may lie.
Also, I needed to change the back buffer format to D3DFMT_A8R8G8B8 (although this is probably device specific).
Any idea what the error is? I''m not sure exactly what the program should be doing at this stage. I''ve written a BSP loader/renderer/converter before so I may be able to help but I need to know what is actually going wrong. If you can, direct me to the general area(s) of where you think the problem may lie.
Also, I needed to change the back buffer format to D3DFMT_A8R8G8B8 (although this is probably device specific).
All the files are included, minus the textures. Which are not needed anyway.
the file DemoLevel.iwf
Is where all the geometry is stored.
As for what the program is meant to do well:
Its meant to build and render a BSP Tree, using the geometry supplied by the Demolevel.iwf.
Its not doing this, I have localised the error to be due to the BSP. But I dont know where the error is. Basically all Im getting is a Black Screen followed by the app stalling. I''ve tried debugging it but that doesnt do anything either.
I know its to do with the BSP Tree, So can you check to see if my C++ is correct for the BSP Tree?
After that I dont know, it works fine in C. But when I converted over to C++ it didnt work. And it has to be done in C++
the file DemoLevel.iwf
Is where all the geometry is stored.
As for what the program is meant to do well:
Its meant to build and render a BSP Tree, using the geometry supplied by the Demolevel.iwf.
Its not doing this, I have localised the error to be due to the BSP. But I dont know where the error is. Basically all Im getting is a Black Screen followed by the app stalling. I''ve tried debugging it but that doesnt do anything either.
I know its to do with the BSP Tree, So can you check to see if my C++ is correct for the BSP Tree?
After that I dont know, it works fine in C. But when I converted over to C++ it didnt work. And it has to be done in C++
The app only stalls for about 60 seconds while it builds the BSP tree. It does render it eventually. It draws a greyish quad (which I assume is part of the geometry). I''ve had a brief look through the BSP loading code and it all seems accurate.
still looking though..
still looking though..
your shitting me???
You mean I''ve been trying to debug this think for the past few days when it actually works?
Ok
could you download
http://www.welcome.ie/ronan/heat.zip
copy all the textures into the the directory with the C++ code, see if that Grey quad turns into a textured Wall, with a Celtic Design type thing and a SandStone type wall.
Cheers
Any suggestions on speeding it up, since it apparently runs...
Ronan
You mean I''ve been trying to debug this think for the past few days when it actually works?
Ok
could you download
http://www.welcome.ie/ronan/heat.zip
copy all the textures into the the directory with the C++ code, see if that Grey quad turns into a textured Wall, with a Celtic Design type thing and a SandStone type wall.
Cheers
Any suggestions on speeding it up, since it apparently runs...
Ronan
Yep. Works fine. textured wall with what looks like a section of carpet.
As far as optimization goes, there are tons of articles related to it as well as some BSP source if you look hard enough. gameTutorials.com has a couple of BSP programs with source.
I would advise though, don''t worry too much about optimization right now - it''ll save you time if you get the program working well first, then make it fast (btw, the fps count once drawing is fine. its just the loading thats slow)
BSP trees aren''t the fastest things to load anyway. I''m not sure what the polycount of the test level is but generally, my computer takes anywhere between one and two minutes to load an average map in a quake3 engine. 60 seconds isn''t too bad unless its a small map.
For now I would just use a smaller map to test if you can''t handle waiting.
As far as optimization goes, there are tons of articles related to it as well as some BSP source if you look hard enough. gameTutorials.com has a couple of BSP programs with source.
I would advise though, don''t worry too much about optimization right now - it''ll save you time if you get the program working well first, then make it fast (btw, the fps count once drawing is fine. its just the loading thats slow)
BSP trees aren''t the fastest things to load anyway. I''m not sure what the polycount of the test level is but generally, my computer takes anywhere between one and two minutes to load an average map in a quake3 engine. 60 seconds isn''t too bad unless its a small map.
For now I would just use a smaller map to test if you can''t handle waiting.
By optomization I actually mean getting the programme to work better.
BSP Tree aside, is there actually anything wrong with the way I have setup up DirectX and Direct3D, is there any faster methods of doing so???
Also what is the best way to handle input, when I did it in C all I did was use case statments to check the Input.
Then in the WindowProc function (Processing loop thingy) I basically depending on what Keys were pushed I did a certain thing.
This to me seemed very poor is there a better way???
I have a few questions about Direct Sound, but I''ll wait until I can compile my code before I start Hassling everyone about that.
Cheers for all the help.
BSP Tree aside, is there actually anything wrong with the way I have setup up DirectX and Direct3D, is there any faster methods of doing so???
Also what is the best way to handle input, when I did it in C all I did was use case statments to check the Input.
Then in the WindowProc function (Processing loop thingy) I basically depending on what Keys were pushed I did a certain thing.
This to me seemed very poor is there a better way???
I have a few questions about Direct Sound, but I''ll wait until I can compile my code before I start Hassling everyone about that.
Cheers for all the help.
Direct3D initialization: Looks fine to me. It works. Most of the D3D Init code is fairly straight forward. The only suggestions I have is that you check device capabilities on settings before setting them (I had to change the back buffer format because my device didn''t support the specified format), so that it will run better on varying systems.
Input: Use DirectInput. Its easy to set up and works MUCH better then a win32 message handler - as far as I know you can''t make winProc() process multiple messages at once which means that, say, you can''t move your camera forwards and sideways at the same time (diagonally). If you''re moving forwards and you press sideways, it starts moving sideways only.
DirectSound: Easy to use and set up. Find some articles on it or read over the SDK.
Input: Use DirectInput. Its easy to set up and works MUCH better then a win32 message handler - as far as I know you can''t make winProc() process multiple messages at once which means that, say, you can''t move your camera forwards and sideways at the same time (diagonally). If you''re moving forwards and you press sideways, it starts moving sideways only.
DirectSound: Easy to use and set up. Find some articles on it or read over the SDK.
Ok I have most things working now.
I have 2days and Im rushing to get things in.
Um anybody have sample code of positioning a weapon in the bottom of the viewport? oR GOOD tutorials or anything.
I posted a day or two ago about how to do this. But well I've been working on other things.
Ummmmm Got the Alpha Blending Working, although when I go over Black Type Textures it seems as if its not blending very well any ideas???
Cheers
[edited by - ronanhayes on March 26, 2003 1:20:04 PM]
[edited by - ronanhayes on March 26, 2003 1:21:07 PM]
I have 2days and Im rushing to get things in.
Um anybody have sample code of positioning a weapon in the bottom of the viewport? oR GOOD tutorials or anything.
I posted a day or two ago about how to do this. But well I've been working on other things.
Ummmmm Got the Alpha Blending Working, although when I go over Black Type Textures it seems as if its not blending very well any ideas???
Cheers
[edited by - ronanhayes on March 26, 2003 1:20:04 PM]
[edited by - ronanhayes on March 26, 2003 1:21:07 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement