Phil Hassey - games, tech, web, stuff, biz, and bilge
Phil Hassey as Rambo
".. I've been there,
I know what it's like,
and I'll do it again if I have to."

Galcon Multi-player on the iPhone?

July 23rd, 2008

So .. here’s a game design question for you to ponder.  Everyone, of course, says it would be awesome.  But why?

Here are the pros I see:

  • You could play against your friends who are in the same room as you!  Yay for LAN parties!
  • You could get ranked against many other Galcon players!

Here are the cons I see:

  • You can’t chat, so you might as well be playing against bots.  (Playing against complete strangers seems mildly pointless.)
  • You can still compete for rankings in the single player game if I set it up to score certain rounds, etc.

Anyway, I could use some feedback.  I’m likely going to be adding the MP game, but I need to know WHY, as that’s really important to how I design the interface.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Not enough errors??!

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.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Galcon + iPhone = AWESOME

July 18th, 2008

Hey, I’ve just finished porting Galcon to the iPhone and it’s now in the App Store!  You can read about it here!

I don’t *really* have anything super pythonic to say about the porting experience, other than .. I probably wouldn’t have bothered to do it if I hadn’t been hanging out at pycon and having people show me their iPhones and telling me how I should totally port Galcon to it.  So thanks to those people for getting me started!

The link above is where all the fun is, but just so this post isn’t all boring text, here’s a screenshot:

And if you want to know more about the porting experience, I’ve been blogging about it.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

iPhone app store - goofy tip #2

July 18th, 2008

When uploading your app, be sure to upload JPGs for your 512×512 icon and for your screenshots.  I tried uploading PNGs, but it wouldn’t allow those.  So I figured I’d try TIFs .. which worked!  Except when my app showed up on the store my icon was a “broken link”.  So I’ve re-uploaded using JPGs.  Hopefully their server’s will get that update out soon, it’s sort of embarrassing having the one broken icon in the store :(

(And for anyone who can’t wait another moment, you can buy the app now in Games > Strategy .. it’s just got a broken icon.)

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

iPhone App Distribution: Code Signing Identity

July 16th, 2008

Here’s a tip to any people trying to launch an app to the store:  while setting up your Distribution profile at some point it says to put in “iPhone Distribution: My Company” in the “Code Signing Identity > Any iPhone OS Device” line.  It -seems- as though you’re going to get a list of items and you can select one.  But actually you have to double click on the line and then TYPE in the identity.  And then you’ll probably have to quit X-Code and start it again for things to get worked out.

Anyway, I spent an hour figuring that little oddity, so I figured I’d share the tip.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Shoulder Pads == Manhood

July 14th, 2008

(the result of my participation in a 30 minute drawing compo “Shoulder Pads”)

A few people have mentioned that the purple pants aren’t quite manly enough.  Shows what they know.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

iGalcon - pretty backgrounds and lots of tweaking

June 28th, 2008

I managed to assemble a few backgrounds by grabbing some great photos from here.  I also did about 50 million little tweaks to the game, making it “almost done”.  (Meaning, there is probably quite a bit of even finer detail work yet, but not as much as their used to be.)

This version of Galcon introduces a new 3-way scenario.  This scenario the bots continuously choose which player to make a temporary alliance with.  They always attack the strongest player other than themselves.

I also created a new bot that has “redirect” capabilities.  I originally worked on doing a fairly complex one that I had done before, but found that it didn’t seem to work.  Probably because it was somewhat complex and I was doing something wrong.  I took a break and came up with a very simple variation on the fairly simple bot I use for the rest of the game.  It works great :)

On the iphone specific front, I keep having to deal with gravity every step of the way.  I’ve added several other status items on the screen which I always orient with gravity.  These items are in the corners of the screen, so I have to temporarily place large planets in those corners during the level generation to ensure that none of the final planets end up obscured by a status icon.

I’m not sure if I’ll have it done in time for “launch day” but I hope to be pretty close :)

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

iGalcon - iForget what this post was going to be about

June 26th, 2008

Hmn .. I know I spent some time on Galcon today .. Here’s a screenshot to prove it:

Ah yes .. that was it.  I’ve got menu transitions working very nicely now.  This menu appears when you come back to Galcon after using another application.  You’ll also notice that I’ve got the menu “gravity sensitive” along with the numbers.

There are a few iphone points I haven’t figured out yet.  One is when you suspend the device with the “power button” and then start the device back up.  I haven’t found much clear documentation on if my app will get any indication of those events happening.  Secondly, when I start the game, the SoundEngine class provided by Apple turns off any currently playing music.  But when I double tap “Home” and start the tunes back up, the tunes turn off my sound effects.  I’m not sure if that’s quite what I want, but I guess that’s sort of a minor point anyways.

All in all, the main thing I’ve got left now is making the difficulty levels and various missions.  Should be fun!

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

iGalcon - main menu + confusion over save / restore state

June 25th, 2008

The good news: I’ve got the basic layout of my main menu decided on. It isn’t really functional yet, but here it is:

I’ve also got the game transitioning between several states and prompts now. I haven’t coded in the difficulty levels or the various missions quite yet, will be doing that soon. I’ve also got it saving and restoring game state when you quit the game and start it up again. (That way, if you get a phone call you can resume your game exactly where you left off after talking …)

Here’s the trouble: I can’t figure out how to write and read files on the iphone. I want to do this with C code:

void gc_engine_save(gc_game *g) {
FILE *f;
int ver = GC_VERSION;
f = fopen(”igalcon.sav”,”wb”);
fwrite(&ver,sizeof(int),1,f);
fwrite(g,sizeof(gc_game),1,f);
fclose(f);
}

And be able to load it later, etc .. However, the iphone gives me a EXC_BAD_ACCESS error .. I guess because I can’t just write to just anywhere. What would be nice is if I knew what path to write to, however my brain has found the API reference a bit huge for a noob to the whole Apple way of doing things.

Rumors I’ve heard are “save your stuff to the Documents folder” or “no no, save it to the Library” or “no, you have to save it under $some_folder/Galcon/” or “it’s best to save your settings via some NSSettings …blah blah” . I’m sure I could get it working one of those ways, I just want to know *which* one I should use. And maybe a link to an example. Basically, what I want to do is in my ObjC code is construct a base path, send it to my C code and be able to do something like char fname[256]; sprintf(fname,”%s/igalcon.sav”,base_path); And then carry on with what I was trying to do ..

And .. if everything I’ve just said sounds like a really bad idea, I’d be thrilled for some guidance on this point :) In the meantime, I think I’ll get some more bots working and whatnot. I’m trying to decide if I should use tinypy or not for some of the code, but at present, I’m leaning towards just coding up my bots / missions in C code for the iphone.

P.S. while you’re at it, if someone can explain what the purpose of these methods of UIApplicationDelegate and how to make them happen on my ipod touch, I’d really appreciate it.

Responding to a Change in Active Status

* – applicationWillResignActive:  optional method
* – applicationDidBecomeActive:  optional method

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

iGalcon - real men use Multi-Touch! Rah!

June 19th, 2008

The ever slightly changing screenshot - demonstrating multi-touch (I’m selecting the two green planets, and I’m about to send a fleet to the red planet):

I also optimized the OpenGL code quite a bit, so it’s all fast .. except for the fonts, which I can still do a bit of work on yet.  But it goes full speed with any number of ships and explosion particles on screen now :)

I also implemented multi-touch support in the game, which was a bit of a challenge.  See, usually when I make games, I’m only thinking about a single mouse pointer or whatever.  So, err, imagine now that you’ve got unlimited mouse pointers trying to play Galcon together at the same time.  And then imagine that you’ve got no sure way of knowing what clicks are coming from which mouse.  (The iphone docs are sketchy on this point, they say that the UITouch object will remain the same throughout the life of a touch, but then go on to say that you better not save a pointer to it.)  I might have misunderstood something entirely about that bit, but whatever.

As it turns out, it was easier to deal with MT if I just handled the events as they came and didn’t try to keep track of what touch was connected to which finger.  After a lot of messing about, and fixing a bunch of bugs in my own code, I’m now able to handle multi-touch events!  Yay!

Anyway, for those of you with exceptionally small fingers, Galcon now supports game play for people with up to 32 fingers!  As for me, I’m doing pretty good if I can coordinate two or three at once.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Galcon   Watermelons   Dynamite   The Hairy Chestival
All content of imitation pickles (c) 1999-2008 - Phil Hassey  "we care"