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

Archive for the 'bugs' Category

Galcon Android bugfix update & sale

Thursday, 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.

The Galcon Fusion beta testers rocked

Thursday, February 11th, 2010

Galcon Fusion has arrived.“Yay, it’s finally here! Check out Galcon Fusion today! We’ve got a free demo and it works on Windows, Mac OS X, Linux, and Steam! It features some crazy nice hi-res graphics and soundtrack. And epic multi-player battles like you’ve never seen ‘em before! Have fun!” <– marketing blurb 😉

Okay, for some dev thoughts. Man, it was a long week! Adding the “demo” feature to the build was a ton of work. And then doing all that other ‘stuff’ that sort of comes up. I think the one serious lesson I’ve learned in this whole process is that beta-testers are awesome.

Really awesome. I had about 50 people who I passed out 10 builds of the game to over the past 3 months. Some of these people put in several dozen hours of play time. All this was a huge help for me, as this was my first desktop ‘3D’ game, so I had a lot of learning to do in terms of graphics capabilities. As in, I was able to get the game to run on my computer which is a pretty nice MacBook Pro .. but not everyone else’s.

The beta tester feedback was huge, I was able to get the game running on old PPC macs, various linux netbooks, and who knows what else .. as long as it had a somewhat reasonable 3D card. I changed the memory requirement for graphics from about 200 MB down to < 64MB. Without any noticeable reduction in graphics quality even in HD video modes. In fact, that reduction changed the loading time on my computer from 5-8 seconds down to about 1 second 🙂 Anyway, I think I'm going to take a nap. It's been a long week, and I really appreciate everyone who helped me get this game put together. Give it a whirl, and thank the beta testers!

Seahorse Adventures – Loading TGAs (and more)

Tuesday, January 5th, 2010

Here’s a screenshot.  This is my Ubuntu desktop of my work on a new iPhone game.  Take a look at it nice and big.  Below I’ll explain all of what is going on …

bsa_dev1

In short, I’m working on porting my pyweek#3 team entry to the iPhone.  Here’s the details:

  • Top left, you see Kate, my text editor.  You’ll notice I’ve got -what appears- to be python.  But that’s actually tinypyC++ code!  My converter still has some rough edges, but it’s starting to get pretty good.  If you weren’t looking to closely you might mistake that for ordinary python code!  (In fact, it should be 100% python parser friendly.)  You can see how I have to use a touch of annotation to make it all go.  But for the most part, the types get inferred.  (The C++ outputted is about 2x as long, so I’m saving a ton of keystrokes!)
  • Top right, you see the level being painted.  It isn’t all working yet, but those are the basic tiles.  Interesting bit about loading the level, when I created this game I used my own level editor and library I made with pygame.  To save on disk and time I save all the levels to .tga files.  Since I’m targeting the iPhone I need an easy way to read the data from .tga files.  I don’t have SDL_image available, so a friend pointed me towards this great site.  It appears to have some awesome bits of code, including very simple and easy to use image loader that can load tga/png/jpg/etc.  I think it has the most painless interface I’ve ever seen for a C-based image-loader.
  • Bottom right you can see me working on tinypyC++.  As I’m working on BSA, I’m always finding new bugs in it.  Lately most of the bugs have been of the “add more graceful error handling” nature.  tinypy will point out what line (and character) an error happened on, but with a bit of extra work I’m able to add in some coherent error messages to tell the user what is going on.  In this case it was to inform the user of an undefined module name.
  • Bottom left you can see the startup of the game.  I’m using irrKlang for all my  game audio now.  It is not open source, but it’s “free” to use for free games, and the price is quite reasonable for commercial projects.  irrKlang is not portable to the iPhone yet, so I have to have a separate driver for my iPhone audio.

And that’s it for today’s report!

-Phil

MySql 5 weirdness ..

Tuesday, April 21st, 2009

So, a user was having some issues with their ranks being calculated totally wrong.  They were seeing numerous games against themselves.  Turns out this was the issue – MySql treats varchar() text with trailing spaces the same as varchar text without trailing spaces.  So the name “philhassey” is the same as “philhassey ” or “philhassey     ” in a ‘select * from ip_stats3 where name = ?’ type of query.  Here’s a MySQL session below to demonstrate.

mysql> describe ip_stats3;

+———+————-+——+—–+———+——-+

| Field   | Type        | Null | Key | Default | Extra |

+———+————-+——+—–+———+——-+

| name    | varchar(32) | NO   | PRI | NULL    |       | 

| data    | longblob    | YES  |     | NULL    |       | 

| s_rank  | int(11)     | YES  |     | NULL    |       | 

| s_win   | int(11)     | YES  |     | NULL    |       | 

| s_value | int(11)     | YES  |     | NULL    |       | 

| s_total | int(11)     | YES  |     | NULL    |       | 

+———+————-+——+—–+———+——-+

6 rows in set (0.00 sec)

 

mysql> select name from ip_stats3 where name = ‘philhassey ‘;

+————+

| name       |

+————+

| philhassey | 

+————+

1 row in set (0.00 sec)

 

mysql> select name from ip_stats3 where name = ‘philhassey’;

+————+

| name       |

+————+

| philhassey | 

+————+

1 row in set (0.00 sec)

 

mysql> select name from ip_stats3 where name like ‘philhassey’;

+————+

| name       |

+————+

| philhassey | 

+————+

1 row in set (0.00 sec)

 

mysql> select name from ip_stats3 where name like ‘philhassey ‘;

Empty set (0.00 sec)

 

mysql> select name from ip_stats3 where name like ‘philhassey%’;

+————+

| name       |

+————+

| philhassey | 

+————+

1 row in set (0.00 sec)

Customizing WordPress

Wednesday, November 28th, 2007

As far as code goes, I’ve usually been a do-it-yourself kind of guy. However, I’ve been so impressed with WordPress I’ve actually used it to implement four of my sites in the last couple months. WordPress is an easy to use, smart piece of blogging software. It really seems to have just the right set of features in its default installation to be useful for most cases out of the box.

However, there comes a time when what’s given just isn’t enough. Thankfully, its got an extensive collection of plugins! Everything from blog aggregation to voting to forms to photo galleries. Not all plugins are great, but usually if you check out a few you can find one that will do what you want.

That is .. until you want something different! I might be hosting the 10th Ludum Dare compo. For that I needed some special features for collecting ratings of contestants entries, showing screenshot grids, and giving trophies to entrants.

Ludum Dare Screenshot Grid

WordPress comes with a fairly nice themes and plugins system which made it possible to add all those features to my blog without modifying the core-code of WordPress. Frequently I would implement a feature, and after learning more about WP internals, I was able to refactor it to be simpler by using more of the existing WP framework.

It wasn’t all fun and games, though, the learning curve was a bit painful for some features. A couple WordPress features (like table deltas) seemed a bit too clever (not to mention broken) for their own good. Fortunately, I was able to get away with not using those features.

The other challenge I had was when I came across a bug in WordPress. I did my best to figure out the bug, but it appears to be some strange javascripty thing which was beyond me. So I’ve reported the bug, and according to their schedule, it probably won’t be fixed for about six months. Ah well, at least it’s pretty minor.

All that said, it has been a fairly enjoyable process. I’ve been able to develop more site in less time by working with the WordPress plugin system. I have *considerably* less code to maintain, since I’m only responsible for the plugins I’ve made. Had I created this from scratch, I wouldn’t have gotten even half as far given the amount of time I invested.

This just in, the WordPress spell checker chokes on the word “with” .. weirdness!

industrial strength bug zapping!

Wednesday, September 12th, 2007

I’ve been using open source software for well over 10 years. Here are some stories of times when I’ve had brief interactions with communities regarding “bugs”.

Back in 2001, I tried to submit a “bug report” to the php project – I had discovered that in certain cases a function worked slightly different than advertised. My report was dismissed with an RTFM and flagged as “Bogus”. I was a bit put-off by their response, as I had RTFM (and demonstrated that clearly in my report.) The problem with my report is that I was complaining about an edge case that wasn’t really a bug. It just wasn’t worth their time to really understand what I was getting at.

In 2003, I submitted a bug report to the dosbox project – I discovered several games that I wanted to work with the software that didn’t. I offered my help in fixing the bug. My report was greeted with open arms, my offer to help fix the bug lead the maintainers to give me tips on how to troubleshoot the issue. Not being an accomplished ASM debugger I wasn’t able to get very far in my work. They saw that I had given it “the ol’ college try” and were happy to fix it for me. (I decided to sweeten the deal for them with a small donation to the project.)

Earlier this year, I had some trouble with rsync. I was losing connections part way through the backups. I realized that it probably wasn’t an issue with rsync but with my connections. I read over all the help information and found nothing addressing my issue on the rsync website. After talking with a few of my sysadmin contacts, they were able to help me track the issue down to a problem with my ssh setup (which was using default settings.) I was then able to write up an informative message to the rsync mailing list suggesting an addition to their FAQ which I felt would save people in similar situations hours of research. They updated the FAQ with the information I provided.

A bit later in this year, I submitted a small patch to rsync fixing a trivial problem with building in a certain hosting environment. This message went ignored. Since it was a one line fix for a problem which likely only happens to me, it seems that may have been the right response on their part. (Especially since, thinking over it, my patch may very well be the wrong thing to do for most environments.)

All that to say, from my experience it really seems that the more I put into reports and patches the more likely I am to see results and a positive response.*

*read this if you haven’t: How to Report Bugs Effectively