2D Game Programming in C++ and OpenGL
Learnings from making a 2D game from scratch in C++ (mainly c) and OpenGL
I have wanted to go through the process of making a game, not just that but making one in C++ without an engine. This does not mean that I am making an engine myself, but rather, I am writing the code to run the game. It just happens to be written in C++ and OpenGL. The goal is to roll my own “almost everything”. I will be using a few existing libraries, mostly because they are very lightweight and super useful, and they make my life easy.
This is primarily a pursuit of my interests, an exercise of learning and a test of my own abilities and limits.
The game I shall be making is a simple 2D plaformer, the primary goal I have in mind is to have the programming aspect of this game be strong, through this process I intend to build my own set of libraries for rendering, ai, audio and general game programming stuff. The progression for this game will be to first do the simplest (not very efficient thing) and then learn how to do them efficiently. Eventually I may strongly understand the application of these concepts and ideas in the game and land on a sane set of abstractions (code files and functions) that can be re-used when I make other games.
As for what I shall be writing about from that. I believe that existing material on these items is already far better than what I could detail, except in a few cases where the existing knowledge is fairly fragmented and I had to spend a bunch of hours to learn some painful lessons. I will mainly be highlighting how I went about the game, eg. from getting my first triangle on the screen to, a basic quad (rectangle) renderer to an efficient quad renderer.
Table of Contents
Vectorizing my math library
Efficient text rendering
Improving the text renderer to batch properly
Basic game objects
2D collision detection
physics calculations

