Writing a Game Engine in 2017

Writing a game engine in 2017, what does that look like? Should a developer download Unity? Gamemaker? Love2D? Almost certainly, correct? Why would anyone want to create a game engine… In 2017? This will be my last post for some years, so lets see if I can make it a decent one. There are only Continue Reading →

TwitterRedditFacebookShare

Game Localization and UTF-8

After some research I have decided a pretty good way to localize your game is to store all text in text files, in UTF-8 format. UTF-8 is super widely used and 100% backwards compatible with ASCII. Also the clever design of the UTF-8 encoding lets programmers treat UTF-8 buffers as naive byte arrays. UTF-8 buffers can be naively sorted Continue Reading →

2D Collision Detection Library – tinyc2

Collision detection is pretty hard. Making 2D games is pretty fun. Wouldn’t it be nice to make a cool 2D game without fiddly around forever with collisions? With the single-file C header library tinyc2 now it’s possible to focus on the fun parts of development rather than twiddling with endless collision bugs, or ripping collision detection Continue Reading →

Cross Platform Time for dt

Generally a game loop will look something like this:

Generally the delta time slices between each game loop are useful to advance the game to the next frame, or tick. dt stands for the elapsed time since the last moment we asked for elapsed time, or, delta time. In effect we are using one Continue Reading →

#ifdef vs #if and if

Compile-time settings and whatnot often make use of #define, #ifdef, and #if. I would like to make the case that using none of these is the best option, and plain old if-statements ought to be used most of the time. Here’s a typical example:

Some debug code runs inside of a paged allocator to try and detect Continue Reading →

tinysound Release

I’ve released tinysound.h, a C header implementing a an API over DirectSound for game sounds! Details found here :) Demonstration code:

 

Faster vcvars32.bat

Recently I noticed vcvars32.bat was taking up a significant portion of my compile time. Usually this isn’t a problem if the console that ran vcvars32.bat only needs to run the command once. However in some cases the environment variables setup by vcvars32.bat need to be set each time a batch file build script is run. Continue Reading →