This article shows you how to make your own custom font for your game. I’m going to assume that you don’t have a library that already does this (like Allegro) or your library does it very poorly (like Allegro.) This isn’t about making your own TTFs or anything like that. You’ll be designing a custom-made font as a single image (specifically a PNG done in Paint.NET or your favourite paint program) and then printing strings in OpenGL by using your font like any other tile map.
-=Expand Article=-
fonts, kerning, leading, opengl, tiles
Code Snippets: OpenGL in 2D
This code tutorial will demonstrate how to set up a 2D orthographic projection. It also covers the basics of loading image files and painting to the screen using OpenGL. It’s mostly code samples and not actually very instructive. Just set up a base template for any new 2D AllegroGL project!
I really like using OpenGL, but many of my games are in 2D. Fortunately, this is not a problem.
-=Expand Article=-
2D, allegro, image, opengl, orthographic, texture, vertex
Ragdoll Physics Using Verlet
As I’m sure you didn’t know, I’m making a game based on my death. It is called Mike’s Funeral. One of the major aspects of Mike’s Funeral will be the flying corpse and his ragdoll properties. I have to admit, nothing makes me chuckle like a body flying through the air.
But just how does one create such an object? How do you create this kind of gameplay?
It’s true I could have used a pre-built physics engine like
Box2D. However, with only one ragdoll in the game and no need for friction or density or any other advanced concepts, I felt compelled to do it on my own.
Fortunately it isn’t too difficult! If you’re interested in learning the basics of some simple ragdoll physics, you should read on. All code samples are in C/C++ and there is a source download at the end of the article.
-=Expand Article=-
allegro, c++, opengl, physics, ragdoll, tutorial, verlet