I gave been programming in C for a few months and I want learn how to program games. I was wondering what is the best API is for 2d game programming. Is Win32 a good api to start with?
I gave been programming in C for a few months and I want learn how to program games. I was wondering what is the best API is for 2d game programming. Is Win32 a good api to start with?
There is no real "best." WinAPI can do what you'll want, but it might be too unwieldy for you. The function calls and stuff all have ugly names with a ton of hungarian notation and...well... it's kinda yucky. Some people like it more than others.
If you're looking for something simple, but that won't really "take" you anywhere towards a career, look into SDL (Simple Directmedia Layer) and/or Allegro. Just do a board search or search on Google. Those are two easy graphics APIs that work well for 2D stuff.
Away.
If you choose to learn allegro look at this thread http://cboard.cprogramming.com/showt...threadid=41848
well how about OpenGL
Wouldn't that be too difficult for just a 2d game when something like allegro is available?Originally posted by vasanth
well how about OpenGL
I would recommend using DirectX 7 for 2D stuff. I have not used anything else, so im not an expert, but I programmed in C+ for only a few months, and then jumped into DirectX 7. It was a little hard at first, but I found if I stuck with it and continued reading even if I didn't understand everything it slowly made sense. The book I first read was Windows Gaming for Dummies, and then Tricks Of The Windows Game Programming Guru's. They are both similar, just the later explains the same stuff in greater depth.
"The distinction between past, present and future is only an illussion, even if a stunning one."
-Albert Einstein
I couldn't get allegro to work so I got SDL (www.libsdl.org) and it seems simple enough, I also just downloaded ZEngine I heard that it's good. I haven't actually tried it myself, though. I do C++ so I don't know if SDL will work with C for sure but I think it does.
"I have read about a hill in a book, so the hill must exist." -a Christian quote
"I have not seen this hill, so it must not exist." -an Athiest quote
"Well, I've heard of this hill, so lets bomb it." -a George Bush quote
I'll think I might learn Win32 first and then DirectX7 and if it's to hard I try SDL. I was thinking of getting the book Programming Windows and then get Tricks of the windows game programming gurus. What kind of math is needed to program in 2d? and in 3d? .
ZEngine is awsome! Blows SDL and Allegro away (ZEngine uses SDL and OpenGL)Originally posted by Ace Bowers
I couldn't get allegro to work so I got SDL (www.libsdl.org) and it seems simple enough, I also just downloaded ZEngine I heard that it's good. I haven't actually tried it myself, though.
There is not much math involved in 2D graphics with DirectX 7. If you can do basic grade 11 math, you should be fine. Don't think it is too hard to learn, because if I can do it i'm sure anyone can. It usually takes me three or four reads of a chapter, and then some for it to sink in, so I think you'll be okay.
"The distinction between past, present and future is only an illussion, even if a stunning one."
-Albert Einstein
or save time and go here:Originally posted by o0obruceleeo0o
If you choose to learn allegro look at this thread http://cboard.cprogramming.com/showt...threadid=41848
http://cboard.cprogramming.com/showt...threadid=33318
Speaking of which, I just got it downloaded (as you know) but there are no tutorials on their site, actually their tut's are down, do any of you know where I could find some good tut's and/or docs for ZEngine? Thanks.ZEngine is awsome! Blows SDL and Allegro away (ZEngine uses SDL and OpenGL)
P.S. I think a lot of you guys are across the waters, or at least some, because someone told me that not many post in the middle of the night but I posted it in the middle of the day.
"I have read about a hill in a book, so the hill must exist." -a Christian quote
"I have not seen this hill, so it must not exist." -an Athiest quote
"Well, I've heard of this hill, so lets bomb it." -a George Bush quote
I have quite a few, but the very best books I have are:
"Tricks Of The Windows Game Programming Guru's", by Andre Lamothe, "Windows Game Programming for Dummies" also by Andre LaMothe and a very good beginner book for learning C++, "C++ A Beginners Guide", by Herbert Schildt. Also I have quite a few books from Premier Press, "Game Development Series". Each of these books in the series is an excellent source for learning game development. Some are more useful than others. The very best from the series that I have are "Data Structures for Game Programmers", by Ron Penton, and "Isometric Game Programming with DirectX 7.0", by Ernest Pazera. These books are very expensive, but tought me a lot and are well worth the money. If the books can teach me, they can teach anyone - trust me.
"The distinction between past, present and future is only an illussion, even if a stunning one."
-Albert Einstein
Wow, that's exactly what I did BTW, I think you mean DirectDraw7, since DirectX includes sound, music, networking, videos, 3d, etc (?). Heh, just a technicality in the nameI'll think I might learn Win32 first and then DirectX7
Windows GDI (the Win32 graphics you were talking about) is pretty easy to use and include in your program, since everything in a Windows application is sort of built to include it, and it also comes in VERY handy when using DirectDraw7. It just might be confusing to learn it Possibly, you could try the other graphics libraries and come back to learn it later once you've got your game/graphics concepts down pat.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.