How did you guys start with DirectX?

Started by
18 comments, last by GameCreator 22 years, 12 months ago
I am a current Allegro programmer but I''ve come to the conclusion that it''s basically for beginners. I was thinking of moving on to WinAllegro for compatibility but I figured that it would be delaying the inevitable. I need DirectX. Problem is that even though I have bought what seems to be a great book and scoured the net many times for helpful articles I have had no luck understanding DirectX. I keep stopping with things like COM and API and other terms that seem to just get in the way. I do want to learn DirectX and I am aware that there are even libaries which aim at making it easier to use but I keep ending up frustrated no matter where I look. How did you guys even start? I know C. I''m starting to understand C++. What am I missing? Are there places out there that help beginners instead of handing you dozens of lines of unexplained code? Or is it something that you either know or don''t?
Advertisement
Well it does help to learn the basics (and advanced topics!) of object oriented programming, simply because (I personally find, anyways) programs are easier to conceptualize.

The book I recommend over and over is Object Oriented Programming in C++, by Waite Group Press. It''s got a lot of topics for OOP, and it''s a college-level book, so should be a good exercise for anyone below that level, or a refresher for anyone above it.

As for DirectX, I started with Windows Game Programming for Dummies, by André Lamothe. He doesn''t seem to have the best coding style (I''m a strong advocate of Hungarian notation; can''t stand reading int damned_lowercase_and_underscores code, but that''s just me. Tips of the Windows Game Programming Gurus should be a good beginner book too (same author, same coding style).

I would recommend, however, that you stick with DirectX 7 (or lower) until you''ve built some skill with DirectDraw, because learning DirectX 8 graphics is a pain in the @$$ if you also must learn a little of renderstates and how vertex formats work.

Start small, work your way up!



MatrixCubed
http://MatrixCubed.org






Pick up "Tricks of the Windows Game Programming Gurus" by Andre Lamothe.

The way I got started was by experimenting with Andre Lamothe''s code. There was a simple demo that plotted random pixels all over the screen, so I started modifying it, getting it to draw squares, or fill the screen, experimenting with how colours worked in DirectDraw, that sort of thing.

After that I went through all the tutorials in the DirectX SDK. Plus I printed out the SDK documentation and read most of it.

DirectX would probably make a lot more sense if you already knew Win32 as well. And don''t worry about COM, most likely you won''t even know you''re using it.
I started with windows game programming for dummies (Andre Lamothe). BTW you have a good tutorial on gamedev called Game
Programming Genesis that introduces you to DirectX.
Good Luck.
Red.
There is absolutely no shame in using Allegro, if it gets the job done and doesn''t slow things down. WinAllegro wraps DirectDraw and--if I''m not mistaken--presents the same interface as the other ports of Allegro. This means that you won''t be tied to Windows. Plus, Allegro is a bit easier to work with than DirectDraw and contains lots of helpful little functions.

If you''re still set on moving to DirectDraw, I tend to agree that you should try learning some Win32 programming first. Once you''ve got that, though, I''d say that you''d probably be able to manage just fine with the SDK. Books are so expensive these days...
I''m start with "Windows Game Programming for Dummies", then "Teach Yourself DirectX7 in 24 hours".
IMHO, the 1st book is a MUST have for DirectX beginners !! It has a DOS-like DX wrapper inside & just help u start coding DX !! I also got "Tricks of the Windows Game Programming Gurus" too, excellent !!! (Andre Lamothe is cool !)
I started with just SDK and many helpful articles and tutorials around the net, it took alot of many long nights to get a basic understanding, but it was well worth it. I am still learning alot, and still need too. I suggest just messing around with the demos that come with the SDK and see what you can do with it. But hey, everyone learns diferently so what ever you think is easier for you, goodluck, later-


what we do in life... echoes in eternity...
Thank you for everyones'' opinions and suggestions. The consensus seems to involve the book I mentioned above but didn''t name on purpose before: "Tricks of the Windows Game Programming Gurus." It is a great book and I love the author''s style but apperantly I need to put more time in with it.

simon_brown75, you brought to my attention something that I used to do before but don''t do now for some reason: copying and modifying code. That''s exactly how I learned BASIC and then C! I will try the same with code from Mr. LaMothe''s book/CD as well as some good tutorials I find. It doesn''t help me to just look at the code and brief comments and try to figure it all out.

A few other books were mentioned which I am interested in but can not afford right now.

Thanks again for the help. I''ll make that darn RPG one day... but until then it''s Pong and PacMan for me.
I went to Andre Lamothes web page www.xgames3d.com, and downloaded the introduction to directx. It had source code to move a pixel around the screen. With this I started writing a little tron game.

Very small to begin with.

T
I got started with Lamothe too. He must feel pretty great knowing that he teaches just about everyone how to get started with game programming!! wow!

SavageGimp

TrueKnight42 on AIM
TrueKnight42 on AIM

This topic is closed to new replies.

Advertisement