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

Archive for the 'python' Category

Mailing list software or services

Monday, November 10th, 2008

Right now I send out my newsletter via a hand-rolled PHP script.  I just sent out a letter this morning and it took 80 minutes to process.  Not only does it take forever, but I am a bit concerned I might not be doing it “right”.

All that said, I’m in the market for getting some decent mailing list software, or subscribing to a decent service.

So, “dear lazy web” .. Can anyone give me a rec?  What’s good in the software or service markets?

My one “requirement” is the ability to import a CSV file of e-mail addresses every month.  And if someone unsubscribes, I want it to be smart enough not to re-add them if I re-import them.

Thanks!
-Phil

Prototyping in python

Friday, October 24th, 2008

So it’s about time to make something new here:

Instead of jumping right into the iPhone code on this one, I decided to prototype the game in python+pygame first. I’ve gotten a lot of UI glitches worked out, and I’m going to get at least one complete single player game working nicely in python before I port it over to C.

Galcon was “easy” to port to C because I had a very clear definition of what I was going to create before I created it.  Since this is a new game, I think if I define the game pretty well in python first it will save me loads of time tweaking stuff in C.

The Galcon Prize: Results!

Monday, October 6th, 2008

Hey,

The Galcon Prize contest is finally over!  Congrats to mewo for his great entry!  You can get the results package here.  This includes all entries and all datasets and all results.  It also includes some explanation on how I judged the entries, as well as the script I used to aggregate the results from the various dataset runs I did.

Now that the compo is over I’d love it if everyone who competed wrote up some postmortems about their entries, what strategies they used, and how they came up with the solutions they did.  Please post those in the forums.

Thanks again!  I’m going to try and get this added to the Galcon-iPhone rankings system ASAP 🙂

-Phil

The Galcon Prize — almost over!

Saturday, October 4th, 2008

If you haven’t put an entry together for the contest, you’ve got just a couple days left 🙂 I’ll be doing the final judging Monday morning when I awake.

-Phil

tinypy at pycon …

Wednesday, October 1st, 2008

Hey,

So .. I’m thinking about proposing a talk about tinypy at pycon.  Not quite sure what I’d want to say about it.  So, here’s my “ask the web” question:

What do you want to hear me talk about tinypy?

I could talk about anything from how I made it, why I made it, what good it is, how to use it, to .. err .. I dunno.  Whatever 🙂

If no good talk ideas come together, I’ll probably do a lightning about it again, and maybe an open session.

I also want to do a Galcon tournament of sorts again at some point 🙂  That was great fun last year!

-Phil

The Galcon Prize: mid-contest results

Monday, September 29th, 2008

“The Galcon Prize is a once-in-a-lifetime chance to improve the Galcon rankings system! Galcon is a winner-takes-all multi-player game for 2-4 players. Entries are to be written in python. The prize is an 8GB iPod Touch. Entries must be uploaded by Oct 5.”

I’ve updated the dataset with way more data … so you’ll want to download that.

Here are the mid-contest results:

 1. rafsoaken        452.44  0:20 [-407,836]
 2. codepenguin      452.42  0:20 [431,1392]
 3. mewo2            452.36  0:19 [167,1601]
 4. azbuky           451.46  0:16 [54,903]
 5. fl0yd13          450.88  0:14 [103,7400]
 6. paulatreides     449.94  0:16 [0,24990]
 7. elo              449.93  0:18 [415,1352]
 8. adamzap          446.13  0:18 [0,7]
 9. simple           445.15  0:13 [-9922,6624]
10. mithrandir       440.20  0:28 [-33,1019]
11. percent          438.49  0:14 [0,100]
12. kester           424.54  0:13 [1,502]
13. rounds           387.33  0:12 [1,10710]
14. noop             317.46  0:11 [0,0]
15. bad              224.82  0:12 [-3803,0]

So .. It looks like the results are REALLY close .. The scoring is basically a percentage of how often the algorithm guesses correctly. So all the top entries are in the 45% correct zone. This is a nice improvement over my current algorithm which is at 43% correct.

Also, be sure to to keep uploading your entries throughout the week, I’ll try and post an update every day or so with the current standings so you can see how you are doing.  I may be testing your entries against NEW data that you will not have access to, in order to test how well your algorithm handles data it hasn’t previously trained against.  So watching for updates on the results will be quite valuable.

Also, rafsoaken sent me a histogram viewer function, which I’ve added to gprize.py. Run it with -histogram to see a visual of how your numbers are spreading. I’ll probably be using that to help me decide if an entry will really “work” for Galcon.

Healthcare job opening for a pythonic PHP coder …

Wednesday, September 24th, 2008

Hey – my healthcare business is hiring! Yay!

We’re looking for someone who lives in western New York, is a pythonic PHP coder, and enjoys consulting and software maintenance.

Here’s the full listing at monster and at craigslist.

Cheers!
-Phil

The “Galcon Prize” Coding Contest

Saturday, September 20th, 2008

Hey, so I’ve never been feeling overly smart about how my rankings system works.  And quite a few of you have expressed interest in hacking on the stats data or trying to improve the ranks some way.  So here’s your chance!

Introducing The Galcon Prize!

“The Galcon Prize is a once-in-a-lifetime chance to improve the Galcon rankings system! Galcon is a winner-takes-all multi-player game for 2-4 players. Entries are to be written in python. The prize is an 8GB iPod Touch. Entries must be uploaded by Oct 5.”

Check it out, and have some fun!  🙂  If all works well, in a few weeks Galcon rankings will be considerably more-awesomer 🙂

-Phil

Watermelons for the iPhone / iPod Touch

Wednesday, September 10th, 2008

Watermelons is the ultimate fruit rescue mission game! The local watermelon tree has gone berserk and is producing fresh watermelons at an amazing rate.

You must move your trampoline at high speed in order to save the melons from splattering horribly on the ground. You get ten slip-ups before you lose your job as the Melon Master.

Includes high scores, realistic watermelon sound effects and authentic watermelon bouncing soundtrack.

Watermelons was first created in several hours using python+pygame.  I then ported it to haxe.  And then last of all, I ported it to the iPhone / iPod touch using C code.  I suppose the dev lesson learned is .. rapid prototyping stuff in python is really quick and easy.  So when I port a game from python to something else, I’ve got the whole game concept down, so it’s fairly straight forward to switch to a static language like C.  If say, the problem was not well defined, I suspect it would be harder to implement the games in C first.  (I think my statement here was particularly true for porting Galcon to the iPhone.)

Anyway, check out the flash version, and if you think it’s worth your 0.99, you can get it on the App Store now 🙂

Galcon color-blind Test

Wednesday, August 6th, 2008

Hey, I’m trying to get Galcon-iphone to work for the color-blind population 🙂

Here’s the colors I’m thinking about using. If you are color-blind can you tell me if you can discern between the colors? If not, please tell me which numbered colors you are having difficulty with.

Thanks!