Originally Posted by lingon
Well, I used to know quiet a bit of C++ but then all of a sudden two years ago I just stopped programming and now I am beginning to pick it all up again,
Was the C++ you learnt two years ago modern C++? STL, iterators, auto pointers, templates, are you familiar with them? Consider picking up a modern C++ book if you aren't.
thats why I thought a game would be a good thing to do because a game usually contains many parts of programming. I have done some Win32 API hooking with quiet poor results. I was thinking of a 2D windows game but maybe console is the way to go.
You could make a game for practice. If you're only practicing C++, I suggest you do something first in console, so you avoid both GUI programming and graphics. After you dust off your C++ knowledge, then you can move ahead.
How do you make GUIs? An external library like DirectX or so?
So you are using Windows right? There's a few options available to you. The most direct way is to use the Win32API. Well, in general you should download the Windows SDK and look through the API. It's effectively your way of manipulating the OS through C++. It also allows you to make windows and GUIs.
You could also learn something that sits on top of win32API. MFC and WTL (unofficial Microsoft contribution) allow you to make GUIs faster and easier, although I never got into them.
There are some open source toolkits that allow you to make GUIs. GTK, QT, wxWindows, and FLTK are possible choices. GTK and QT are well known. They are cross platform, used primarily in linux.
Each choice has its pros and cons. I recommend you understand how making win32API guis works, at a basic level. The reason is, you'll understand the message/event based programming that's a staple of GUI programming.
Finally, you might have to learn graphics. If you need complex 2D graphics, there's three choices available to you on windows. Windows GDI+ is the most basic. You most likely want to go the DirectX or OpenGL route, though. DirectX is actually a whole set of APIs for graphics, input, and sound.
DirectX reflects COM programming in C/C++. It can be very confusing at first, unless you are familiar with COM. OpenGL is graphics only, so you usually combine it with some other libraries for game programming. Don't ask openGL vs DirectX here. It's one of those questions that gets debated endlessly and your best hope is to get the facts through google.
I am looking into using a library called SDL. Do you guys know if its any good?
SDL is a cross platform layer over audio, graphics, input, etc. It's pretty popular. The thing is, it's just a layer that allows you access to the different hardware devices. You still need to know what to do with them. For example, SDL works with OpenGL to give you access to the video card. But you still need to know OpenGL. |