Phil Hassey - game dev blog
Phil Hassey as Syndrome
"Look, stores don't sell
costumes like this to just anyone."

Galcon Fusion – “Pool Party” Steam achievement & indie dev videos

July 8th, 2011

The Steam Summer Camp sale is on and Galcon Fusion has a new achievement to celebrate!

“Pool Party” – Win 5 Rounds of Multi-player Billiards! I’ve just tripled the number of Billiards servers to accomodate the mad rush :)

If you haven’t purchased Galcon Fusion on Steam yet, it has SteamPlay (Mac & PC) support and is on sale at 66% off today for only $3.40 .

Have fun playing!
-Phil

P.S. in other crazy news, I’ve been doing an indie game dev video blog with some other cool folks! Look through the videos, I talk about Galcon and discuss what I think about varios aspects of being an indie dev. Other devs include Mike Hommel who created “Robot Wants Kitty” which was one of my favorite games last year, as well as Andy Moore who created Steambirds and is involved in re-tooling Galcon Flash. Check it out and subscribe if you find it interesting.

Indie Indie Conversation

June 11th, 2011

Hey,

So, I’m joining forces with a few other indie game developers to post some short youtube videos talking about being an indie game developer. It’s called “indie indie conversation“. Be warned, though I keep it pretty SFW, not everyone else does.

Cheers!
-Phil

tinypy2 musings

June 2nd, 2011

So, my mind has been poking away at the idea of making a “tinypy2” that would be a bit less like python, so probably even more confusing for end users. Being only one sentence into my proposal here, and it already sounds bad. Well, here goes:

-1 All objects would be assigned and passed by value instead of by reference
=0 There would be a dictionary of global variables
+1 The VM state could be saved to readable JSON
+1 The VM state could be loaded from JSON
=0 The VM would be written in C++
+1 The VM would have super-easy interoperability with C++ code
-1 The VM would be on the slow side

Tallying up the pros and cons, we get to a +1 for this idea. I don’t suppose there’s much way for anyone to comment on if this sounds like a good idea or not, but thos are some of the thoughts going around in my head right now. It seems like it would be an interesting rudimentary scripting language. The load / save of VM state and C++ interoperability are the key points.

#badideas ??

-Phil

The Galcon Office 2011 Edition

June 2nd, 2011

So, hey, we recently (3 months ago) moved to “the goat ranch” and I finally got around to decorating my office. Since moving in, I’ve released one game and I’ve got three (or so) in the works. So a lot of stuff is going to be happening here this year!

Everything in that picture has got some sort of anecdote behind it, so if you’re curious about anything, just ask 🙂

-Phil

Invasion of the Blobs & dev toolkit in the works

May 20th, 2011

Hey,

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!
-Phil

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

May 20th, 2011

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

Have fun!
-Phil

Android threading tips

May 12th, 2011

Hey,

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!
-Phil

Transitioning to Xcode 4.0.x

April 26th, 2011

I’m working on a new game project that I’m hoping to release sometime in the next month or so! I’m taking a break from Dynamite to do something a bit more wacky 🙂 For these posts I’m going to be referring to my project as “mygame” since I’m not ready to announce the name of this super-amazing project yet.

Anyway, I downloaded Xcode 4.0.2 the other day so I could get going with the latest iOS tools. I’m going to be using more iOS features in this game than ever before, so I want to be sure I’m up to date with how things are supposed to be done. Xcode, however, has quite a few changes, so here’s the documentation of some of the common things I do as an Xcode user that changed.

1. Adding CFLAGS to my project “-DMYGAME_IOS_BUILD, etc”

– Click on “mygame” at the top left of the project tree hierarchy.
– Click on the “Build Settings” tab in the main frame.
– Click on the “All” button to reveal all settings.

From there you can find the “Other C Flags” setting. Apparently Xcode 4 has “Schemes” (the name of your project) as well as “Builds” (Debug / Release) as well as “Destinations” (iPhone / iPad / Simulator).

2. Adding more Frameworks to the project

I always have a handful of frameworks I need to add. In Xcode 3, you could right-click and click on “Add Existing Frameworks” to pick from a list. This is no longer the case. But doing the same is pretty easy:

– Expand the “Frameworks” from the project tree.
– Right-click on one of the frameworks.
– Select “Show in Finder”
– Finder will open, and will show the folder where all the frameworks are.
– Drag and drop a framework from Finder to the Frameworks in your project

3. Working with the new OpenGLES iOS template

Every few releases of Xcode, Apple changes up the OpenGLES template. I do wonder if I should just copy over it with my own stuff? Maybe, but I figure Apple knows best or whatever, and I always adapt to the latest template for new projects. This one has me a bit more confused than usual since it seems to use more Interface Builder type stuff and has a mygameViewController object in it as well (and corresponding .m and .h files.)

– At this point I knew since I was going to be using GameCenter and IAP in this game I might as well learn a bit more ObjectiveC. I’ve thus far managed to NOT learn it in the 3 years of iOS coding I’ve been doing. So, to kick things off I figured I’d check out what the iOS development videos might have for me. Unfortunately, the newest videos are from Apple’s 2009 tour. Kind of sad, I mean, 2009 was back before iPads even existed. So those videos are certainly not going to help me deal with the new fancy in Xcode 4 and building Universal apps.

– Instead I found that the typed documentation was much more helpful. I clicked into “Tools for iOS Development” to see what they’d have to say about Xcode 4.

– From perusing a few documents I got the feeling that to use GameCenter, etc, I was going to need a ViewController. Since the new OpenGLES template includes one, I guess that is good. If there are any iOS devs reading this who want to point me towards some helpful tutorials so I can understand what I’m doing better, that would be great. As-is, I am sort of continuing in my usual blind-cut-and-paste-and-hope type stupor with this stuff.

– I hacked out all the GLES2 code, I still write all my code using GLES1 .. the advantage that gives me is that my code will work simply on pretty much any platform. And I finally after 3 years understand GLES1 pretty well. I suppose I might get into ES2 eventually, but not yet 🙂 I also like that GLES1 code can work on the desktop with almost no changes. I hear shaders can add complication to my life on the desktop. Again, if anyone wants to link me to useful commentary on that, I wouldn’t mind!

4. Hacking my game onto the iOS app

I always code my games in C/C++. What I’ve found is the easiest way to get it to work with iOS is to rename all the .m files to .mm so that they are C++ aware ObjectiveC. Then I have a set of wrapper functions for my game that the ObjectiveC code can call.

Okay, so this is really cool, Xcode 4 now detects if you type in an invalid function name, and suggests a replacement function name 🙂 And it worked!

5. Making the game Universal

Xcode 4 seems to make this pretty easy. I just went into the Summary tab and switched mygame over to Universal and it all seemed to work pretty well. I only had to add these lines to the top of my drawFrame method in my ViewController:

CGRect screenFrame = [[UIScreen mainScreen] applicationFrame];
game_resize(screenFrame.size.width,screenFrame.size.height);

Here’s the blog post that helped me with that.

6. Making the game Retina enabled

I just used this code snippet at the end of my EAGLView initWithCoder (I believe I got it from the Fargoal folks):

      float scale = 1;

      if([[UIScreen mainScreen] respondsToSelector:
              NSSelectorFromString(@"scale")])
      {
              if([self respondsToSelector:
                      NSSelectorFromString(@"contentScaleFactor")])
              {
                      scale = [[UIScreen mainScreen] scale];
                      self.contentScaleFactor = scale;
              }
      }

Towards the end of the day I spent some time mucking with orientation stuff. That always confuses me! And that’s all for today!

-Phil

P.S. Changing where the builds are made:

By default the builds are put in ~/Library/Developer/Xcode/DerivedData .. they used to be placed within my project which is what I prefer. This can be changed by going into Xcode > Preferences > Locations > Build Location > Place build products in locations specified by targets

Galcon Android bugfix update & sale

March 31st, 2011

So I’ve been working on an Android tuneup for Galcon over the past couple days. Here’s what’s been going on:

– Some users were having the game hang on them when the phone went to sleep. There were two issues here, one was a deadlock situation because I had onPause “synchronized” and I wasn’t using the wakelock to keep the device from falling asleep. I fixed the deadlock and I added the wakelock feature so that the device does not fall asleep while you are waiting for a round to end or whatever. To sleep your device you have to press the sleep button now.

– In Android 2.3.3 the ability to scroll up and down the server list was somehow broken. It seems that the ability to track motion was somehow changed in the new version. Also, my code in the previous version didn’t handle things well anyways. So I’m just tracking motion manually and that seems to have fixed the issues in the game.

– I’ve also tested Galcon on the Xoom and it works pretty well!

I hope you enjoy the update! Please tell me if there are any odd side-effect issues that result from the fixes I’ve put in.

… And to celebrate, Galcon for Android is on sale for $0.99! So now would be a good time to spread the word about Galcon on the Android!

-Phil

P.S. A special thanks to Google for giving me a Xoom tablet at GDC! It’s great having the whole gamut of Android devices to test on now 🙂 The devices I have are the G1, Droid, Nexus One, and Xoom.

Robot Wants Kitty for iPhone (and other news!)

March 29th, 2011

Hey, so a friend of mine made this awesome flash game called Robot Wants Kitty .. and then that game got ported to the iPhone / iPod touch. And the port is even BETTER than the original!

I’m going to say right here right now that you should buy this iPhone game immediately! It’s $0.99, so it won’t break the bank. It’s a killer fun side-scroller which has gotten all 5-star reviews (except from people who have iOS 3.x on their device). If you want a second opinion, touchArcade really liked it too. So, yeah, support the awesome independent developer, hamumu.com (who I might mention appears in the credits of every single Galcon game as “Mike Hommel.”)

Anyway, again, you can get it HERE.

Cheers!
-Phil

P.S. There’s a Galcon Fusion tournament on April 1st!
P.S.S. If you like Galcon Flash, you might want to keep an eye on this blog.