Phil Hassey - game dev blog
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

Archive for August, 2008

Repeat: I am going to be at PAX!

Wednesday, August 27th, 2008

Yeah, this is basically a repeat of last week’s message.  But I am going to be at PAX.  I am going to be wearing Galcon t-shirts the whole time.  I will be there Friday, Saturday, and Sunday.  I will be helping out at the Brawndo booth from time to time.  I will probably be hanging out with the Garage Games folks a bit too.  If you can’t find me, ask one of those booths 🙂

See you at PAX’08 !!

Lamp work – Phil makes a marble!

Wednesday, August 20th, 2008

Around a month ago I was in Lake City and I got to do some lamp work at Dave Jordan’s studio, and make my first marble!  And then I made a few more 🙂

I had a great time!  Next time I’m out there I will be doing it again 🙂

iPhone dev & bodily destruction & PAX’08

Wednesday, August 13th, 2008

So I’ve been doing iPhone dev for about 2 months straight now.  Just yesterday I sent my latest Galcon update to Apple.  This update includes multi-player wicked-awesomeness.  It will be available whenever Apple approves it.  I plan on doing a bug-fix update a week or so later to resolve any odds-and-ends that come up.  In the meantime, I’m trying to recover from my 2 months of solid coding.

The iPod has taken its toll on me.  I’m about five pounds heavier and I’ve lost any definition I pretended to have.  Time to get back into shape!  We’ll see how that goes.  I’m trying to reserve a few hours a day for “not sitting in a chair.”

In other news, I’m attending PAX’08 in a couple weeks.  Look for the guy in the Galcon t-shirt.  I’ll also be hanging out with the Garage Games and Brawndo folks a bit.

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!

Comparing python to C …

Wednesday, August 6th, 2008

Well, I’m about 1/2 done with adding multi-players to Galcon-iphone.  I figured I’d stop for five minutes and note down some things I noticed during my porting experience.  Obviously, C and python are different, but here are a few of the ways I’ve FELT the difference.

  • C doesn’t have garbage collection.  I’ve managed to avoid doing much manual GC by having everything in a single big struct that keeps the entire state.  The only place I use malloc/free is when I’m downloading web data.  So it hasn’t been a big deal for this project.
  • Speaking of web data, C doesn’t have a built in urllib.  I wrote my own awful HTTP 1.0 page fetcher.  On the plus side, I was able to make it work *exactly* how I wanted it.  No threads, non-blocking 🙂
  • Although not “built in” I found enet, which was a thin layer above UDP for networking.  I found this incredibly much easier to use than python sockets were.  (Yes, I could have used some other python lib, but I didn’t.)
  • C is really fast.  Thankfully, since I originally dev’d Galcon in python, I was “forced” to get my algorithms pretty good to keep the speed reasonable.  By porting everything to C, I’ve now got amazing speed.  I think I could host 100+ servers on a single CPU easily.
  • Managing strings in C is an ordeal.  It’s just not pretty, so I try to avoid doing much with them.
  • OpenGL seems pretty painless in C.  I haven’t done any notable OpenGL stuff in python, so I can’t really compare the two.
  • No exception handling makes me have to code things more carefully.  In python, I could parse an incoming networking packet, and just wrap it in a “try: (parse stuff) except: pass” block.  If something was bad about the packet, it would just move on.  In C, I have to check everything carefully so that I don’t create some kind of segfault by accident.
  • In my case, serializing data is easy in C.  I can just save a structure to a file (or send it in a net packet) and load it back later.  In python this is much more complicated.  (Especially since Galcon-shareware isn’t pure-python.)
  • By using C, I don’t have to deal with some awful FFI.  That is a HUGE time-saver.
  • I must admit, I LOVE python’s indents.  But I also must admit, now that I’m back into C coding, I don’t miss them as much as I thought I would.
  • I still dislike header files.  I wish C magically generated them or something instead of making me write them.
  • I learned about writing tests in python.  I’m doing that in C for my networking code.  I run the tests as part of my build process, and it saves loads of time by catching all the bugs for me 🙂
  • Automatic type checking is sort of nice.  Having the compiler tell me I didn’t do anything incredibly stupid is sort of nice.  (Although in some cases, it can get a bit annoying.)

Well, that’s about all I can think of for now.  Draw your own conclusions.