Jump to content
  • Advertisement


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


From learning Java to directx...

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

Having been taught Java in college and having a very strong grip on programming principles, I decided to learn C++ myself, with a view to proceeding onto game programming. After learning the C++ syntax etc, DirectX seems a good start so I figured just find good tutorials on what the syntax is like, and I can figure out the rest. Unfortunately, things didn''t go as planned (fairly obvious, I know). When I started digging around in DirectX I realised there was more I needed to learn before I could start in on this. However, I don''t even know where to start looking. What do I need to know in order to start learning directX? It seems to me that I just need some Windows programming, but I might be missing something important. Can anyone out there point me in the right direction? I''d really appreciate it. Thanks, keith

Share this post

Link to post
Share on other sites
You need a little knowledge on how to create and manage a window. Here are some of the functions you''ll need:

CreateWindow() or CreateWindowEx()
WindowProcedure() // Defined by you

Some window messages that are good to know:


Much more than that you don''t need to know about the Win32 API to create a DirectX application. Then you need to know how to create the DirectX components, but if you skip the enumeration at the start it isn''t that hard to get something working. To create a Direct3D application you can take a shortcut through D3DXInitialize() and D3DXCreateContext().

Unfortunately there aren''t that many tutorials on DirectX so your best bet is to look at the samples in the SDK to learn how to.

Share this post

Link to post
Share on other sites
Java is not that different from C++, except you have to deal with pointers in directx. Start reading the direct draw docs in the sdk, all of them, then do the ddraw tutorials. Then start making a simple 2d game. Don''t worry about the overlays or other advanced stuff, just concentrate on making bitmaps for your animations and take a look at Blt() and BltFast() functions, they''re essential to your game. Also, you can use ddutil.cpp code written by MS for ddraw to help loading of bitmaps and setting of color keys. The best thing is to make bitmaps yourself because there are copyright restrictions on many bitmaps floating around the web or those inside applications. Check out company called ONEMILE for decent graphics, I''m using Corel Draw 3.0 for some of my graphics and ONEMILE is very cool about letting you include/alter their art into your game. Of course the best is to hire artists and musicians in the first place but most people do this as a hobby with hopes someday to make money off of their cool game. Good luck!


Share this post

Link to post
Share on other sites

You could try all that stuff, but I get the feeling you already have.

I highly recommend(if you don''t mind shelling out the money) one of Andre LaMothe''s Books: Windows Game Programming for Dummies or (preferably)Tricks of the Windows Game Programming Gurus. Either one of these books will get you going in no time.


Share this post

Link to post
Share on other sites
Thanks guys, I figured it was just the Windows stuff I was missing, but I wasn''t sure. I guessed the DirectX sample SDK was a good place to start, but when you don''t know what a HWND or a HRESULT is it''s kind of hard to make any headway!

Kaellaar, I think I''ll invest in Tricks of the Windows Game Programming Gurus, I was considering it but I wasn''t sure if it would help me at this stage.


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!