Phil Hassey - game dev blog
Phil Hassey as Wolverine
"What kind of
arrogant jerk
has a website like this?"

Archive for the 'development' Category

Ducks-n-Macs-n-Dares

Friday, December 5th, 2008

Well, I spent the last week putting ducks in rows. Mostly dealing with the business end of Galcon stuff. It has been a pretty long week, but I can’t complain since having lots of people interested in my games is always a good thing!

On more dev-side note, I purchased a previous-gen MacBook Pro yesterday. I hope it arrives soon. I’m getting this because I would really like to consolidate my development onto a single machine. Using Parallels desktop, I’m really hoping to be able to do my Linux, Mac, and Windows dev all from the comfort of that one laptop. I’m starting a new game project this coming week, so I’ll give it a real try for a month and see how it goes. If it doesn’t work out as well as I hope, well, at least I’ve got a new laptop 🙂

On a “if you are a game dev you better show up” note, Ludum Dare #13 is this weekend. You get 48 hours to make a great game! I’m quite looking forward to this one 🙂

Cheers!
-Phil

Stuff-n-maintenance-n-stuff stuff stuff ..

Wednesday, November 26th, 2008

So this past week or so was pretty wild. I was doing all “behind the scenes” stuff mainly. Sometimes these sorts of things are kind of weird to do, because the main goal is to do them in such a way that nobody really notices that I did them (so the point of this blog post is to point out the invisible so I can FEEL like I accomplished something in the last two weeks) … Anyway, they (supposedly) had to get done so that everything can keep moving along without collapsing.

  • Fixing up the themes on galcon.com so that all the pages actually use the same header/footer and everything. I also restyled the whole site so that all the pages use the same style.css file. (Previously each part of galcon.com had its own stylesheet. Weirdness.)
  • Moved to using a real mailing list (it took me forever to decide!) But in the end yourmailinglistprovider.com seemed to be the ticket. This is a pretty big step. Previously I was running some script which took a very long time to send out the newsletter and made me very nervous.
  • Updated my game server with init.d scripts so that should my server get rebooted, the game servers will automagically restart. Previously, well, if the server got rebooted, no games would come up.
  • I also migrated www.imitationpickles.org/galcon/ to point to www.galcon.com .. So now all the “classic” Galcon customers get to see my new swell site. This is also good for search engine stuff, so galcon.com has a nice position now.
  • While I was at it, I set up google mail for galcon.com .. So now I can e-mail in style!
  • Upgraded the maze so that each user’s “save state” is a single database record. Previously I saved the full history of a user’s game, so a single user could have hundreds of records if they were wandering around. This table got to around 362,525 records and it was making those pages go pretty slow! With a single record per user, I’ve only got 1371 records in the table and things are nice and fast again. (BTW – Maze 2.0 is up, you can create your own separate adventure mazes now!)

On a more “in your face note” I did add in a games section to galcon.com. I’m sort of excited about this, because it makes it look like I’ve actually made more than one game 🙂 More importantly, it makes it really easy for me to put up a quick page for small games. I’m always making new mini-games for game-dev compos or whatever that don’t necessarily deserve their own “special custom website” but I still want people to be able to get at them. This will make that possible. It also makes it easy for me to link to some of my game-dev friend’s games.

Laters!
-Phil

The Maze of MADNESS!!

Tuesday, November 11th, 2008

Hey, so I just put up a new game on my website called “The Maze of MADNESS.”  Check it out.

The interesting thing about it is that I didn’t create any of the game.  I just created a web based interface for people to create this adventure game on.  I made it for a 48 hour contest this past weekend, and the other contest people have already created 45 rooms, 40 new items, and 152 actions.

It should be interesting to see how long the game lasts before it caves under the weight of itself.  I’m quite interested in trying out user-content games.  So if this even marginally works out, there is a good chance I’ll be doing more in the future.

On another tech note, I used AS3 for the pixel art editor in the game.  I decided on this instead of haxe, because it seemed there was a lot more random bits of information on the internet about AS3.  I managed to get it to work without using a .mxml file.  The tutorial I followed was this.  I also got lots of random snippets from the internet.

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

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.

Not enough errors??!

Monday, July 21st, 2008

# urpmi mysql
installing mysql-5.0.45-8.1mdv2007.0.i586.rpm from /var/cache/urpmi/rpms
Preparing…                     #############################################
1/1: mysql                 #############################################
080721 13:04:46 [ERROR] Error message file ‘/usr/share/mysql/english/errmsg.sys’ had only 469 error messages,
but it should contain at least 472 error messages.
Check that the above file is the right version for this program!
080721 13:04:46 [ERROR] Aborting

The really rough bit is now my mysql install doesn’t work anymore 🙁  Blah.

iGalcon – OpenGL ES for all!

Monday, June 16th, 2008

Since I’m too lazy to switch my monitor cables back and forth to my mac, I VNC onto my mac mini for dev.  Which, since that’s kind of a pain, and the whole app compiling process is sort of slow .. well .. I figured I’d port my code to OpenGL in the safety and security of my normal linux environment first.  After I got it working using the normal OpenGL glBegin / glEnd stuff, I switched the code up to use the OpenGL ES style vertex buffers.  Here’s a screenshot:

Next up, see if it runs on my ipod …  For the easily disgusted, I should mention that I’m rendering the text using some old BIOS font using GL_POINTS.  That seemed less mentally taxing than trying to get textures working already.

Dear lazyweb: tell me about python telephony ..

Tuesday, May 27th, 2008

I’m looking at doing some telephony work in the next half year.  I’ve read a bit about asterisk and it looks like it has come a long way in the past few years.  I notice that there are quite a few ways to integrate it with python AGI, etc.

Anyone care to spout some opinions?  How good is python support?  Is one of these packages way better?  Got any tips on how to get started playing with this stuff as quickly as possible?  Any dire warnings you care to pass on?  Are there any alternatives to asterisk I should also be considering?  Are there any reasons why I would want to use a language other than python for my telephony work?  Tell me everything!

Thanks lazyweb!
-Phil