Archive for the ‘Programming’ Category

This week in the news

Wednesday, October 7th, 2009

Adobe MAX is going on right now in Los Angeles, California, and while I wasn’t one of the lucky few selected to attend from my company this year (not sour grapes, I went to Chicago in ‘07 and had a blast), I have had to follow it’s updates through Twitter.

Anyway, Monday morning they made an announcement that when Flash CS5 is released, you will be able to port Flash games, applications, etc. to native iPhone apps. For a Flash developer like me, this has been a long time coming and I have to say I’m excited.

Couple this with the news that Bell (my cellphone provider) has recently confirmed they will be selling the iPhone next month, and you have someone in me who I would title as an “eager-soon-to-be-iPhone-owner”.

Here is a video showing off some of the apps for the iPhone built in Flash. I’ve already seen people coming out saying that this is a terrible idea, but I think those people are wrong and any questions and concerns they may have will surely be considered and fixed by Adobe.

Some good WP links…

Wednesday, September 30th, 2009

I am a programmer. I am NOT a designer, yet when I came up with my latest site design I was quite happy!

… but now I am bored.

I want to redesign my site in a funky, fun way that’s appealing to anyone who visits. It’s not to say that I am not proud of my site and how it looks now, I like the simple look, but I can’t help feel like I can do better…

I am also wanting to do more with WordPress. I love the the smoothness of it, but I want more…

Luckily for me I’ve been directed to some great WordPress links which I think I should share with anyone who may want them. I have to thank my friend, Brian Dunphy, for pointing them out to me. They will surely help anyone interested in WordPress development. They won’t help me a ton with my design, but I’m sure they’ll help in a bunch of different areas…

10 Killer WordPress Hacks
10 Useful RSS-Tricks for WordPress
Ultimate Guide to Using WordPress for a Portfolio
WordPress Developer’s Toolbox

A solution to my problem…

Sunday, September 13th, 2009

Earlier this week I blogged about not being able to get Snow Leopard and Flex Builder 3 to work properly together and how it had become a problem for me…

Well unfortunately I couldn’t find a solution so I decided to give something drastic a try. I had already backed up my machine once, so I knew all my data would be preserved. What I did next was do a clean install of Leopard, followed by an install immediately afterward of Snow Leopard. I then installed Flex Builder 3, and low and behold it worked fine.

I have now transferred all my old data onto my machine and am still in the process of re-installing all my old applications, but for now, I am much happier. Something in my previous configuration must have been what was causing the problem of not letting Flex Builder 3 install on Snow Leopard, but I have no idea what that was so I will let it be and just be happy I can go back to doing my work!

Pain in my snow leopard…

Tuesday, September 8th, 2009

Today, I finally got my hands on my copy of Snow Leopard. I installed it immediately and low and behold, it sucks.

It pains me to say that about an Apple product, but I can no longer run Xtorrent (no biggie), but Flex Builder won’t run either. It can’t seem to find the Java SDK. I tried a fresh install of Flex Builder 3 and due to some install errors, I can’t even get the damn thing to try to start up to give me the error anymore.

I’ve been searching tirelessly for a solution through Google, and sadly, it looks like I am going to have to go ahead and make a copy of the data on my HD, and do a fresh “install and erase” on my Macbook. This isn’t the solution I wanted to have to do, but I need Flex so that I can work, and I need to be able to work ASAP.

I have to throw out a big “fail” for Apple here… and I am not happy about this at all…

Portfolio Updated – That’s So Weird

Tuesday, August 25th, 2009

In January, shortly after I returned to work from my Christmas vacation, I was informed by my boss that we had landed a contract with Halifax Film to do some game development and that I would be the guy who would be working on it. This meant two things to me: number 1, I’d be working downtown Halifax, which would prove to be an experience all it’s own, and 2, I would be getting to work in games, my first real chance since the mess that was my first job, but is the reason I had originally gotten into programming.

I’m a big game nut, but I don’t consider myself a “hardcore” gamer by any means. I’ve recently been playing a lot of casual games, and most nights you can find me having a quick match of FIFA09 on the XBox 360, but that’s about it nowadays. Either way, I was pretty excited to get the chance to build some games.

The games were built in Flash and ActionScript 3 and can be played by clicking on this link. You can also check out a write up on my portfolio, though most of that information will be in this post. The games were built for a new show called “That’s So Weird TV” a sketch comedy show aimed at tweens, set to premiere on YTV in Canada later in 2009. I also built a couple of videos players, but this post is all about games, so I’ll get to it.

The first game I worked on was called “Udderly Insane“. In in, you play a receptionist (who happens to be a cow, notice the clever, punny names on all these games), who has to answer phones as they ring, much in the style of the classic “Whack-A-Mole” game. You can also put the phones on hold, and if you manage to have all the phones off the hook at the same time, the cow will freak out, and the user gets to see a great “freak out” animation and a scoring bonus.

Next up was “Monkey Business“. Almost any Flash game site will have a game like this one, where objects drop from the sky at random locations and you have to catch them as they fall. In this game, you’re catching objects as a monkey, with other monkeys sitting in the background on type writers. In the “see-no, hear-no, speak-no evil” theme, each of these monkeys has a different visual attribute, one wearing sunglasses, one listening to headphones and one chewing gum. There’s also another monkey in the background on a chair who is the “head writer” monkey. The idea is that these monkeys are writing the script for the “So Weird” TV show and as you catch objects you inspire the writers to write a better script, making the head writer monkey get more and more excited as he reads what the monkeys are writing. As I mentioned, this game has been made about a thousand times before, but I think the graphics we had (from a great graphics team) really make it stand out.

Next up was a game called “Polar Prima Donnas” and was like nothing I’d ever seen before. When I read the game design doc I thought there was no way it would work as a game (though the “Udderly Insane” we used was the third version I built, and I thought the first one was amazing), but it ended up being my favorite game to play of the bunch. The premise is that you’ve delivered the script the monkeys have written, but the light and camera operators are suddenly sick and it’s up to you to control both. On top of this, the two Polar Bears acting in the sketch are camera hogs, always trying to steal the spotlight from the other one. As you use the mouse and keyboard (arrows or WASD keys) to control the spotlight and camera to focus on the bear talking, you score points by lining everything up. What makes the game fun is that in the middle of one bear talking, the other bear comes out and interrupts him and you have to move the camera and lights to the now-talking bear as the other bear walks off the stage. That bear then walks out somewhere else and the cycle repeats. In addition to this, if you line up the camera and light perfectly, you can press the mouse button down to “globally warm” the bear who is talking. If you manage to heat the bear up the full way (there is a thermometer that shows up and the bear gets more and more “red” and starts sweating profusely) he will “blast off” of the screen and you score a bonus. A very fun game I encourage you to try!

The next game I built was called “Broadcast Gerbillism“. In it, you use the V, B, and N keys on the keyboard to place tubing, trampolines and cannons into a tube based system that “electrogerbils” are running through to deliver the signal to the viewers television sets. The game is very “Lemmings” like, and I really enjoyed building it, not only because I used to love the Lemmings games, but I built what I consider to be a very strong tile-based engine for the game to operate on, and it’s something that I can continue to use in my current projects if need be. There was quite a bit of debate in the making of this game, as many people found it “too hard”. I remember growing up, every game was pretty much impossible (hello, Ninja Turtles for NES), so I was of the belief that the game was not too hard. In the end I didn’t win out, but we did use one of my ideas for the game, and I think it’s probably the best idea (if not the most fun) idea I had. I suggested that when the gerbils “die”, they become ghosts, full with a halo, angel wings and a harp and they float off into heaven. The graphic guys did an awesome job making the gerbils and they turned out great! Definitely an awesome game. Oh! The background track is amazing for this one…

I saved “Cut The Cheese” for last. From the start it seemed like a puzzle game without a lot of direction. I think puzzle games are the hardest things to think up, so I really applaud games like “Bejeweled“, because it’s so simple, but it works. The idea for this game was that you would be cutting together the terrible mess the polar bears made to make a watchable sketch. The game would be something like “Tetris” and a generic puzzle, where you’re trying to fit the appropriate pieces into their corresponding slots. It was a tough game to build, and I won’t lie, it’s tough to play (not the same as “too hard”), but I was only asked to build it. We tried to make it the best we could, I think that if we had more than a couple weeks to build it we really could have had something, but unfortunately this is how programming goes. Don’t know why I saved the negativity to the end.

The only real problems I have with the games are the lack of consistency with the controls (I believe all truly casual games should be mouse only, just something that bothers me) and the instructions could have been done better, but on deadlines, sometimes these things are tough to do.

All in all it was a great experience at Halifax Film, and has allowed me to move on to building more bigger and better games in my everyday job at theRedSpace. Be sure to check my site and follow me on Twitter to keep up and get the news when my next games come out!

Some great Box2D tutorials

Tuesday, August 11th, 2009

As a Flash developer, I’ve always been interested in learning a physics engine. It’s no secret that Box2D is considered one of the best physics engines around for any language, and there is a port to ActionScript 3.

What’s even better are these tutorials, which go over a nice introduction to Box2D in Flash, as well as a great tutorial on how to create a Peggle (another one of my beloved casual games) clone!

Anyway, I thought this was well worth a blog post as these tutorials have really helped me out and I believe they can do the same for others.

I may have a problem…

Monday, July 27th, 2009

Hi,

My name is Luke, and I have a problem…

I’m addicted to casual games.

At work a few months ago, my company decided that we wanted to get into the casual gaming market. At theRedSpace we’ve been interested in getting into game dev for quite a while now, but nothing had really materialized. When I heard the word “Casual Game” I thought of crappy Flash games that I would see everywhere on sites like addictinggames.com, which I never really cared about. However, I started to think about a site like miniclip.com, which I know I have spent quite a bit of time at in the past. I realized then that the Facebook application for Jetman was ridiculously popular amongst my friends and I, if only for about a month or two.

I never thought there would be a part of me that liked casual games (I’m more of the EA Sports game ilk, as my roomate and I have heated battles daily playing “Fifa 09″), but I started to realize that maybe I had a problem, and that these “casual games”, were something I, and others, secretly loved.

There was no doubt about it though when I was told to take a look at “Plants vs Zombies“, by Popcap Games. I played the demo and was hooked. I wasn’t the only one. It has recieved rave reviews from just about every review I have read, and is now being ported to XBox Live Arcade, and I wouldn’t be surprised to see it come out for the iPhone, as I believe it would work perfectly on that platform. The game is a simple twist on a typical “Tower Defense” style game, with great (and hilarious) art and very simple, but ridiculously addictive gameplay.

Screenshot of Plants vs Zombies

Screenshot of "Plants vs Zombies"

These games are everywhere right now. Popcap isn’t the only major portal to sell these games. Big Fish Games has a truckload of great titles that I would love to be able to play. There are a bunch of sites like these, some sharing titles, some with exclusive titles for sale at prices that are more than fair! So much so that Casual Gaming is a multibillion dollar a year industry, and I heard the other day that gaming in general as an industry is now bigger than the entertainment industry as a whole! That’s pretty crazy if you ask me, but with so many different platforms, as well as being able to leverage these games using social media, it really shouldn’t be that big a surprise to anyone.

I do have some great ideas at the moment (agreed upon by co-workers and friends), on what kind of games we can build here at work that would not only sell, but would be fun to play, but there are two major problems for me personally when building these games. First off is being able to “beat” these other games in terms of what we can offer. Being relatively new to the realm of game dev, it’s very easy to come up with a game idea and develop it, but finding the “hook” that addicts people is a whole other beast. The other major problem, obviously, is being able to step away from these games for long enough to build ours.

Flash Library Symbols in Flex

Monday, June 29th, 2009

Currently I am working on some games for my full time job with theRedSpace. The team I am a part of decided that what would be best is that we go with Flex (now Flash Builder) rather than Flash. Now I am by no means “afraid” of Flex, but as a very visual person I prefer to program in Flash, games especially. The main reason for this of course is because in Flash I have my beloved library where I can build my Movieclips to my heart’s content.

So the problem for me was “how can I use my Flash symbol inside my Flex project easily?”. At first I was thinking about simply loading external assets, but I then would have about 50 or more asset SWFs that I would have been trying to manage, and for me, that just wasn’t an option. I thought next about using the “Embed” meta tag to embed the SWFs and then use the symbol attribute to grab the clip I wanted by simply marking my Movieclip symbol for export into ActionScript in my Flash library. I learned quickly though that this would not be an option as when I bring a clip in through use of the embed tag that my code in the timeline is stripped (I don’t like putting code in the timeline, but for my simple stop() and gotoAndPlay() commands I really don’t mind it).

So I was back to where I started. Luckily I came across a great tutorial online (can’t find the link, but when I do I will post it here) that mentionned using the getDefinition() function to grab symbols from library symbols in Flash. The code is actually very simple. You just load the clip using a normal loader, you then use the getDefinition() function to grab the library object as it’s own class and then create an instance of the class.

Here’s a very quick and dirry example to give the feel:

var loader:Loader = new Loader();
loader.addEventListener(Event.COMPLETE, _loaded);
loader.load("theswf.swf");

function _loaded(e:Event):void
{
var skinClass:Class = e.target.applicationDomain.getDefinition("ElememtClassExportName") as Class;
var clip:MovieClip = new skinClass() as MovieClip;
this.addChild(clip);
}

Of course, here this example assumes that the element you’re trying to load in the is being exported to ActionScript as “ElementClassExportName” which would never happen (or should never, rather).

This little bit of code though is great because it will allow you to have all of your visual assets in a single SWF file that you can load at the start of your Flex application and not have to worry about managing boat loads of SWF asset files. Hope it can help you as it helped me!

Portfolio Updated!

Sunday, May 31st, 2009

Two posts in a weekend, must be a record!

Anyway, just wanted to make a quick post letting everyone know that I updated my portfolio adding the “Mighty Jungle” project I worked on for Halifax Film. Unfortunately it wasn’t the big one I worked on for about 4 months, but that one will be coming hopefully in the near future (once the site it was for launches).

In the meantime, check out the portfolio as well as the Mighty Jungle Homepage!

I’m hoping also in the not too distant future to re-work my portfolio so I can have some sort of CMS hooked up to it. It just seems like such a hassle to update at the moment and I’ve been looking at Drupal, so it could be an option!

Cheers!

Now (Facebook) Connected

Tuesday, May 26th, 2009

If you’ve visited my site at all in the last 6 – 8 hours leading up to this post, you would have noticed on the comments page that there’s a new button just above where you’d normally enter your name indicating that you can “Connect with Facebook”.

Facebook Connect works very much like OpenID, but you use your Facebook account. Also, you can then publish the fact that you commented on a blog post on your Facebook page, which may bring a few more people to my site, which I am always a fan of. In fact, right after I publish this story, I intend to leave a comment and publish that comment to my public Facebook profile.

This is a fun little project I took on with great help from this blog post from DentedReality. I had been trying to implement Facebook Connect using a variety of WordPress plugins, but found I was having a lot of problems getting it to work properly. With the way I now have it I simply made the necessary code modifications to my custom whatadewitt theme and uploaded those changes to the server. To say I copied exactly what was outlined at DentedReality would be a lie, but the underlying code is pretty much identical, my changes mainly coming in the form submit portion of the code.

Feel free to check out the source on the comments section if you want to see how I did it, and if you have any questions just leave a comment and I’ll do my best to answer your question!