Our great sponsors
-
space-shooting-game-in-c-programing-and-opengl
using c programing and opengl library i have made this 2d game space shooting game without using any game compiler
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
LearnOpenGL
Code repository of all OpenGL chapters from the book and its accompanying website https://learnopengl.com
-
OurDB-Database
This is database which is created by zeel sheladiya , mihir surati and parth dabheliya. this database is very portable , user friendly and also in this database you can make your own syntax to execute the queries. there are lot's of feature there that you can use in this database. However, the main feature is that you can connect this database with your project with the one line of code.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Here, you can go through the code :- https://github.com/zeelsheladiya/space-shooting-game-in-c-programing-and-opengl
If you want to write this kind of game I'd suggest looking into https://processing.org/ as it will let you make lots of simple experimental things like this. Or you could use PyGame, or something similar.
obsproject.com for your next time ;)
Finally last point, OpenGL. You are using what's called legacy OpenGL, also known as immediate mode. It was deprecated 15 years ago, don't waste your time on it. It's good to know how it worked, but it's a dead end. Its performance is worse than if you'd render everything on CPU. Modern OpenGL (aka. everything at OpenGL 3.0 and above) is a little bit more complicated, but at the same time much more relevant. Somewhat decent learning material would be learnopengl.com The core difference being, old OpenGL renders one primitive at a time, you are basically telling your GPU triangle by triangle how to render stuff. Modern OpenGL will instead take a Vertex Buffer Object containing all your triangles and all you have to do then is to tell it, render all this for me please. And it's done. Sure you have to write some boiler plate (Vertex Array Objects, Element Buffer Objects and shaders), but once you get the hang of it, it's not that bad.