Phil Hassey - game dev blog
Phil Hassey as Snidely Whiplash
"You can't buy awesomeness.
You're born that way."

The 2011 Re-Cap: Five games in one year!

January 6th, 2012

Ahoy there! 2011 was a great year! Here’s a re-cap of the games I released and some final thoughts on ’em!

First of was The Invasion of the Blobs which was my Ludum Dare #20 entry! I had a blast making this game as part of the jam. I used this game as a way to work on my ports to Android, iOS, PC, Mac, Linux and distributed the game on all of them. I however, had to pull the Android version after a few hours because it was having so many technical problems. This caused me to decide to put further Android dev on hold for 18 months, until the platform has matured enough for me to be able to easily port things to it without going totally crazy. I’ll probably use Marmalade for future ports to Android. iBLOBS got around 25k downloads between the Mac and iOS app stores.

Next up was The Exterminator which was a game I made along with several teens to raise money to build a community outreach center. This project was a total blast, we spent two days working together on it, and then I spent a few more days spit shining the menus and adding in basic Game Center support. The release got a bit of coverage on 148Apps but no other iOS press that I know of. However, it did get some great local coverage in Colorado! This was pretty great, because, really, the game sold only a couple hundred copies, barely enough to cover the iOS dev fees. But it help raise awareness in Colorado and got at least one sizable non-profit interested in contributing a significant amount of money to the project (this is still in their approval process, so we don’t know for sure if that will come through or not.) Whatever the case was, it was a fun project, and it was a great excuse for me to buy an iCade 😉

And then there was Chickon which was most definitely the most silly project I went into this year. I intended for this project to take a couple of weeks but it ended up taking about 6 months .. but I’d hardly call it really hard-serious work type 6 months. In the end, Chickon was an amazing PR success. touchArcade gave it 3 or 4 articles featuring all the goofy stunt videos I produced and reviewed it. The game has not seen a ton of in-app-purchases, but people who have played it have enjoyed it. I think this project was something of a success just for keeping my name in the ear of the press. At least they know I still exist! And I’m still doing something! I also tried a ton of different Galcon gameplay features in this game to see what worked and what didn’t. Since I am thinking about doing another Galcon sequel in the future, this game helped me eliminated about half a dozen really bad ideas 🙂

And then I worked on my new game Anathema Mines. The beta mentioned above was a very limited private beta, though I may expand it more in the future. This game’s is explained a bit more here where I go into how it’s kind of the 4th rebirth of a game concept I’ve been working on for about six years now. I’m really happy with how it’s coming together and the next 2-3 months are going to be dedicated to finishing this game and giving it the best launch possible!

Lastly, I wrapped up the year having a blast creating Nobody Wants Kitty for Ludum Dare #22. The game is about a cat who nobody loves because it’s so ugly. The cat has to upgrade to being pretty over the course of the game. I had a fun time making this and I got to learn a bit more about creating flash games, which is really one of the best ways to prototype anything now-a-days!

Anyway, it’s been a great year! Thanks a ton for playing my games!

-Phil

Chickon for iOS has Arrived! Galcon with Chickens and Robots!

November 16th, 2011

Okay folks .. it’s been a while. We spent the earlier part of this year moving to a new house and getting settled in, and somewhere in there I had this crazy idea “haha wouldn’t it be funny if I made a version of Galcon with chickens in it cause everyone plays all those poultry oriented games, haha, I’ll make it in a week.” Yeah, well, SIX MONTHS later, it’s finally here!

Chickon is a free-to-play romp of total silliness in the land of Chickontopia! Check out the totally sweet trailer – it’s worth seeing even if you don’t have an iOS device:

http://www.youtube.com/watch?v=CTgPI2PK8RE

And then get the free app for your iPod touch, iPhone, or iPad.

http://itunes.apple.com/us/app/chickon/id472764637?ls=1&mt=8

Hope you get a good laugh out of it! Be sure to tell your friends and poultry loving acquaintances.

-Phil

Is this a safe pattern for auto-registration?

October 26th, 2011

Hey,

I’m trying to have various components in my game pre-register themselves upon startup of the game. I’m using this pattern:

Here’s my registration code that is in one .cpp file. The register_init() function is available from anywhere:

std::vector &get_init() {
    static std::vector goods;
    return goods;
}
bool register_init(Init *v) {
    get_init().push_back(v);
    return true;
}

Here’s how I auto-register some init code from some other file by calling register init to initialize a variable:

int _is_levedit_init = register_init(new LeveditInit());

Is there some case where this would NOT work or is somehow a really bad idea? Or is there some pattern that is better to use?

-Phil

Freemium – my take: design for maximum enjoyment first

October 21st, 2011

There have been a ton of posts about game design and ethics lately relating to freemium.

Here’s my take. I don’t really think there is ethics so much in if you make a freemium game with random drops or checklists or whatever or not. I think those are game elements that some users REALLY LOVE and some users REALLY HATE. Some users HATE in app purchases, some users LOVE them. I think many players find random events to be FUN! Randomness is a big thing that helps make a game addictive and people like addictive games!

Here’s my “big picture” view of where game design gets unethical – when the designer’s time is spent too much on designing for maximum monetization as opposed to player enjoyment. I think the purpose of games is for people to have FUN! If you as a designer are working mostly to ensure that, you’re doing your job. If you are spending most of your time tweaking your game for maximum REVENUE then you are doing it wrong.

So, yeah, I think the reason Zynga gets a bad rap is because there’s rumors that they have huge departments of psychologists and number crunchers working non-stop to increase the addictiveness and monetization of their games. With no concern for the player beyond what they can do for the bottom line. That’s not very positive. They have lost their way as game developers and that’s unfortunate.

On the other hand there are tons of indie developers out there who are working hard to make FUN games that use checklists, random drops, grinding, and in-app-purchases as game elements who are focussing on making FUN free-to-play games. I think these guys are doing it right.

I think freemium is right now the brave new world for indies. I think some indies are doing great stuff with free-to-play and I think some are scrambling too hard to MONETIZE. I think it’s a time where some people are screwing up and making bad games, but I think it’s okay to make mistakes right now. I think right now is the opportunity for people to find out what free-to-play can offer the player. I read every single blog post and article I can find about free-to-play game design because I want to do my best as a game designer to make my stabs into this new territory to be good ones.

And again: as a game designer be sure to keep your focus on making games that people genuinely enjoy.

-Phil

Tough decisions, interesting beginnings

September 28th, 2011

So, if you’ve been following this blog for a while (like a year) you might recall last year’s “October Challenge” game called “Stealth Target” that I attempted to release as a paid beta game, which I then issued refunds for and then made a few vague efforts to revive and .. well ..

I mean, it looks, sort of okay. Those dynamic lights are neat stuff, man I learned a ton about OpenGL and tricks doing this game. The trouble is, since it is a 3D rendered game, when you stick it next to shots of (links to any recent Unity game on touchArcade left as an exercise to the reader) it looks awful. “Why is this dev even bothering?” Coupled with the fact that the interface was a bit kludgy using a mouse and at least twice as bad using touch, it just wasn’t a great fit for, well, anything sadly. To finish the project it would take me at least 3-4 more months of serious work and I don’t expect that I would be happy with the final result, so I had to kill it.

.. But I had written some keen code. And I still liked the game concept. So I thought about it a bit more. I had made another game a ton of years ago called Escape from Anathema Mines. It was a similar “dodge the guards” type of game with an overhead visual aesthetic that actually worked pretty well.

I thought it over and decided that with some of the GL experience I had acquired while working on Stealth Target, and by going in the direction of the overhead view that worked so well in that game, I could re-mix the two games together and create something new and exciting and simple enough that I could get it done. After just a few days of work I’ve already got a OpenGL / HD playable of Escape from Anathema Mines.

I’m going to extend the game with some of the bomb concepts from Stealth Target and maybe top it off with some other wacky features. This game is much easier to work on for the primary reason: it isn’t in 3D. Not being in 3D just makes rendering and working on it so much easier. One thing that also helped getting this up and running quickly was being able to reuse a ton of the code / algorithms that I had already written for Stealth Target.

I also been learning about the Object Component model over the past year and I’m using this game as my first attempt at it. I went to a talk at 360iDev (check it out) and got a very nice overview of the model. But the BIGGEST point he made that worked for me was when he said, “It doesn’t really matter how you do this, as long as it works for you. You won’t make a perfect model, so just make one that gets the job done and don’t feel bad about it.” Which was really liberating for me, I’ve always felt it was supposed to be some perfectly coded model, and being allowed by someone to just “get the job done” really helped. I was able to use the things I learned in his talk to help my code without having to do weird stuff that wouldn’t work with my style of coding. I have everything in a single structure named Entity. Really simple, but the thing I also do is have a bunch of bools like “has_light” “has_position” and then more members like “position_x, position_y, light_a” and so on. That way everything is always there (very C) but it’s component oriented (I can test if a component is there and take action on it if it is.)

Here’s the level editor, which is actually is very similar to the one for Stealth Target, only .. since the game is actually an overhead game, it was a ton easier to get working.

So, yeah. I’m enjoying doing this project. It’s actually my “hobby project” which means I’m only allowing myself to work on it during off-hours. I will probably attempt to monetize it somehow, but my main goal with this project is to satisfy my need to get these game ideas out the door and see how they come out. I’ve got my main work hours dedicated to some of the other commercial projects I’m working on this year.

Which I should talk about more soon. A lot more.

-Phil

Oh look a white orb

September 1st, 2011

Hey, I added white orbs. I wonder what use the game will have for those. In Star Trek:TOS, it’s accepted practice to beam down to the planet, get mad at the inhabitants and commit some sort of genocide. And then take their minerals. Hmmm.

The tough bit with iCade dev is that I haven’t added touch controls to the game so moving my ship around in the sim (for screenshots) isn’t possible unless I pair my iCade with my Mac. Which is a pain. Maybe I should figure out how to take on-device screenshots.

-Phil

Day 1: Random side-hobby game for iCade

August 31st, 2011

Hey, 90 minutes later, I have this, with working iCade controls to cruise the ship around the endless galaxy!

Totally fun messing with a hobby game project!

-Phil

From 0 to iCade in 3 hours 16 minutes

August 30th, 2011

Hey,

1. The Arrival and Assembly (30 min)

So my iCade arrived at 2:58pm today. It took me 30 minutes to unbox the parts and put the whole thing together with a hex-screwdriver. The completed item looks 110% win!!! There are tons of detailed unboxing guides on the internet, so I’ll just give you a shot of mine:

2. Testing it out with GAMES (30 min)

I had to check it out with a real game, so I went to the definitive touchArcade post on the subject. I realized I already had several of those titles on my iPad, so I dove right in with Velocispider which was totally awesome on the iCade!! I can only hope more devs add support! 30 minutes elapsed “fun time”.

3. Downloading the iCade SDK (1 min)

The “official” SDK is sort of useless, it’s just a manual telling us what we already knew. The great bit is there is an Open Source SDK (MIT) that is ready to go! I downloaded and unzipped that and began adding it into my project. 1 minute.

4. Being stupid (2 hours)

I then proceeded to brilliantly comment out the two lines of code that make the iCade code work. And then spend 2 hours realizing it. /facepalm

5. The iCade Integration (15 min)

Once I fixed my error, the integration took approximately 15 minutes. The bulk of the code was just a switch statement that converted the iCade SDK events to my own internal framework events. I already had keyboard support, so it was no trouble at all.

- (void)setState:(BOOL)state forButton:(iCadeState)button {
    int v = 0; unsigned char c;
    switch(button) {
        case iCadeButtonA: v=KEY_a; c='a'; break;
        case iCadeButtonB: v=KEY_b; c='b'; break;
        case iCadeButtonC: v=KEY_c; c='c'; break;
        case iCadeButtonD: v=KEY_d; c='d'; break;
        case iCadeButtonE: v=KEY_e; c='e'; break;
        case iCadeButtonF: v=KEY_f; c='f'; break;
        case iCadeButtonG: v=KEY_g; c='g'; break;
        case iCadeButtonH: v=KEY_h; c='h'; break;
        case iCadeJoystickUp: v=KEY_UP; c=0; break;
        case iCadeJoystickRight: v=KEY_RIGHT; c=0; break;
        case iCadeJoystickDown: v=KEY_DOWN; c=0; break;
        case iCadeJoystickLeft: v=KEY_LEFT; c=0; break;
    }
    Event e;
    e.v = v;
    e.c = c;
    e.type = state?EVT_KEYDOWN:EVT_KEYUP;
    game_event(e);
}

I also had to go ahead and add Universal (iPad) support to the game, this didn’t take too long as my framework has smarts for doing that pretty easily.

6. In conclusion …

I’ve submitted my update to the App Store, so hopefully it’ll be in your hands within a week.

In conclusion, integrating iCade into your iOS game only takes 15 minutes, unless you’re as stupid as I am. I encourage all devs who have appropriate games to do this so that I can play more games on my iCade!!! Go GO GO GO!

-Phil

Scaling custom WordPress: the ludumdare.com lessons learned

August 25th, 2011

Hey,

I’m the dev / admin behind the Ludum Dare 48 hour game developer competition. This past weekend our competition grew from 350 contestants to 600 contestants thanks to @notch. Not only that but his live video blog of the event and twittering drove a TON of people over to the site just to spectate the event. This led to a ton of press coverage on. In short, 48 hour game development BECAME a spectator sport. Which is totally not something I had anticipated – here’s a completely inaccurate motivational poster I created a few years ago:

Anyway, that wasn’t the case, and this is what happened. (Short version: $8 shared hosting server burned to the ground and we got kicked off and had to find greener pastures, and then do a ton of optimizing.) I want to give a shout out to Mike Kasprzak for keeping the masses at bay and helping to endlessly test the site and hold my hand while I worked through all the mess. Here’s the lessons learned:

1. Profile site database use.

You can find out what queries are killing your site by using the WPDB Profiling plugin. This was a HUGE deal for us. We were able to see exactly what queries were destroying us. Without any debate this is the #1 tip I have, because if you don’t know what the problem is you can’t fix it!

2. Remove inessential plugins.

Not all WordPress plugins are developed with massing scaling in mind. We found by disabling all the plugins except for the essential plugins we were able to go much faster. Not only that but even efficient plugins add a CPU drain to the site just by having their PHP files loaded.

3. Clear out the sidebar.

Sidebar stuff can also be a huge drain. We just plain removed the sidebar for the competition. We’ll probably re-enable some of it eventually, but be careful, even some of the WordPress issued functions have some monster queries in them.

4. Optimize slow 3rd party plugins.

One plugin we wanted to keep using I like this is really cool, but it uses a table that is not indexed and it adds an extra query per-post on the front page of your site. I indexed the columns in the custom table it had as well as removed the unnecessary per-post query it was issuing. Now we can use that cool plugin without any notable slowdown. Here’s my bug report / patch.

5. Add in custom caching to 3rd party plugins.

Our custom competition plugin was really un-optimzed. I had written it to just work, and it worked great under low load. I used a number of techniques to reduce the load:

– I added in my own mini profiler so I could track how often certain functions were being called and how long they were taking. This helped me track down the issues to an even finer detail than I was able to with the WPDB Profiling plugin.

– I was using the get_userdata($uid) function from WordPress as many as 600 times on a page, so I cached that data with the records in my database so I would almost never have to call it, that was probably the biggest issue and was causing 600 database queries on those pages.

– I added paging to the various views so that instead of seeing all 600 entries at once, you only see 24 at a time, this really reduced load in terms of queries and images being loaded off the site in one request.

– I also added some page caching for the few pages that calculate results, this is largely a CPU save because generating those pages is pretty intensive

6. Be smart with 3rd party caching solutions.

Pre-made caching solutions for WordPress can’t save you if your site is largely driven by custom plugins and signed-in users using web apps (like our compo system), in fact those caching plugins actually can slow down the site quite a bit. They are designed more for static content blogs (which is more typical for blogs) and probably work great for those, but for us they didn’t work so hot.

… Conclusion.

I’m now quite happy with how the site is performing. We’ve reduced the load on our new VPS from 70 or so (meaning that we had about 30x as many processes wanting to use the CPU as the server could handle) down to about 0.5 which means we’ve got room to handle spikes again. I hope 🙂

-Phil

The Exterminator – game for charity comes to App Store!

August 17th, 2011

Phil Hassey from Galcon-land here. A game I developed with five teens for charity just went live on the App Store! The game is an effort to help raise the $200,000 needed to get the down payment to buy a building for a local community outreach center in Rye, CO.

The game is called “The Exterminator” and it’s about a motorcyclist defending the earth from mega-sized mutant bugs. It’s an endless runner-type game with a totally rocking original electric guitar soundtrack. The gameplay is super addictive and feels a bit like a 1942 + Canabalt mashup. If you get going over 75 MPH it goes into “guitar-solo” mode where all points double. Combos (sequential shots without misses) gain you increasingly more points. For fun I added in GameCenter leader boards so you can compete with your friends. It’s only $0.99 and all the money we get goes towards the building fund. (Apple’s take is 30%.)

Developing the game with the teens was a really great experience. The project started out with us discussing what charity the teens wanted to raise funds for. The group was unanimous that they wanted to help raise money for the local community center because it would give future teens a great place to hang out. Rye, CO is a small rural town and there aren’t any actual hangouts outside of school activities.

After that we decided on a game theme. Wes really wanted to do a motorcycle oriented game and Shamoa was interested in some kind of game where we’d destroy mutant bugs. By combining those ideas we came up with “The Exterminator.” From there we spent two days developing the artwork, music, sound effects, and the actual game. Matt put together the electric guitar soundtrack using GarageBand. Wes, Shamoa, Shadrack, and Cameron all worked on the artwork. Most everyone did some sound effects. We also spent a lot of time eating food and generally goofing off. We wrapped up the project with some solid play-testing and tweaking and we were all really happy with how it came out. As a game developer I totally enjoyed the experience of working with teens and developing a game idea that I would have never come up with on my own!

Here’s a page that includes an overview of the community center plans and includes a PDF with a more detailed description.

Charity aside, it’s totally fun, so be sure to check it out!

Have fun!
-Phil

P.S. I’m “philhassey” on GameCenter, just try and beat my score!

Press pack with screenshots, icons, etc