Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

EbonySeraph

Zen of Direct3D Game Programming Question

This topic is 6174 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have this book, for the record its awesome. It is understated in the book reveiw section of this page though. If you wanna learn Direct3D you should get this book. Do know that it doesn''t cover all areas of game programming like AI, physics and what not. For that I recommend Tricks of the Game programming Gurus. But the actual point of this post is a question: The final game engine code. I know people are probably thinking linker errors right off the bat. Im not that stupid...or stupid for that matter. But I see the output error(under the VC6.0 Output Box while program runs, before it quickly exits) reports that it cannot create device, Initialization Failed, and the other errors that get triggered after it cant create device. Im just wondering if anyone else has this problem. I have an Intel 810 chipset and it probably cant use one of the options he has set for it the initialize too. I think its the format of A8R8G8B8. Also, lets assume it compiles and runs, what should his engine do? "Ogun''s Laughter Is No Joke!!!" - Ogun Kills On The Right, A Nigerian Poem.

Share this post


Link to post
Share on other sites
Advertisement
Hi,

I have this book and I know your problem.

I can''t give you the fixed code because I don''t know if I''m allowed too. But let me tell you what to do:

The Final Engine is almost the same as the one you have in the last chapter (16 if I remember right) . you can check for small changes using File Compare.

There are many mistakes in the Engine itself. To fix them you will need to check the Init process in the Example "Donuts3D" from DX8.1 SDK.

Also in the Book itself there are many strange things like: Line inherit Point ???

I found all these bugs when I tried to compile and run it in win 2000. On my win 98 the Engine was actually working ok.

Share this post


Link to post
Share on other sites
well, i''m not suprised. its a good book with bad code. I think i had the same problem u did. Try this out. load up an example. I know this won''t change much but it works, for me at least. Go into the engine and find the initdirect3ddevice(lots of parameters) function. look down where you see the structure you have to fill in, i think its d3dparameters, d3dpp or something like that. Look for the part like d3dpp.d3dBackBufferFormat. After that you should see something. Change that to d3ddm.Format. Get rid of everything else. That should work now. If it still doesn''t, you could try loading it in a diferent format such as D3DFMT_R5G6B5 or something like that.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
change A8R8G8B8 to X8R8G8B8

dankydoo

Share this post


Link to post
Share on other sites
i''ve got the book too, is there not an errata site?

btw check out engel''s book in the same series after you
get all the info out of that one

dan

Share this post


Link to post
Share on other sites
I also have this book and got some problems.
What I did was to change the device init code . The book use Swapeffect = SWAPEFFECT_COPY_VSYNC. This didnt work for me so I changed it to SWAPEFFECT_DISCARD, and also remember to change D3DFMT_X8R8G8B8 to D3DFMT_A8R8G8B8 from chapter 12.

Hope it helps a little bit

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!