#Game Development

24 posts tagged Game Development

Component Based Game Engine From Scratch Part 2

Last time I explained in detail how the whole system worked. This time I will focus on the component system, as it is quite complex. Using it isn’t complex, but I’m trying to mimic Unity’s functionality that was written in C#. Functionality that is partially implemented within the editor and doesn’t relate directly to typing in code. I have no idea how Unity really does this, but the solution I have come up with seems tidy enough and fits neatly within a single C++ header.

Easier Game Controller Input in SDL with SDL_GameController

Game controllers on computers are somewhat irritating to manage compared to a console. Has the user plugged in an XBox controller? A PS4 controller, or have they obtained some random USB controller they found on eBay?

Coping with this in SDL was difficult, with SDL just telling you “button 13 pressed” or “joystick axis 4 moved”, which is great except all your code really wants to know is “did the user just press the A button?”.

SDL_GameController fixes all this, and it needs better documentation, so this is my attempt at providing some useful information.

Text printing using bitmap characters in C++ and SDL

Back in the mists of history, sometime around the 90s it was quite common for games and demos to display text on the screen. Since we’re talking about old computers with barely any usable RAM, the text was stored as images. A giant single image with every character placed within it. To display words programmers had to be a bit inventive. That’s the topic of today’s post.