Archived

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

bluemace

Tricks of the Windows Game Programming Gurus code and DirectX8 problems...

Recommended Posts

Short and simple. When I installed DX8 most of the samples that were on the CD stopped to function. Most of the time I can''t even compile the programs using the source code. I am beginning to think this book is really not good for learning DirectX from scratch cause I feel lost since I was using the book as a reference and now I can''t even use it as a reference to give my game functionality using a joystick. ~Robert

Share this post


Link to post
Share on other sites
Um, Yeah, Tricks is now a really sucky book to learn DirectX from thanks to the fact that Microsoft totally switched up the way DirectX is structured after version 7.0 (the book uses DX6). Since DirectDraw is no longer in existence, that''s probably why the apps don''t compile, since Tricks basically covered DirectDraw for graphics. D''oh!

However it should be noted that Tricks isn''t just a DirectX book, Andre put in some really nice and detailed Win32, AI, Physics, Optomization, etc sections that definetly deserve a spot on your reference shelf.

Share this post


Link to post
Share on other sites
yeah on second thought I guess DX would be useless if it weren''t backwards compatible right? I know it is, know that I think about it. But can the DX8 SDK compile DX6 code? Or does DX8 just run previous DX apps - like you say the apps work for you - did you compile them or just run their .exes?

Share this post


Link to post
Share on other sites
quote:
Original post by Gaiiden
But can the DX8 SDK compile DX6 code?


yes, thats the whole point of DX'' architecture.
all your doing is requesting an interface to a previous version which is what DX is designed for(i.e. COM).
evan when DX 22 is released it will still support older interfaces.

you say you installed DX8, but could you get the samples to *compile* with DX6 or 7?, i know a lot of people get linker problems with the samples which has nothing to do with what DX version your running.

-------------------------------------
"bingo-bango, sugar in the gas tank!"

Share this post


Link to post
Share on other sites
I had a problem when I updated to DX 8 and was using Andre''s code also. I was using MSVC++ 5.0 to compile. Then I downloaded some updates at the microsoft homepage and it worked fine. They total to about 90 mb for the whole update ( its in 9 parts ). If I find the link I''ll post it later.

Share this post


Link to post
Share on other sites
I am using Visual C++ 6.0 and I have service pack 5 and most of the stuff in Chapter 9 doesn''t work when I run the executables and the game that the book builds up to in Chapter 14 doesn''t even work at all! The game switches to full screen mode, then you see the hourglass icon, then I get kicked back into Windows mode again. And yes, I can''t compile the code and I''m using the latest SDK which is DirectX 8.1. This situation is a bit odd to me since I never encountered it before.

~Robert

Share this post


Link to post
Share on other sites
The reason I want this to compile is so I can try to understand how to get my prototype game to use my MS Sidewinder so I don''t have to use the keyboard. Since the code doesn''t work in Chapter 9, then I''m a bit worried about using it and I''m new to this site so I don''t know where to look for help regarding adding joypad & rumble functionality to a game.

~Robert

Share this post


Link to post
Share on other sites
I''ve had similar problems when compiling. I found that in the code somewhere there is something like #define DX_SDK_VERSION = 0x08;
or something like that. The reason the input doesn''t work is that the code thinks it should be using version 8 of the sdk. If you just put the line #define DX_Version = 0x07; or whatever the variable is at the top of your code, it should work. I can''t remember if it should be in your include files, or just in the main cpp file. Something like that will work. Either that or find an older version of the SDK.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Because DX sucks!

What a valid opinion! Why not tell us why directx sucks so badly?

I think directX sucks in a way. Microsoft keeps beefing up their API and I don''t want to throw away my books just to learn the newest API. I still believe direct x is the only way to go for making games. I''m stopping at DirectX 7 until they delete it from their libraries!!

Share this post


Link to post
Share on other sites
Today I wrote the code in TOTWGPG to initialize DirectX to a full screen, 8bit view. Well I''ve done this a million times before and it worked fine, but this time when I did it it got stuck with a black square in the top left corner of the desktop and never went to full screen mode. I guess it froze somehow, because I rewrote the code again and it worked fine. I don''t know why it happened either.

Share this post


Link to post
Share on other sites