I want to get into some game programming just for fun and to improve my C++ and software development experience.

For now I developed some Console Applications as anyone would do.

Now the question is this; do I need to know how to use WinApi or POSIX in order to develop some games?

If Yes; then how is it possible to make xplatform games?

If No; then is it the Graphics or other libraries that communicates with operating system to create GUI?


Isn't there anyone who knows about OS API programming?

Excuse my ignorance, but what is xplatform?

As far as OS game development, a lot of the OS/App integration comes from your underlying libraries such as DirectX, OpenGL, OpenAL, SDL, etc... The main bit of OS specific programming you might need is window creation, at least that's all I ever really needed. There might be more you need for profiling or memory management or other stuff, depending on the language you use.

Hope that helps.

Hey thanks;

I meant cross platform, platform independent game developing. Do we have to use OS API to create a window ? Can not Graphics libraries create window ?

For example when you use Allegro you enter the sizes of the window you want to create and it creates it for you. You do not use any OS dependent commands / system calls there.

So how does that library do that if you have to use the OS API to create a window ? Does that library uses OS API too?

When I'm creating a window with Allegro under Windows, does the Allegro's function create a handle and then call CreateWindowEx() itself under the hood?

I may not have been very clear, sorry for that.

I thought that's what you meant, but I didn't want to make any assumptions and make myself look more like a fool than I already do =)

Whatever lib you're using has to call underlying OS code because only the OS itself can really create that window, which is then manipulated by your application. The lib handles all of that for you so you don't have to code out all the platform checking yourself. If you're looking for an alternative to Allegro, check out SDL.

I would try using SDL. I use it and, it has many functions including detecting mouse and keyboard activity, multithreading, alpha blending, .ttf text, and audio. For simple but excellent tutorials on how to get it, use it and, make games with it check http://www.lazyfoo.net/SDL_tutorials/. These tutorials show you all of the important parts of SDL and many cool tricks you can do with it.