advice about c++/directx/win32

So I'm interested in game programming and I need some guidance.

From what I've learned after you have a basic understanding of c++, to make an actual program, you need to understand win32 and directx (at least for games with graphics).

So how does C++ interact with win32 and directx regarding game programming? Every tutorial I see about directx is about how to model graphics. Is it kind of like flash in the sense that after you make an object, you write the logic into the program for how to handle that model which you run from the window you created from win32?

I haven't seen any sources that go from learning c++ to win32 to directx and how they all come together and I'd like some clarification before I start purchasing books about a bunch of fragments and try to put them together myself.

If somebody could tell me what I'm trying to focus on for each of those topics, that would be helpful as well, ie . . .

c++: knowing loops, containers, statements, pointers, references, classes.

win32: knowing how to make a window and . . . . :(?

directx: knowing how to model a graphic and . . . :(?

I hope I communicated the gist of my question. Thanks for any input in advance.
Last edited on
OpenGL is another alternative to DirectX. It accomplishes essentially the same thing.

Check out SFML. They have a graphics package and tutorial. It provides a higher-level interface for dealing with the Win32 and OpenGL. It's very useful for beginners to grasp what they are doing. When you get more comfortable, download the source code for SFML and tear apart the stuff you use the most. That'll give you a good idea of what to do.
Thanks very much, I'll check into that.
Funny, I'm actually thinking about exactly the same things. I've been fooling around with C++ for a while, but Win32 seems very deep and involved, and it really doesn't seem all that practical if you want to end up doing games, which I am also interested in.

It really is kind of confusing, how everything fits together, if you don't have time to be thinking about it constantly, and especially if you're trying to teach yourself.
Well, I actually did look into SFML at http://www.sfml-dev.org/tutorials/ and it's really cool and clear (except for an issue about missing dll's which I found on their forum http://www.sfml-dev.org/forum/viewtopic.php?p=45882#45882).

I had zero idea's regarding how libraries worked before messing around with it as well.

It took me 2+ hours to figure out how to connect SFML to visual c++ and get through the "opening a window" and "handling events" tutorials and link up all the libraries, and static libraries, and then reflect upon how foreign and baffling it is to connect all the files in the two programs)

I tried it with version 10 first, then went to version 8 since I kept getting an error, which in retrospect was probably my fault but now that it works I'm not going back ><. That ate up a huge chunk of it.

So I know programmer's talk of "steep learning curves." So how much does somebody need to know before everything starts clicking into place?
It took me 2 days to get SFML installed properly. Once I had that, it took about an hour per tutorial. After that everything seemed to click for me and I was able to do quite a bit quickly.
Win32 is...well, it's the base API for working in windows. You don't have to do a lot to get a base application for DirectX going and it really is not a performance issue to build a small framework to handle repetitious application startup.

If you can swing the cost, "Introduction to 3D Game Programming with DirectX10" or the one for DirectX11 (even the one for DirectX 9 will give you a basis) by Frank Luna is a good book for learning DirectX w/o all the windows API getting in the way.
Win32 is a horrible abomination that should be avoided in any situation in which it CAN be avoided. That's my take on it anyways. OpenGL is NOT an alternative to DirectX - it's an alternative to Direct3D.

I personally am STILL working on figuring out OpenGL (uh, though that's mostly my own fault, OpenGL itself is pretty intuitive once you got the hang of it, especially if you abandon the fixed function pipeline altogether), SFML is rather easy to use though. Though I don't know about windows, manually compiling libraries seems to be a major chore there.

Anyways: If you want to get into game programming (relatively) quickly, I strongly advise against using low level libs like the WinAPI or DirectX directly. Under windows you could use XNA instead, or well SFML for a platform independent solution. Or Allegro5.x . Or ANYTHING that doesn't keep you busy with small details that you aren't likely to care about at this stage anyways really.
Topic archived. No new replies allowed.