Archived

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

Direct X tutorial Migration

This topic is 5502 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

Hi I''d like to write a 2D game using Directx. My problem is that nearly every tutorial is direct toward dx7. So, sometimes the code compiles... yet doesn''t work. Sometimes the code just doesn''t compile full stop! I though I was onto a winner when I found a 7 or 8 part tute for dx 8 but that won''t work either. The program just runs and stops straight away. I am using directx 8.1 with c++. ANY help would be appreciated. I have considered buying a book on directx but considering the low probability of any tutorial working I''m not prepared to take a gamble... Thanks everyone. Mike Ribbons

Share this post


Link to post
Share on other sites
It seems like it''s not right, but check out RPG PRogramming w/ DX by Jim Adams. It has a good section on 2d/sprite based games. It''s actually a really good book all around, the only reason it really seems to be "RPG" based is because that''s the main program he builds, but you can use it for any type of game.

Share this post


Link to post
Share on other sites
You have to consider the fact that most tutorials are written by indie developers who aren''t getting paid so they''re under no obligation to ensure they release something that works. Book authors have an obligation to deliver a quality product and most of the time they do a good job.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
the article at http://www.mvps.org/directx/articles/dx8gr_1stlook.htm is a decent overview of the differences between dx7 and dx8.

also, it''s possible to have both sdks available and usable at the same time. my current setup allows me to play with tutorials/samples targeted for either version.

i''m not even sure you need both sdks? can''t you just #define DIRECT3D_VERSION as 0x0700 prior to any dx... includes?

Share this post


Link to post
Share on other sites
You''re right, Anonymous Poster. DirectX is fully backwards-compatible.

If you don''t need 3D effects at all, ignore the D3D8 stuff and just include ddraw.h and link with ddraw.lib. Those files have not changed in DX 8.0. The only thing that changed is if you are using Direct3D and want to combine it with DirectDraw. You can''t with Direct3D8 unless you #define DIRECT3D_VERSION 0x0700 to use Direct3D7.

~CGameProgrammer( );

Share this post


Link to post
Share on other sites
Whoa moderator. True I''m an indie developer, but as such, I have an image to maintain if I want to (eventually) make any cash.

See for yourself if they help you or not, and feel free to let me know if they don''t work on your machine (I only have 2-3 configurations to test on)..

Wazoo

Share this post


Link to post
Share on other sites
Well, i did something strange and actually looked at M$''s DX examples... they are good but not optimised, they gave me a good idea. If you''re a newbie like me and reading this: I''d consider it.

Share this post


Link to post
Share on other sites