Archived

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

progrmr

Beginning direct3d game programming book - ugh

Recommended Posts

OK, I am new to game programming although I have several years of business programming experience. I wanted to start at the beginning so I bought the book "Beginning direct3d programming". Now, I'm using the .NET programming environment which still allows you to create unmanaged C++ code so I setup my include directories and lib directories and install the DirectX 8 SDK from the CD. The book tells me to build the code in the chapter4 directory for the book - well this is error #1 because when I go to install the source code their is no chapter 4 source code, it starts at chapter 5. No biggie, I extract the chapter 5 source code and setup the project. Build error right off the bat - cannot find include file D3DApp.h. I search my C: drive and sure enough the file is nowhere to be found. I investigate the other include files in the source code - D3DFont.h, D3DUtil.h, and DXUtil.h. None of which was found on my system anywhere. I'm not going to let this deter me! I LOVE games and gaming and I have talent as a programmer. But can anyone tell me why I might be missing these files, and where I might get them? I did NOT install the directx 8 runtime when I installed the SDK because I already have DX9 on my PC and I think it would be bad to overwrite the newer version with the older one. But I wouldn't think that the .h files would be used by the runtime anyways. Help from some game gurus? Thanks for any bone you can throw me! ------------------------ Don't follow me - I'm lost! [edited by - progrmr on May 6, 2003 2:39:46 PM] [edited by - progrmr on May 6, 2003 3:06:09 PM]

Share this post


Link to post
Share on other sites
I tried downloading the DirectX 9 SDK for C/C++, but the files are not included in that package either.

Am I the only one that purchased this book? The publishers (prima-tech) are out of business or something, at least their website isn''t up and running. I can''t seem to find any book support anywhere.

Any ideas?

------------------------
Don''''t follow me - I''''m lost!

Share this post


Link to post
Share on other sites
Did you try searching the CD?.. nevermind that, they're part of the SDK.
I found the files on my system in the SDK samples directory
C:\mssdk\samples\Multimedia\Common\include on my system

[edited by - cozmo on May 6, 2003 3:24:08 PM]

Share this post


Link to post
Share on other sites
I just found it in the C:\DXSDK\Samples\C++\Common\Include for the DX9 SDK installation - but I didn''t find it in the DX8 SDK. In fact the directory you mention doesn''t exist on my PC either. Maybe there is an outdated SDK on the CD or something.

Eh, no matter - now I have the 102 error(s), 2 warning(s) which I saw in another post and I''m off to try and fix that.

Thanks alot for the reply tho

------------------------
Don''''t follow me - I''''m lost!

Share this post


Link to post
Share on other sites
Well i did a little googling for you and found this site... http://www.premierpressbooks.com/ Prima Tech is now known as Premier Press. Now as far as your problems go, I dont know what is wrong... what i do know is that many of these books have errors in them (Some have LOTS). Check the website i gave above to see if you can find any error corrections. If all ease fails, try follow through the chapter and write the example program yourself.

[edited by - IllMind on May 6, 2003 3:40:00 PM]

Share this post


Link to post
Share on other sites
First of all congratulations to buying probably the worst book for a DirectX beginner ! I`m not joking, I have this book at home and bought it as my very first gamedev book too. While there is some pretty decent information at the end of this book, almost no code from the book worked for me even though I managed to compile it. Mostly it crashed or didn`t run at all. With the help of these forums I managed to run few chapter programs - probably the best one is multitexturing cube - you`ll use it all the time later.

quote:
I search my C: drive and sure enough the file is nowhere to be found. I investigate the other include files in the source code - D3DFont.h, D3DUtil.h, and DXUtil.h. None of which was found on my system anywhere.

Search for SDK directory on your hard drive. Those files that you need are on the cd here F:\DirectX\DXF\samples\multimedia\common\include\ and here F:\DirectX\DXF\samples\multimedia\common\src
These two directories (among others) shall have to be added to your Visual C++ paths - but they need to be on hard drive naturally.

quote:
I did NOT install the directx 8 runtime when I installed the SDK
Hmm, did you install at least the debug version ? That shall help you in finding obscure bugs effeciently.

quote:
But I wouldn't think that the .h files would be used by the runtime anyways.
They will be used by you !


And I`m really not sure about DirectX9 and DX8.0 SDK on same windows partition. You may have to decide what you really want, although I`m not an expert on this. But the best bet would be to have just DX8.0 installed for DX development and forget for DX9 in the meantime.

So reinstall it all, alter the paths, and it should compile. If not, let us know.

EDIT:
quote:
The publishers (prima-tech) are out of business or something, at least their website isn't up and running. I can't seem to find any book support anywhere.
http://www.premierpressbooks.com/catalog/titlelist.cfm?category=Game%20Development
http://www.premierpressbooks.com/catalog/product.cfm?category=Game%20Development&isbn=0761531912

Avenger game


[edited by - VladR on May 6, 2003 3:44:02 PM]

Share this post


Link to post
Share on other sites
OH GREAT! The worst book - haha, that sounds like my luck!

Thanks for all the information. I''m going to check out that CD and copy the directories if I can find em.

And thanks for the links to the current website! I hope to find much ''errata'' there



------------------------
Don''''t follow me - I''''m lost!

Share this post


Link to post
Share on other sites
YES! I found the directory on the CD and just copied it into place, then adjusted my include path and recompiled. Everything compiled and linked just fine.

Thanks VladR!

------------------------
Don''t follow me - I''m lost!

[edited by - progrmr on May 6, 2003 3:52:10 PM]

Share this post


Link to post
Share on other sites
quote:
I hope to find much ''errata'' there
Well, it`s not that much in errors in book (although there are some but it`s sort of natural in any undertaking like writing such a book. The problem is that the "book language" is hard to understand. He jumps from one issue into another and the best way how to understand some stuff is actually write it down somewhere else everytime he says something about some problem or just highlight it with color pencil so that you just skip pages of not relevant stuff. The one example that comes to my mind is Vertex/Index Buffers. They can be easily explained on one pages but his explanation simply sucks. Even when I understood the toic already (from another book of course), I had troubles understanding it from this book. Also English isn`t writer`s mother language and if you know German (a lillte bit is enough) you can clearly see sentences and grammar to be German with English words.

There are some fine examples like the one with Rotating Multitextured cube - I refer to this one all the time when i want to accomplish some multitexture effect. Also stuff about collision detection and such is pretty easily and well explained. But as for actual DirectX programming, oh well...

VladR
Avenger game

Share this post


Link to post
Share on other sites
As a relatively new programmer in dx myself, i strongly reccomend you go get your hands on Focus On 2D in Direct3D by Pazera...

i had bought like 2 or 3 d3d dx books which totally blew me away... reading Pazera''s book really cracked things open for me, on the basics of what was going on.

Once that happened, those other books started making sense...

also-- i tried to do some C# stuff with directx, but the documentation just wasn''t there! are you making any headway with managed c++? I just said heck with it, and created an MFC c++ app. Getting d3d to work in MFC was a ''challenge'' but coming from java, MFC made the most sense to me. (scary thought)

Share this post


Link to post
Share on other sites
See, I was going to get that book (Focus On 2D in Direct3D) but the back of the book says "if you want to take your 2D skills into 3D...) and I was like "well, I don''t have any skills at all!" and put it down!

Even though I got the first code example in my book to compile, it doesn''t work - I get the window poped up but there are no lines drawn between the defined vertices. I''ve stepped through the code and goes through everything w/o erroring out. Spent $42 on this book AAAAAARRRRRRRGGGGGGHHHHH. Could be this crappy video card in my workstation here at work so I''m going to try the example at home. I am able to follow the first 50 or so pages but he is starting to ramble and referencing things that don''t have anything to do w/ the current example. Eh, live and learn - hopefully another beginner will learn from this thread!

And I guess I''ll have to invest more $$$ with the Focus On 2D in Direct3D book; sounds like it might be just right and it''s only like $25. Thanks for the heads up on it!

------------------------
Don''''t follow me - I''''m lost!

Share this post


Link to post
Share on other sites
NP

and once you get your head wrapped around the basics and get ready to start writing stuff... the next book i''d rec. (as i''ve appeared to have bought just about every one that came out) is called something along the lines of "Writing a Roleplaying game in DirectX" from the same publisher (prima tech)

the name threw me off at first, as i wasn''t looking to make an RPG, but it turned out to be one of my best reference books. It has so much stuff that a beginner can use in other types of games, including a pre-natal directplay module, that it''s been really useful to me.

it contained the base code of the particle system i use, as well as helped me compute a viewing frustrum. (a "what" you say?) two months ago, i''d never heard of a viewing frustrum, but it easily doubled the speed of my program. (long of the short - it lets you tell the computer to only draw stuff that can be seen, rather than every object out there)

good luck!

Share this post


Link to post
Share on other sites