Archive for the 'Game Development' Category
Movement and Event Handling with AS3

A couple days ago, I decided I wanted to teach myself a few movement algorithms withing Flash using Actionscript 3. I started with simple Event.ENTER_FRAME event trapping to move an object across the screen, and then I decided to make it a bit more interesting. What I ended up with is this small target practice game. It isn’t very feature rich by any means, but the different things I was able to learn and apply in a relatively short amount of time — like my particle system, easing an object into a destination and MouseEvent trapping — are invaluable to learn if you are going to do anything remotely professional with AS3.
Although I don’t claim to be a professional yet (that will come with time), my intent is to share any interesting discoveries I have made in order to help someone along through the learning stages I have just completed. Just below this paragraph, you will see the target practice game displayed. Simply click the targets to destroy them, and when you need more (or if you want to overload the app), just click the green circle in the top right. You will notice that a main feature of this app is significant randomization: from the position and motion of the targets to the amount and direction of the debris that scatters when those targets are destroyed. So, to aid in your learning, I have provided the source code for this app for you to study as well. The download link will appear at the end of the post.
Read more
Tower Defense in AS3 - Part II
In this segment, we will be covering creep movement within a map, and to stay true with our original intent, everything in this tutorial will be drawn manually using the graphics package in the Sprite object within Flash. This way, we don’t have to worry about downloading images or the file size involved with such extras. Of course, were this a real TD game to be published, we would whip up some original artwork and animations to give our game a little more flair, but in this case, the simpler the better!
The code additions you can expect to find in Part II of this series include drawing our map (or “road”), creating and moving our creeps along that road and recognizing when a creep has completed the course successfully. Anyone familiar with Tower Defense games will recognize the importance of having a trigger to know when each creep finishes. Depending on the rules of your particular game, you may wish to have the creep run another circuit upon completion or simply vanish from existence, but in either case, there will be significant effects from that little guy getting away. Sometimes it costs us money to banish him back to the beginning, and in other games, we simply lose one of our lives and take one step closer to defeat.
Read more
Tower Defense in AS3 - Part 1
In keeping with my desire to learn as much about how the game development world works, I have spent some time looking into developing simple games in Flash over the course of the last couple years. Recently, I renewed my pursuit of this game medium, and I have been striving to learn some of the ins and outs of Actionscript 3. Having written a handful of basic Flash applications in Actionscript 2 — from the loader and controls of a full media presentation to an MP3 player and dynamic slideshow — I feel I had a solid understanding of the principles of Flash, both in the timeline, layering and scripting realms.
However, when I began working with AS3, whole worlds began to open up as I saw the potential unleashed by implementing a much more true OOP support into the code base. One of the most useful things that AS3 encourages is the understanding and use of the layering hierarchy of sprites and movie clips on the stage. As you add children to specific sprites or movie clips, they inherit their parent’s visibility spectrum and appear truly as part of that element on the stage. This may well have been a feature of AS2 as well, but I never took the time to learn that aspect deeply enough, since I did most of my work from modifying timeline animations.
I decided some time ago that one of the best ways to learn Flash would be to write a game that implements many of the features, such as vector layering and stage positioning. Furthermore, with my addiction to Tower Defense (TD) style games, I thought it only fitting to develop one myself and share my learning progress with others who may also be interested in the same type of application. This post is the first in a series that will follow my progress from manually drawing the GUI on which the game will be played (this post) to creating the basic Creeps and Towers which will make up the substance of the game. For those who are anxious to get started and don’t want to read everything in detail, I will provide a download link at the close of each post with the full source for the project to that point.
Read more
On Blizzard and Starcraft II

Last Friday at Blizzcon ‘08, Blizzard dropped a bombshell about their upcoming, highly anticipated sequel: Starcraft II. Straying from the classic RTS release strategy that most, if not all, games to date have followed, executive VP of game design Rob Pardo announced that the initial release of the game will contain only the Terran campaign and that the Zerg and Protoss campaigns will be split into their own, separately packaged games to be released sometime later. The initial installment of the game is cited to be Starcraft II Terrans: Wings of Liberty followed by Starcraft II Zerg: Heart of the Swarm and finally Starcraft II Protoss: Legacy of the Void.
When questioned about release dates, Pardo likened the development time to that of Halflife 2 — with each episode being about a year apart. Apparently, only the Terran campaign is anywhere near completion, and the team at Blizzard is focusing on creating each campaign to be as full and in depth as the entire original game. Obviously, this announcement has raised many questions in both the development and gaming communities, and I have a few initial thoughts of my own. Read more
1 commentWriting a Reusable AJAX Handler
Due to the number of questions I receive on various forums as well as the number of times I have run into the need for an AJAX response handler in my own work, I decided I would share one of my solutions in the hopes that it will save someone else some time as well. I assume, if you are reading this, that you have a basic knowledge of AJAX and the principles guiding the technology. In addition, basic understanding of how libraries such as jQuery perform AJAX queries and callback functions in JavaScript is a plus. For further reading on these prerequisites, check out this Google search and the jQuery docs.
After manually handling my responses in multiple projects, I finally decided to write a JavaScript object that could handle the XML responses for me and return me a usable object to my callback function. Enter the AJAX Handler object. I decided to let jQuery handle the actual requests for me, but I wanted a way to easily parse out my response, checking for errors and handle them accordingly. The result was something I have been able to use numerous times in different projects. To simplify things, let’s look at the code a piece at a time. At the bottom of this post, you will find the entire code. Read more
No commentsTactics RPG via Google App Engine
While somewhat old news to some, the Google App Engine is an amazing tool allowing developers to tap into the scalability offered by the Google framework while developing entirely standalone applications. What’s more, along with the offer of the code base to build from, Google also allows developers to host their projects, at no cost, on the Google App Engine server (up to 10 applications per user, no less). I was excited to learn of the project initially, and the more I have delved into it, the more enthralled I have become.
For years now, I have wanted to have the means by which to develop a small tactics style RPG game, and while I have had the basic coding knowledge needed (not to mention buckets of ideas), it has been difficult to bring myself to the point of actually taking on such a daunting task. Having the opportunity to build on the data store and framework Google has offered with their App Engine has given me that extra little boost to begin development on one of my long time goals. Read more
2 commentsOn Internet and Gaming
Well, those of you who know me in the least are aware of my passion for video games. I have, quite literally, been a fan of console and PC gaming for as long as I can remember. My parents will vouch for the fact that, on my fifth birthday — before I could read — I was situated in front of our living room TV set with our TI-99/4A on my lap, an open code book next to me, pecking character by character until I had basic animations appearing on the screen. I vaguely remember those details, although I can remember playing games like Parsec and Hunt the Wumpus, but the passion for gaming is still there to this day.
My focus, however, has shifted from simply being a placid gamer to wanting to delve more into the inner workings of the game development process and the gaming industry in general. Choosing web development as a career path has given me more of an insight into the principles that make games work, and I greatly admire those with the knowledge and fortitude to stick with it during the grueling development process, but I still have that burning desire to be more actively involved in the industry in some way.
Read more
Happy New Year!
Well, I suppose it is high time to write my next entry. I never intended to take a two month lapse in writing, but then again, when does anyone plan to leave their blog unmanned for that length of time? Holidays, children and work all combined over the new year to make for a rather hectic time. I’ll address each of these throughout this post, so if it gets to be a rather lengthy read, I apologize in advance.
Read more
Project Top Secret Involvement
Project Top Secret is an absolutely astounding venture that I happened upon a few weeks ago. After spending a few days doing some research, I discovered that this was no new discovery. In fact, this project, spearheaded by renowned video game director David Perry and Acclaim, has been going on for several months and has been featured on sites such as IGN, The Inquirer and Joystiq. From recent readings I have done, it seems that the consensus of the gaming community, driven by the announcement of the genre of the game, is one of skepticism. I must admit that skepticism has haunted my thoughts at times and the community driven discussion has at times seemed to be a bit out of order, I am reminded that nothing worth doing is ever easy. This game, in a nutshell, is to be an entirely community driven venture; no, not simply the character creation and story input, but everything from the world design to that of community development teams doing the final programming themselves.
After my initial research on the project, the desire to be a part of the game creation process in some way that has smoldered in me just about as long as I can remember began to be fanned to life. Ever a fan of the RPG genre, I fell into the same assumption that so many people who have read about this project were also guilty of: this game, obviously, is going to be some sort of MMORPG. In fact, while this game is an MMO, it is going to be following the racing genre! Read more