Introduction

In the previous post we cobbled together an SDL2 project in Xcode 9. We have a very simple program that starts up, initialises the SDL2 framework and then shuts down. This gets us over the initial hurdle of setting up a game project but we are still along way off from having a working game. In this second part, I will be writing a simple game loop using SDL2. If you don’t know what a game loop is, or need a refresher, go ahead and read about it in Game Programming Patterns. The game loop is an important foundation of any game engine and its important to get right. I plan to develop this over two articles, in the first (This one) we’ll get the basic loop in place. Then in part 2, we’ll refactor the basic loop into something more maintainable. Anyway, without further ado, let’s get started.

Continue reading

Introduction

I’ve put together a couple of side projects with SDL2 over the years. I like the library because of it’s simplicity and how it provides a quick way to throw together a cross platform project. This post is a reasonably comprehensive guide to how I set up an Xcode 9 project that links to the latest SDL2 framework. There are other ways to do it, but this is mine.

Continue reading