Jump to content
  • Advertisement


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


Win32 Proggraming

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

How much of the Win32 API will I have to actually learn in order to make games for it? Thanks in advance !

Share this post

Link to post
Share on other sites
To make basic games you only really need to the learn how to set up a window, and handle messages that are passed to your window. Once you can do that, you can just use DirectX for all your graphics needs (or OpenGL). So basically, once you get the window handling code out of the way, you are ready to start programming your game.


Share this post

Link to post
Share on other sites
You''ll have to know only a very little bit of the win32 api when it comes to game programming. Frankly, all you need to know is how to create a window class, display the window, and how to handle all the calls to your basic window, etc. ...the basic "window skeleton."

Wait...hold on. Are you going to write your games in DirectX, or just the win32 api. Each is a totally different story.


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 (or OpenGL) game. But if you want to make the game in Win32 only (as Martin mentioned) you''ll need to learn about GDI and perhaps even menus etc.

Share this post

Link to post
Share on other sites

It is also helpful to know about the Win32 memory management system and its file access API (Memory mapped files, reserve\commit memory...).

(Be careful with relying on virtual memory too much though as Win32''s paging system (different on each Win32 OS) may not be optimized for a game type situation).

If you plan to stream stuff from disk it is definitely better to use the Win32 API for example. You might also want to use the Win32 mem management calls as well to better control you memory management on the system. I package my memory manager up in its own class so that my code is still relatively easy to port - This also allows you to control pointer alignment easier as well(important for SIMD instructions for example).

But if this is your first time game programming on any platform forget about all this stuff. You''ll probably have other things to worry about first!

Sha-Ku-Do Industries

Share this post

Link to post
Share on other sites
Thanks for your answers

I plan on only making games with DX/OpenGL.
So now I won''t have to worry about completly learning a new API!

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!