Creating a Custom Orthographic Projection With Pyglet

February 21st, 2012

Filed under: Game Development, OpenGL | Be the first to comment!

When you create a pyglet window, pyglet sets up an OpenGL orthographic projection for the window. The size of the projection matches the size of the window. If the window is 640 pixels wide and 480 pixels wide, the orthographic projection is 640 units wide and 480 units high. Pyglet’s default behavior works well in […]


Installing Pyglet on 64-bit Macs

January 16th, 2012

Filed under: Game Development, OpenGL | 4 comments

Pyglet is a technology to write cross-platform OpenGL games and applications in Python. If you go to the pyglet site, you will find installers for Mac OS X and Windows. The current Mac version of the installer, 1.1.4, uses Carbon, which means it doesn’t work with 64-bit applications. Not working with 64-bit applications is a […]


SDL OpenGL Typedef Redefinition Error on Mac OS X 10.7

November 7th, 2011

Filed under: Game Development, Mac Development, OpenGL, SDL | 3 comments

If you build a SDL OpenGL application for Mac OS X using SDL 1.2.14 (using the binary installer at the SDL site) and the Mac OS X 10.7 SDK, you can get the following error: typedef redefinition with different types (‘unsigned int’ vs ‘void *’) The SDL header file SDL_opengl.h and the OpenGL header file […]


Mac Game Programming Roadmap Update for 2010

November 14th, 2010

Filed under: Game Development, Mac Development | Be the first to comment!

I’ve seen several questions on Mac programming forums recently looking for Mac game programming tutorials, which made me look at my Mac Game Programming Roadmap article. The article is three years old, and some things have changed in the past three years. Avoid Carbon Unless you have an existing Carbon codebase, avoid Carbon. If you […]


Troubleshooting PNG Loading with SDL_image

April 27th, 2010

Filed under: Game Development, SDL | 2 comments

SDL_image is a library that simplifies loading image files for SDL games. One of the more popular image file formats for games is PNG, and SDL_image has support for PNG. On game development message boards, you’ll find many questions from people having trouble loading PNG files with SDL_image. This trouble has two common causes. Cause […]


SDL Tips for Mac OS X

December 29th, 2009

Filed under: Game Development, SDL | 12 comments

SDL’s most compelling feature is its cross-platform compatibility. You can use the same source code to write a game for Linux, Mac OS X, Windows, and any other system SDL supports. When people write a game with SDL on Linux or Windows and try to build a Mac version of your game, they learn that […]


SDL File Loading When Running from Visual C++’s Debugger

February 7th, 2008

Filed under: Game Development, SDL | Be the first to comment!

I was testing some texture loading code on Visual C++ 2005 and 2008. The code compiled fine, but when I ran it from Visual C++’s debugger, it crashed every time. The code crashed because the program could not find my image file so it could not read the file and load the image. But the […]


Setting Up SDL with Visual C++ 2008 Express

December 27th, 2007

Filed under: Game Development, SDL | 9 comments

Microsoft recently released Visual Studio Express. I wanted to see if my SDL setup instructions for Visual C++ 2005 Express (PDF) worked with Visual C++ 2008 Express so I installed Visual C++ 2008 Express and went through my instructions. The good news is Microsoft did not make a lot of changes in Visual C++ 2008 […]


Changing SDL’s Working Directory on Mac OS X

December 11th, 2007

Filed under: Game Development, Mac Development, SDL | 3 comments

The Mac OS X version of SDL sets the working directory to the directory containing the application bundle. This default behavior makes loading images and sounds more difficult because the images and sounds most likely reside in the application bundle’s Resources folder. What would be nice would be to set the working directory to the […]


New Article: Mac Game Programming Roadmap

October 11th, 2007

Filed under: Game Development, Mac Development | Be the first to comment!

I have a new article available that provides an overview of the technologies to learn to write Mac games. The article was motivated by a discussion that has been brewing on Apple’s game development mailing list for several list. The discussion revolved around Apple’s lack of support for games, and one complaint was that Apple […]