Windows Programming? What the Hell!!

Started by
7 comments, last by Jimmyp4ge 21 years, 6 months ago
Look, I''ve been trying to program in c/c++ for over 5 years now.. off and on... I read the c/c++ books and everything is cool.. IF I''m doing console programming!! Maybe my ideas are jumping ahead of my ability (probably the case) or I''m impatient(also a factor) but it seems the things I wanna do require DirectX or OpenGL or some kind of pre-existing graphics engine/lib. I dive into the DirectX samples that come with the SDK... and it''s like greek! You got the hungarian notation and weird fuction calls to functions that I can barely sound out... includes out the ass and I just try to tell myself, "Self, it isn''t over your head... you can do it if you just stick to it.." But I can''t!! It seems everyone knows the routines and what to do before you can render a scene or whatever. Step after step after step just to Initialize this and that... it makes me dizzy.. I wanna get to the good stuff but I''m afraid those few sweet pieces of code are few and far between initializations, message handling, and releasing devices... Why do I have to set up everything soooo damn verbosely(is that a word?)? I wanna make a damn game damnit!! Since I was about 12 that''s all I wanted to do, and I''m 23 now. What the hell is that? I''m not a dummy but god damn there''s things you gotta do that most books just tell ya, "You gotta do it this way." But they don''t give details... only that you GOTTA do it. Gosh, enough rambling.. Should I stick with console programming and learn the game basics and graphics basics there and then move on? OR should I jump into windows programming. I''m broke and can''t afford another book, that''s why I''m posting this. ANY help would be TOTALLY awesome... TIA!!!! Bob
Advertisement
You do not need a graphics library to make a game under windows. Still you need to learn some basic windows programming. Of course when you are broke, everything you need to start up can be found on the web:
- www.winprog.org: will give you all the basics of windows programming without any external libraries (best tutorial I have ever seen on windows basic functionnalities).

Most games draw on a memory OffScreen then blit it on the screen, so to make a game while using almost everything you learnt for console game, just look at:
- CreateDibSection (Microsoft web reference)
- DisplayDib functions family (Microsoft web reference)
- Switching resolution without using DirectX (GameDev article): be aware that some resolutions are not directly accessible depending on the version of windows: windows 95/98 does not detect the 320x200 displays while windows NT does.
- Windows skinning article (on flipcode)
Things you won''t be able to use in win32 programming are interrupts (they are available but it needs a greater understanding of your OS) like VSync or mode 13 switching.

When you are through learning that, you may want to look at 3D after your first game. The best site to start with and easy to use is of course NeHe''s web site for OpenGl (or its brother NeXe for DirectX).

Now the choice between console programming and windows programming is up to you. Just know that with a few modifications, your console code can run on a window using linear programming.

Hope that helps.
Ghostly yours,
Red.
Ghostly yours,Red.
.. or you can try SDL ( www.libsdl.org ), no nonsense 100 line init code, very simple and easy to use. best of all, it''s console programming! .. i believe cone3d.gamedev.net has some nice tutorials for SDL and or using OpenGL within it (as SDL is just for 2d).
It may be a good idea if you get/write a minimal skeleton app and then try out different funcs,etc. (found in the docs) and just play with them.. thats what i did, when i stared learning directx.. it may take a little longer, but you learn a lot, much better then reading a book, .. and not to forget the satisfaction when you make something on your own . dive into the examples and books when you got some solid knowledge how it works, it''s also easier then to understand why "You gotta do it this way", and if you realy gotta - as some tend to overly complicate things.
.. well, hope this helps a little
buy a good windows programming book ( i would say "Windows programming with C++")

then just think of windows programming as console programming, but with a twist...it''s just got a while loop in there after all the init stuff.

then all you have to do is process messages, which is just a switch-case loop. it''s that easy.
Programmers of the world, UNTIE!
well i know "Windows Game Programming for Dummies" has a good intro to Windows Programming (it''s the first 5 chapters; when you get the money up, you should get it). have you tried www.gametutorials.com? they tend to have good tutorials on those things.

i''m 23 too so i know what exactly what you are talking about. funny i understood the windows stuff though. well how to get the basics working together. now how they work EXACTLY i couldn''t tell ya.

anyway good luck on your endeavor!

Beginner in Game Development?  Read here. And read here.

 

I would suggest checking out the Windows tutorials on winprog.org and then start up game programming with SDL. If you move on to 3D you could start out with glut, which basically takes care of most of the Windows stuff. You could also work with an engine to get you started. Some that look good are Ogre (ogre.sourceforge.net) and Genesis3D (www.genesis3d.com). These are pretty well documented.

Hope that gets you started

Mark

p.s. as a guitar player, Jimmy Page is my hero
gametutorials.com
Thanks everyone, for your input... I will take everything into consideration...

Bob

p.s. Jimmy Page is not just my Hero, he''s my god and savior!!! ouch.. goin too far? Not really, considering EVERY version of Since I''ve been loving you and the Heartbreaker solo!!

If you want to do games programming concentrating all your efforts on the programming language was a mistake. Although you can make a clean switch to DirectX and the C++ you know will be extremly helpful (If you know most aspects of C++).

And as for windows programming, this initialisation is quite difficult but after that it''s pretty simple. You should keep a copy of the initialisation handy because you can use it over and over again. I suggest you create the initialisation yourself and not copy the text. Learning the info is far more benifical.

This topic is closed to new replies.

Advertisement