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

Archive for the 'javascript' Category

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.


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!

Watermelons on facebook

Thursday, November 8th, 2007

Watermelons was a pygame game made in about 8 hours one evening on the #ludumdare channel. Since then I’ve ported it to flash using haxe. This past weekend I integrated it into the facebook API. You can check the app out here. My server-side high score system was written with PHP.

The integration was somewhat challenging, since I was using a language not supported by facebook (haxe) and my integration involved using flash, which has some restrictions when used within FMBL. To work around these things, I had to embed my flash object within an iframe and then pass high scores back through my main web script in the browser window (instead of as a background request) in order to be able to use all the facebook notification features.

So far (after about 5 days) the app has about 160 users, which isn’t very many. But I suppose it’s not bad for my first shot at writing a facebook app.

“The next version should be more AJAXie.”

Wednesday, October 24th, 2007

My business partner and I were recently discussing the next edition of our healthcare web platform. Instinctively, Akash said that, “The next version should be more AJAXie.” I replied with a, “Sure we can do that… what exactly do you mean?”

We jumped into LiveMeeting where Akash showed me the web based CRM software he was using.

“See how when I mouse over these items, a menu pops up,” said Akash, “Can we do that?”

“Sure,” I said, “though that isn’t AJAX.”

“Ah. Well, see how this form has a tabbed interface. Is that AJAX?”

“Nope,” I said, “but we can do that too.”

“Well,” said Akash, “how about this, when someone requests a report and it displays a ‘Please Wait’ note on the screen while the report is being generated. Is that AJAX?”

“Maybe,” I said, “though again you could do that without AJAX as well.”

“Ahh,” said Akash.

I first used AJAX-like techniques in 1998 in a web based version of Galcon. Since then I haven’t. Haven’t had the need for it. And as this conversation realizes, even the term AJAX is unclear to fairly technical people – it has become a synonym for “nifty”.

language hangups

Tuesday, September 18th, 2007

I’ve spent a bit of time fooling with javascript this past weekend. It really is okay, but I came across a few scoping gotcha. Scoping defaults to global, so

function fnc1() { a = 5; } fnc1(); alert("a: "+a);

Will show you that a is 5. I’m more used to languages that default to a local scope. To get variables into a local scope in javascript, this example should be written as:

b = null; function fnc2() { var b = 5; } fnc2(); alert("b: "+b);

Will show you that b is null – as expected.

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