Am new to Win32, where can I learn?

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Am new to Win32, where can I learn?

      What is the best place to learn Win32 stuff from? Do I really need to know Win32 stuff to program games? Should I switch to DirectX or some other APIs?
      "One morning I shot an elephant in my pajamas. How he got in my pajamas I'll never know." -Groucho Marx
    • RE: Am new to Win32, where can I learn?

      Really depends on the kinds of games you want to do. If you're trying to make PC games, you'll definitely need to know a bit about Win32 programming. Specifically, you'll need to know what WinMain(), how to set up a message pump using the WNDPROC callback, and how to deal with messages being sent to your window in a real-time event loop. You'll also need to understand the basics of how to create & register a window. That's about it, really.

      Take a look at the GCC source and search for WinMain to see how we set up the main game window. Take a look at our message pump and the callback function. Unless you're trying to make a native Win32 app using the old-school Win32 API, you really don't need to know the rest.

      As for DirectX, well, that depends too. What are you using now? The two major ones right now are DirectX (mostly used on PC and xbox 360) and OpenGL (used on PC, PS3, and Wii). Most decent game engines will abstract out the concept of DirectX or OpenGL and allow you to switch seamlessly between the two. If you're just learning, I'd choose one and stick with it for now. If you're already a master of one, spend some time working with the other.

      As for resources on Win32 programming, I honestly don't know any. :-/ I just end up searching forums and digging through MSDN docs since it's so rare that I have to touch Win32-specific code. I think the last time I had to deal with any Win32 code was back when we were porting RatRace from PC to PS3, so that would be 2006.