Sign in to follow this  

Win32 programming

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

Hey Everyone, I know quite a bit of C++ and have made a few shell programs but I want to get into graphics. I was thinking of starting with Win32 because I hear you can, at first, make simple 2D games but then you can move up to D3D or OGL later. Is this a good path to take? Are there any good online tutorials for making a window and 2D graphics in Win32?

Share this post


Link to post
Share on other sites
Try SDL. Its really easy to use and will generally give you a good feel for the 2D graphics stuff before moving on. I personally use it and love it.

The website is www.libsdl.org and there are tutorials over at cone3d.gamedev.net if your interested.

good luck, btw.

c

edit: i looked at both when i started, and SDL is a much easier learning curve, but if you are looking into doing DirectX, then go with the Win32 API. OpenGL can be rendered with SDL, so if you want to do OpenGL, do SDL.

Share this post


Link to post
Share on other sites
In my oppinion, Win32 is not something that can be easily comprehended by reading an online tutorial unless you already have alot of experience in learning API's etc. My recommendation, if you're serious about Win32, is that you pick up a copy of "Programming Windows 5th Edition" by Charles Petzold. It's expensive, but well worth it if you want to learn the Win API.

As for making games in Win32, I have done so myself. I coded up a 2d chess game using C++ as the sole language. For graphics I used bitmaps that I drew previously in photoshop/flash. However, you're not restricted to just using pre-made bitmaps. So yea, making 2d games in pure Win32 is feasible.

Anyway, thats my 2 cents.

Share this post


Link to post
Share on other sites
Personally, I moved right into DirectX, because I'm never really going to use the Windows GDI anyways. But I guess you can make an overly simple game just to familiarize yourself with the structure of a game. Perhaps some game made entirely out of rectanges? Those are pretty easy, I believe. Just make sure you form good habits from the start [wink].

Share this post


Link to post
Share on other sites
GDI is ok for basic 2D graphics. just gets more difficult when you need the graphics to be fast. i posted a simple Win32/GDI game with source here, for those who are interested.

SDL and Allegro are great, but i'd recommend learning Win32 anyways. seems like it has helped me in the long run a lot more.

Share this post


Link to post
Share on other sites
i don't really see why everyone want to go 2D>3D i mean just go for DX from the start sure there is some common knownledge beetween both but learning it 1 way or the other won't be harder & instead of lot of gdi junk u'll have learned lot of usefull stuff (it's not like D3D is a superset of gdi & learning the later will help with the 1st it only mean u'll have to learn both instead of just one if u go 2D 1st)

Share this post


Link to post
Share on other sites
Quote:
Original post by ranakor
i don't really see why everyone want to go 2D>3D i mean just go for DX from the start sure there is some common knownledge beetween both but learning it 1 way or the other won't be harder & instead of lot of gdi junk u'll have learned lot of usefull stuff (it's not like D3D is a superset of gdi & learning the later will help with the 1st it only mean u'll have to learn both instead of just one if u go 2D 1st)


IMO you are wrong here. aside from GDI elements used by DirectX (like fonts), it is better for beginners to start in 2D. after all 3D games evolved from 2D and 2D still teaches basic game development skills that make you a much better 3D programmer. the same concept as beginners starting with consoles intead of GUIs. yes, they will not use cout in the end, but it allows you to focus on other areas aside from interface.

i would rather say teaching DirectDraw over GDI, but i would still say GDI is much easier to learn and a usefull skill in all windows based applications.

just my two cents.

Share this post


Link to post
Share on other sites
I have found a good book to take you through the basic windows programming from a game programmers point of view and to get the start of a good 2D game is published by SAMS, written by Andre LaMothe, Tricks of the Windows Game Programming Gurus, ISBN: 0-672-31361-8. I read a lot of other books and read a lot of other online garbage, I knew a lot about programming win32 appz and such but this book was still applicable. I hope you can get a hold of a copy its a great read.

Share this post


Link to post
Share on other sites
To be honest, I think learning 3D stuff in DirectX is easier than using the Win32 GDI for 2D graphics. So I'd recommend learning Direct3D. Besides, you can use their sprite interface or D3DFVF_XYZRHW vertices for 2D graphics anyways (which is exactly what I did, and then plunged into 3D).

Share this post


Link to post
Share on other sites

This topic is 4838 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this