Independent Game Developer

A number of months ago we moved Decade Engine from our own framework to SDL 2.0. With the new version of SDL, mobile devices have excellent support and it was an ideal framework to handle window creation and events for the Decade Engine. Using the extension libraries SDL_image, SDL_mixer, SDL_ttf and SDL_net we also received excellent support for loading images, audio, fonts and doing network communications.

The one problem we found is that there is no single resource for SDL. There is allot of information available online as SDL has been around for a decade however this information is very fragmented and takes allot of searching to find what you need. Another issue is that the problem you are experiencing is not always obvious. For example, when first moving to mobile devices, even though we had setup our app to support both landscape and portrait we were never receiving rotation events. Investigation showed that SDL 2.0 didn’t actually have any rotation events and we had no idea what we were supposed to do. After allot of research we found out that in order to be notified that the mobile device has rotated you need to create your SDL_window using the SDL_WINDOW_RESIZABLE flag then when the screen rotates the window will resize to fit the new screen dimensions and you will get the event. When you read this is probably makes sense however at the time we didn’t consider that mobile apps resize in the traditional sense of windows resizing and it wasn’t an intuitive solution.

With these little nuggets of information gained during the process of porting the Decade Engine to SDL 2.0 and writing Schwizzle we have decided to self publish a book, teaching users how to setup and use SDL 2.0 as well as a simple 3D engine on multiple platforms. The book is still being written but the current contents look like this:


Chapter 1. Introduction

What is in this book?
Who should read this book?
What is SDL 2.0?
    SDL 2.0
Conventions used in this book?

Chapter 2. Code

    Vertex Buffer Objects
    Index Buffers

Chapter 3: Android

    Android SDK
    Android NDK
Setting up your Android project
Building SDL 2.0
Configuring your project to use C++ 11 and STL
Adding the SDL 2.0 extension libraries to your project.
Your game foundation is now ready to use SDL2_mixer.
Using OpenGL Extensions on Android

Chapter 4. iOS

Building SDL 2.0 for iOS
Creating an SDL 2.0 iOS app
Changing the app icon and splash screen
Changing the app name
Targeting iPhones and iPads
Running your SDL 2.0 iOS on a device
Running on the device and the simulator
    Load the correct library using linker flags
    Use a universal library
Configuring your project to use C++ 11 and STL
iOS specific functionality
Adding the SDL 2.0 extension libraries to your project.

Chapter 5: Linux


Chapter 6. Mac OS X

SDL 2.0 Frameworks
    Creating a project to use SDL 2.0
Configuring your project to use C++ 11 and STL
Adding the SDL 2.0 extension libraries to your project.
Identify Mac OS X build
Preparing your application for release
    Packaging dependencies
    Code signing
    Setting an App Icon

Chapter 7. Raspberry Pi


Chapter 8. Windows

    Visual Studio
Downloading prebuilt binaries

Appendix A: Where to download SDL

Appendix B: Building SDL 2.0 and Extensions

Mac OS X
    Building SDL_image
    Building SDL_mixer
Raspberry Pi

Appendix XXX : Creating an Android Virtual Device

Appendix XXX: Configure Eclipse to build native code.

Leave a reply

Your email address will not be published. Required fields are marked *

Back to Top