Galcon Games
Phil Hassey - game dev blog
Phil Hassey as Wolverine
"What kind of
arrogant jerk
has a website like this?"

Archive for May, 2011

Invasion of the Blobs & dev toolkit in the works

Friday, May 20th, 2011


A few weeks ago I entered the Ludum Dare game development contest and whipped together a fun game about defending off invading blobs using a spray can.

I spent another week getting it polished up so it works on a ton of platforms. The game is “The Invasion of the Blobs” (iBLOBS for short). You can get it here. It’s available on iPhone/iPad, Android, PC, Linux, Mac, and pretty soon the Mac App Store.

The reason for the porting frenzy with this game is I’m working towards releasing an open source C++ toolkit for supporting all these platforms (and maybe a few more). This is my first game release with this kit. It uses code from all my recent games, but it finally puts that code into a clean and organized re-usable structure. This is going to be super helpful for reducing bugs and improving game code across each platform.

Anyway, I hope you enjoy iBLOBS. It’s totally free, so you might as well give it a whirl. If you want to help out, please post a message here if there are any crashes or support issues on any platform, I want to get those ironed out best I can 🙂

Have fun!

UPDATE: The Android port has been giving quite a few people trouble. If you are a dev with the Android dev kit, please do an “adb logcat” and post the results here, that would be a huge help!

UPDATE2: The Android build is so broken I took it down.

New Game! The Invasion of the Blobs

Friday, May 20th, 2011

Available FREE on iPhone / iPad / PC / OS X / Linux.

Have fun!

Android threading tips

Thursday, May 12th, 2011


I still don’t completely understand how the Android threading works. So that explains some of why my code sometimes has trouble. Here’s a good article on deadlocking in Java.

In a Activity + GLSurfaceView there are at least two threads in operation. In my code I synchronize all my native methods. Some of my native methods have to call back to Java to load textures, play music, etc. I’ve found in certain cases a deadlock occurs. My guess is that the deadlock happens when:

– I’m receiving a touch event and I’m trying to call my native code with the event data
– I’m rendering a scene and it is trying to load a texture.

My guess is that loading a texture is trying to acquire a lock that the Activity thread has locked, while the Activity is trying to send an event to the native code which is locked.

Here are ways to push code onto the other thread so that you can reduce the amount of synchronized type deadlocks.

Putting a item on the Activity / UI thread

            myActivity.runOnUiThread(new Runnable(){
                public void run() {
                    /* do something in the Activity UI / thread */

Putting an item onto the GLSurfaceView thread

        myGLSurfaceView.queueEvent(new Runnable(){
            public void run() {
                /* do something on the GLSurfaceView thread */

Anyway, hope that helps!