Click here to Skip to main content
15,886,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I've learned some basics on WinAPI and I now want to experiment with creating some 2D simple (maybe later more complex) games. As I understand libraries like SDL,SFML,etc, are just wrappers around "native" Win32 API.

I found of lot similar questions, however they all claimed that SDL,SFML,etc are better than WinAPI because they are portable and easier to learn than WinAPI. I won't need to port my "game"(s) to other platforms now and I don't think that WinAPI is so hard, so why would I need to use SDL?

I want to know what is used for game development nowadays. I mean, I know that vastly major of games aren't created from scratch but from already existing game engine. But I don't want to use game engines, or existing code, I want to code from scratch.

As I understand, bare OpenGL doesn't exist, I'll have to still use some other library like Win32 API or others (SDL,SFML,...).

So what I'm asking is: What is usually used in game development. Is it "native way" Win32 API, or some external libraries like SDL,SFML,...? What do game engines use to render graphics?

Also, I found that some projects are still using WinAPI like Notepad++.

What I have tried:

Searched on the internet, but found nothing.
Posted
Updated 30-May-16 8:16am
Comments
Philippe Mori 30-May-16 17:49pm    
As far as I know, at Win32 API level there not much hardware graphics acceleration and usually games need to have fast graphics so they uses more appropriate engine.

At the API level, you probably have to do more housekeeping like managing pens and brushes.
Member 12555183 30-May-16 18:19pm    
I'm confused now, if Win32 API isn't hardware accelerated, how can others platforms be HW accelerated if they are just wrappers around WinAPI. For me it seems like they are using some graphics API like OpenGL or DirectX to render graphics. But does there exist something as "bare OpenGL"?. As far I have quickly read some tutorials I saw that before working with OpenGL they were initializing windows (either in WinAPI or SDL,SFML), however since initializing windows (this isn't rendering task) must be done on WinAPI, does it mean that at the bottom there is just OpenGL running alongside with WinAPI? Am I right?

Thanks.

Have a nice day :)
Sergey Alexandrovich Kryukov 30-May-16 18:38pm    
There is nothing confusing about it. It depends on what do you call Windows API. DirectX and OpenGL use hardware acceleration.
—SA
Sergey Alexandrovich Kryukov 30-May-16 18:36pm    
Even if the development technology doesn't use Windows API directly, it uses it indirectly.
Let's take one of the libraries strongly abstracted from Windows API and based on DirectX (and, hence, hardware acceleration). It still use Windows API, even though it is more loosely bound to it.
Same goes about all other technologies, as soon as UI is used: GTK+, Qt, everything.

What to use depends on specific requirements and other factors.

—SA

1 solution

I think, the answer depends on what kind of game you want to develop and what is destination platform... I'm sure that WinApi is still used in game developement (directly or indirectly).

Please, read this: Video game development - Wikipedia, the free encyclopedia[^] and this: List of game engines - Wikipedia, the free encyclopedia[^].
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 30-May-16 18:42pm    
5ed.

I would make your statements more certain though.

The formulation "directly or indirectly is good". But when you mention "indirectly", the use of Windows API is absolutely unavoidable. Even with DirectX, OpenGL, WPF, and other technologies isolated from historical old Window API at maximum, something need to create and show a window, capture and dispatch hardware-related messages, and so on...

—SA
Maciej Los 31-May-16 1:42am    
Thank you, Sergey.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900