Porting woes.

Posted by (twitter: @noffle)
December 19th, 2011 9:32 pm

It’s done!! If you are running Linux, go ahead and play. As for the other platforms..

Two and a half hours after the jam has ended, and I’m still trying to get my game working on the three Big Ones. Ungh — it’s painful. I’m using C++ with Allegro and Chipmunk.

Linux: Done. Not too bad. I didn’t have a statically linked copy of Allegro, so I’m including the Allegro shared lib, hackishly setting  LD_LIBRARY_PATH, and relying on users to run a “run_game.sh” script that sets the env var and runs the game. Does anyone know how to nicely distribute a game that relies on a shared lib?

OS X: More or less done. Figuring out how to package things into a .app was painful. THEN figuring out how to put the .app inside of a .dmg was even more “fun” (thanks though, guys). The other fun news is that Allegro relies on QuickDraw, an older OS X API for doing software rendering. It was deprecated (but functional) in Snow Leopard, but trying to run it on a Lion machine reveals that support was dropped entirely. So, on Lion machines, the game will toss a bus error when run in fullscreen. *grumblegrumble* Fine then. Since I can’t even catch the failure gracefully, Mac users will have to settle for a windowed version.

Windows: About to start on it, but I suspect it will be more of the same awful. I didn’t see any nice binaries for Chipmunk lying around, so I suspect I’ll need to compile that myself using some arcane MinGW IDE like Dev-C++ or Code::Blocks.

Next year I’m either going to use Java, or invest some time making a set of scripts to automate at least some of these cross-platform chores.

 

 


Leave a Reply

You must be logged in to post a comment.

[cache: storing page]