Hello good people,
I myself am a programmer and toady I want to give you a short intro to the graphic APIs and their relationship to games.
There are a few things I want to cover like what a graphics API is, which one are available right now, and how complex it is to start programming a 3D game with such an API and which one you should use as a beginner? And at last, why not just take something like Unity .
![$shade3dforunity-ui-640x378.jpg](https://images.hive.blog/768x0/https://steemitimages.com/DQmW4FRbfaieQeudNaWZDnQygUBdNJhKrL4LHqHqNmLE7Zv/%24shade3dforunity-ui-640x378.jpg)
Image Source: here
1. What is a graphics API?
Well an API is an application programming interface. Thise interface are intended to make the life of a programmer more easy. They give you access to preprogrammed code so that you don't habe to reinvent the wheel. A graphics API this for the communication with the GPU. Such an API can support you with quite some tools. It does things like setting up the connection to the GPU, give u a 3D window, and foremost offers you the ability to manipulate points, triangles and objects with small program codes that are executed directly on the GPU. So such am API if you the ability to program on the CPU as well as on the GPU.
2 . What graphic API are available right now?
In 2017 we are basically talking about four major graphics API. There is the API for Windows, that is called DirectX and the other three APIs that are quite famous are Mantle, OpenGL and Vulkan All these APIs have some advantages and disadvantages. The question for a beginner into gaming is mainly...
3. Which API to choose for learing 3d graphics?
Well there is quite a lot of resources on all of the APIs on the web. Nevertheless accoding to the opinion of many programmers that II have met in my life, the most easiest entry into the world of 3d programming is OpenGL. The reason is quite simple.If you compare OpenGL to Vulkan or Mantle you will recognize that OpenGL is more of a high level API. So you don't get bothered to much with all the hardware and machine like code. And this is in my opinioon a major advantage for OpenGL. Nevertheless there is also a major drawback of OpenGL. At the beginning you have to learn the camera view. And in my opinion this is very confusung in OpenGL. (The camera is not moving at all). And here I see that for example DirectX is also a good entrypoint for newcomers. But...
4. How complicated is is actually to program a 3d game.
If you ask yourself how complex it would be to get into programming a small 3d game with one of the APIs that I listed above... I can tell you that this is easy. For example when I was at the age 13 I stated programming OpenGL for the first time. Back then I had no idea about vector algebra and my programming skills were quite limited to a few lines of pascal. Nevertheless I managed to program a 3d version of space invaders in a few months for a school project. How can you do that? Well people can learn by example. Just look into some example code and try to understand it. But some will think now...
5. Why not just use a ready-to-go engine like Unity or the Unreal enigne?
Well that is a good question. The modern engines are very advanced and you can build games with then easly in no time. But that is not the best way to go imao. If you have no understanding how the API works in the background you will get stucked with the game engines quite fast and you will have a hard time learing more. Therefore, I think that it is essential to, at least, learn the basics of one of the modern graphics API.
And don't hessitate. Go down the rabbit hole
Image Source: here
Go and program a game in 3d. You'll wonder how easy it is. So many people can make a homepage with html and css. And if you ask me...That is as easy as getting a first simple 3D game up and running. Ever thought of a 3D version of your favorite game? 2024? slither.io?
OpenGL ist echt nice! Hab mal in Python ein kleines Skript programmiert, das einen animierten, rotierenden Würfel als Windows-Hintergrundbild ermöglicht :D