Jump to content
  • Advertisement
Sign in to follow this  
street programmer

do i need windows programming.

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

I just finished learning cplusplus and oop programming and am planning on starting directx programming, but before that i had a few questions in mind: 1)do i need to know win32 programming (windows programming) to start directx programming? 2)If yes, does anyone know of some good books or tutorials to get into windows programming. I hope someone could give me a good and useful response, thank you. Ps: sorry about the (cplusplus) sign but my plus sign doesnt seem to work.

Share this post


Link to post
Share on other sites
Advertisement
You should probably learn the basics of windows programming - how to register a window class and instance it, how to set up a message loop, what kinds of things go into a message procedure. For tutorials and such, check out the links above titled "articles", "books", "for beginners" and so forth.

Share this post


Link to post
Share on other sites
Quote:
Original post by street programmer
1)do i need to know win32 programming (windows programming) to start directx programming?

You need to be familiar with Component Object Model (COM) programming, which is a construct created by Windows that exemplifies OOP. It is a standard that specifies how a group of objects can interact. Languages like C++ and JAVA naturally fit with this type of design well since it's basically just a set of rules that are based off a subset of object-orientated principles, ie., encapsulation and interfaces. DirectX is implemented as a COM API, so understanding COM is a natural first step to understanding DirectX (NOTE: The COM is merely how you interact with DirectX, and has little to do with how you use it, although such an understanding, IMO, does nothing but help you).

Do you need to know Win32 programming? In part, if only because COM is a Microsoft technology - although it's really platform independent - and as LessBread said, to know how to set up basic windows, get rendering contexts, etc., if you're programming for Windows. An alternative would be to use SDL, which is also platform independent and handles much of that "boilerplate" code for you. More information can be found at http://www.libsdl.org/index.php.

As for tutorials, I'm sure if you do a forum search here on GameDev you'll come up with a few help resources. As far as "expanding your horizons" I would personally recommend a few months worth of Windows programming studies, simply because it will allows you to be more versed in more programming systems and styles. If you just want to make games wth DirectX, look over COM design until you can grasp the essentials of how COM objects communicate with each other, grab a DirectX book and dive in.

Quote:
Ps: sorry about the (cplusplus) sign but my plus sign doesnt seem to work.

If you're referring to the preview mode trashing your + signs, it's a known bug and does not affect your post. Good luck and feel free to ask any questions you have about COM programming and DirectX and I'll be glad to assist you.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
In my opinion its up to you how much you learn. My knowledge of the Win32 API is not at all good, i just made sure i understood all of the code that goes into registering and setting up a window, and then entering the message loop.

A more extensive knowledge definitely wouldnt hurt, but for me personally i doubt it would be too valuable. Id rather spend my time working on other things and other APIs :)

Good luck in whatever you choose to do :]

Share this post


Link to post
Share on other sites
I only know enough WIN32 API to set up a window for OpenGL and Keyboard input. I ditched the Keyboard input and am now using DirectInput for speed reasons. That's all the windows stuff that I know. I had a headstart into OpenGL programming, but when I try to make a level editor, I'll be behind so I'll have to learn it anyway. It's a matter of now or later, at least if I want to advance far into game programming.

Share this post


Link to post
Share on other sites
Don't go crazy learning the Win32 API, you'll just hate yourself afterwards. Learn enough to get a window up since you'll need that, but don't worry about actually being able to develop useful programs using it.

The Win32 API is ugly and a real pain to use. If you're going to be developing a program that uses nothing but the native windows GUI, you're better off doing it with a language like C# or VB. In C++, my advice would be to limit your Win32 education to just enough to get by. For game development you'll probably never need anything else. For non-game development you probably won't be doing much UI work in C++ anyway.

If you do decide that you want to use C++ for regular windows apps, MFC or managed C++ is the way to go.

Share this post


Link to post
Share on other sites
Quote:
Original post by Paradoxish
If you do decide that you want to use C++ for regular windows apps, MFC or managed C++ is the way to go.


Or take a look at Trolltechs QT. QT Designer really speeds up development of GUI applications and i really like the API.

For most tools though, your probably best just using C#. If you dont know it, then try and use it anyway, it doesnt take much learning ;)

Share this post


Link to post
Share on other sites
I was wondering if Charles Petzold's book Programming Windows is still useful. The latest edition came out in 1998 so I'm not sure if is still relevant to Win2000 and XP, or if there are other, more modern books out there? Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!