Wednesday, December 16, 2009

Gameplay and Storytelling: Part 3

I recently downloaded a game for the iPhone called Suviving High School, part 3. I was anticipating not liking it, because I am not a fan of current teen culture, and the game seemed likely to glorify it. The reason I felt interested in downloading it was because it seemed to be a game where story was important.

One of my long term goals with game development is to develop a style of gameplay where what you do in the game and what you do in the story are linked. Surviving High School showed me two things: 1) This is a viable gameplay mechanic, and 2) There is a demand for it.

Surviving High School is, in essence, a very rudimentary version of what it is that I hope to eventually accomplish. The game follows the story of you, going through high school, and along the ways you get to choose to do various things, build relationships with people, and in the end, based on how you did, things happen.

It also handles a couple of the things that I have been concerned about quite well, specifically, how to drive the player. Up front, the player is given three main goals: Win at football, Get a car, become popular. It is, of course, essentially impossible to pull all of these things off, and the player must make choices along the lines where they are going to concentrate. Are they going to make their character strong so that he can perform 'special moves' in football? Are they going to spend time studying so that they can do better at school, so that they do well enough that their dad buys them a car? Or are they going to watch TV and skip class to be come popular? (Philosophically, that's the part I hate most - that the player was rewarded for doing such things - but whatever, I won't go into a teen-lifestyle rant today :)

Where this game differs from my view on what I hope to eventually accomplish, down the road, with this style of gameplay is the characters interaction. What we have here is great - I actually enjoyed building up relationships with the various characters, and I really tried hard to have a good relationship with the girl who I was dating, and I really felt bad when other characters didn't get along well with my character. And I point out that this game does it very well, and it has excellent scripts and the characters are interesting and varied. But what I want to accomplish is a game where your interactions with other characters are richer. Surviving High School plays roughly like a "Choose your own adventure" game, where your relationship with characters is dependent on what you say in situations where you only get to choose one of two possible things to say.

I want to someday have a style of gameplay where you can go, strike up a conversation with another character, and say pretty much whatever. This of course leads to many concerns, of which syntax, performance, and possibilities are among them. I have been thinking more and more about the idea of symbolic language, as used in Siboot. (This would also solve the difficulty of porting to other languages; no having to learn how to parse multiple languages!)

Alright, so saying "Pretty much whatever" is unlikely, and it would lead to players saying dumb things to the characters. (You know that as soon as you start talking to one of those 'bots' online or wherever, you try to say the zaniest thing possible in the hopes of tripping it up). But creating a more rich, verbose interaction between characters, I believe, will really immerse the players. Because truthfully, in Surviving High School, there were many times when I didn't feel compelled to say or do either of the things that I was given the choice of doing, and felt as if I were picking the "lesser of two evils".

There is one other area that Surviving High School did well that I still would like to potentially improve upon in my own game down the road, and that is variety of actions. In SHS, the game calls on you to do many things, from sing to act to play football to etc..., and each of these things would of course require different minigames or actions to fully work. What they have instead for most cases is word based games; you spell or choose words that are related to the actions. This nicely solves the problem of having to create many different actions for the player to perform but at the same time devalues the experience of trying to accomplish some of the things your character does. While it would be difficult to create a game where the player has many options of actions on top of the various conversation requirements this game would require, I feel that finding some solution to this would be important.

At this point all of my ideas are experimental and I don't know how to solve all the problems I am encountering in my mental designs. Those that I am finding solutions for are often expensive or require vast amounts of technology and scripting times. It will require vast amounts of experimentation and iterations before this style of gameplay is fully realised. Perhaps I won't even be the one to realise it, but I hope to be involved to some degree.

Friday, December 11, 2009

Castle Conflict: Update is live!

The original plan for the Castle Conflict update was for it to take eight days to develop (similar to our original development cycle of 8 days). Of course, live intervened, and during that 8 day period, I had a concert, a contract to work on, family commitments, and many other interruptions. These conditions existed the first time as well, but we we had planned this time ... well ... it took longer.

Nonetheless, we had a game that had rough versions of all the features by the Monday after we had started, which was good because myself and the Lead Programmer from FPM Software (a new iPhone company in Calgary working on games, the first of which, Shift Maze, was submitted to the app store on Wednesday) were hosting a testing dinner that night, where friends and family got a chance to play our game. We, of course, bribed them with food.

The app was delayed a further two weeks. One week, I was away from the code base, working on and teaching iPhone Dev School with Michael Sikorsky, who also has a game that has been or will soon be submitted to the app store.

Josiah (the artist/audio developer) and I decided to take another week to finish the app, to make sure that it was a really polished experience. And so it was that, 4 and a half hours past our deadline, on the morning of December 8th, we finally clicked the 'submit' button so that Apple could view our game.

Castle Conflict went live around midnight last night. The new update does not have all the features we planned, yet both Josiah and myself keep playing the game. (I have gone through campaign mode probably 10 times by now, and am still not bored of it). We are planning future updates already, now that we have the architecture in for levels and new units to be added easily.

It has been a wild ride. But it has been fruitful!

Screenshots of the new update:

We also have a youtube video:

(and if you go to our channel, there are also 4 videos that show the game being developed).

And finally, the iTunes URL :)

Monday, December 7, 2009

iPhone tip: don't change ${EXECUTABLE_NAME}

This is a series of quick tips for people who are having a few problems, with ad-hoc iPhone builds and xCode in general.

1) When creating an ad-hoc iPhone app, be sure to have a 512*512 png file in your app called iTunesArtwork . Just iTunesArtwork, no png at the end.
2) Be sure to create an Entitlements file (Add->New File->Code Signing->Entitlements). Name it whatever, and place it in the root, not in any subfolders. Then, go into the information for your target, and set the Code Signing Entitlments field to the name of that file.

The next one is important, as I lost > 30 minutes on it: do not change ${EXECUTABLE_NAME}. This is in the information for your Target, under properties/Executable. I decided to change this, because I had one target for regular development and one for ad-hoc distribution, and I thought to myself, boy, it would be neat to be able to tell the output of these targets apart easily. So I changed that value to CC_AdHoc, and suddenly my code was exploding. The worst error I got was " object file format invalid or unsuitable". It took me a while to realise that it was the ${EXECUTABLE_NAME} that was causing the problem, and once I did, was highly frustrated. So just leave that variable alone, it will save you a lot of problems.

Thursday, December 3, 2009

Objective C in-code profiling

To check how long something is running in objective C:

1) Declare an NSDate and set it to [NSDate date]
2) Run the code you want to test
3) Get an NSInterval from the NSDate by sending the timeIntervalSinceNow message

So for example:

NSDate* date = [NSDate date];
//RUN some expensive code her
NSTimeInterval interval = [date timeIntervalSinceNow];
NSLog(@"Time running expensive code: %f", interval);

Tuesday, November 17, 2009

iPhone Games / Return of Castle Conflict

The return of Castle Conflict / Week of no sleep round 2

It is something that's been in the back of Josiah's and my mind for months now (ever since Castle Conflict first went live in May), something that we'd intended to do a lot earlier. When we first released the game, the reviews we were getting basically said, "We love this game, but there's not enough of it!". When you have users saying, "We want more of your game!", then usually, it's a good idea to give them more of it.

All well and fair, but we felt fairly limited in what we could do. We had some significant problems, most notably, screen space; we had used up all the screen space we could, and any new units we added would require more buttons. Where would those go?

The second was, if we only have 8 units, how do we make multiple levels?

At the time, we were still of the mindset that iPhone games would not take us long to make. Castle Conflict had taken us 1 day of prototyping + 8 days developing + 1 day finalising. And those weren't full days. Furthermore, we had an idea for another game that we thought would not take long to make: Ant Attack. Surely, if we made Castle Conflict in a week, we could make Ant Attack in one, maybe two? And during that week, we could let our subconcious work on ideas for how to fix Castle Conflict. Surely, our users could wait a week for another update?

That ended up not being the case. The truth is, we don't work together full-time. I had a couple of computer games I was finishing up at the time. Josiah is also working on a computer game and a band project. To make matters further delayed, we each had a summer vacation of greater than one week planned, but neither of us at the same time.

Ant Attack ended up taking us 4 weeks of development, but because of our varied schedules, did not get released until the middle of October, at which point I was in the midst of a move. So it is with a huge sigh of relief that we were able to sit down, solve the aforementioned problems of Castle Conflict, and free a block of time to finish it.

Let this be a lesson to all future iPhone developers: Make your update for your game as soon as possible! What we should have thought in May, and will think next time, is "Surely this audience who might want Ant Attack can wait a week until our existing audience is pleased with the update they have told us they want." Because, you don't know how often those weeks of productivity are going to be available to you. And you want to address the audience that already exists, not one that might not.

What update?

In order for this to be feasible in the time we have available (once again, just one week), we are once again structuring this update in a tiered manner, and those tiers are:

1) Campaign Mode, New unit pack 1
2) Quick Play Cleanup
3) Campaign Mode Cleanup
4) New Unit Pack 2
5) New Unit Pack 3
6) Multiplayer

Sadly, multiplayer is last, and we don't really expect to get it in this update, as much as we would like to. Luckily, updating is easy to do.

Planning is Key!

We have one week for this project, so once again, we are using as many productivity tools as possible to keep things organised and moving smoothly.

1) MSN: We are working from different cities, so the ability to communicate in real time is a huge need. MSN allows us to do that.

2) XP-Dev: We are once again using this online tool to manage our tasks and plan our project. The software has been updated, so before where we had to rank our tasks by integral values to determine their importance, this time we were able to split our tasks across multiple iterations, as outline above.

3) Mockups/Flow charts: Okay, so we are very 'indy', and I use the free Mac 'Paintbrush' software to make these, so they don't look as professional as those done in Visio or another equivalent software. Nonetheless, sometimes the best way to communicate is visually, so we use images as below to communicate ideas before spending hours working on implementation and graphics for them:

Friday, November 13, 2009

Storytelling in Games: Part 2

The Game Industry likes to refer to itself as art. They like to talk about how they allow the players to have deeper experiences in the story than the player has had before. I am not going to comment on whether or not games count as art (I think it's subjective and on a case by case basis), but the storytelling is an interesting aspect.

When a reader reads a book, they often feel strong connections to their characters. They get to hear what their characters think, feel, dream, hope, etc. It can reach a point where, if a reader is truly immersed, they feel like they ARE a character. Games give players one more step into that immersion. They let players actually BE that character. But this is a problem, because games usually have the following constraints:

1) A linear or semi-linear story
2) A path for their protagonist
3) Other characters that the player interacts with.

I'm going to use Tales of Symphonia, an RPG for the GameCube, as an example of this. Let's consider the story. You play as a main character, Lloyd, who is trying to save the world. Lloyd does so by running around, killing random monsters, levelling up, and beating bosses. Over time, he encounters other characters, which join his party. Now let's examine how the above effect the players perception of themselves as Lloyd:

A linear or semi-linear story

Lloyd really has about one goal, and he can only really approach one ending. "Defeat the bad guys, save the world." The plot is a bit more complex, but that is the overriding choice that the player makes. There are certain dungeons to which the player must go, to collect certain things, to reach this ending. The player does not get much of a choice in that; they have to follow a roughly linear, designed path to 'whats next'.

Tales of Symphonia is what I would classify as 'semi-linear'. The player can make choices along the way that effect the ending, either by effecting the relationship between their character and other characters, and they can even change the end a bit. But there are finite choices that they can make, and these are NOT tied to the gameplay. Throughout the game, the player is given several binary decisions, and based on which ones they select, the ending varies. So, the player CAN influence the ending of the game, but to do so is almost a seperate section of the game then how they PLAY the game. It does not matter how many random monsters you kill, or how strong your character is. The core gameplay is not the deciding factor.

A Path for the Protagonist

In Tales of Symphonia, the player is guided by other characters and clues as to where to go next. There are not really a ton of options, for the player must hit all certain spots, and experience certain events, before the story can advance. "Side Quests" are the closest thing to additional story, but they often include supplementary or inconsequential story, and do not actually move the key plot forward.

The metaphor that the game promotes for the path to victory does not leave the player with a lot of time to figure out their own way of creating a path to victory. They must follow the path that the game has set forth for them.

Other Characters that the player interacts with

Oh boy, this is the hardest part to tell in a story. In a book, the characters have a free range to say whatever the author wants them to say, and interactions can be as complex or simple as any scene allows. The same is true for theater, movies, television, radio, and pretty much any other drama with dialogue.

But in games, we run into a problem. The player has to interact with other characters, but we can't really create verbose responses for everything that the player can say. In Tales of Symphonia, Lloyd has his own personality and talks for the player. That is one solution, although it breaks the illusion that we are Lloyd, and it works really strange with the scenes where Lloyd gives you a choice of two different things to say. Suddenly, we are Lloyd, but normally we are not? The amount we get to shape our character is pretty minimal.

Games have handled this in a variety of different ways over the years. In the Legend of Zelda, you never see what it is that Link says, only the responses that the NPC's give. So you can imagine that Link said whatever you want, as long as it makes sense with that response. In the Monkey Island and similar series, the player doesn't say anything until the player makes a choice about what to say, and then the computer has a series of canned responses. So there is more options, but ultimately, it often results in the player trying to say everything to see what they can learn from the NPC's, even if it means taking similar dialogue paths again and again.

In the Computer Science industry, programmers have been trying to get computers to talk for years. A.L.I.C.E. is an example of a bot that was scripted, but after tons of work on ai and intelligent sentence responses and parsing, the bot could still get confused by complex sentences. While the technology has doubtless advanced in the years since, it is still unlikely that the technology exists for a computer agent who could respond intelligently to any statement the player could construct, let alone adapt that entity to have a growing, changing relationship with the player, interact with the player in non-speech methods, and then expand that to have many such characters in the game world.

So, in short, this is the biggest difficulty encountering story-game evangelists. Interestingly, a method of dealing with this was developed by Chris Crawford on a Mac game in the '80s called Siboot. Essnetially, a limited number of symbols was used to represent different things that the player could say, and so the player communicated with other characters in a symbolic manner. He gives an excellent explanation of it in his book "Chris Crawford on Game Design", which I highly recommend reading.

These are only some of the difficulties that story's must overcome in games, but step one of the battle is understanding the problems to overcome.

Sunday, October 18, 2009

iPhone Dev Camp Keynote

iPhone Dev Camp is in the process of wrapping up even now. During the course of the camp, we were all able to share some valuable lessons. Here I will share some links to some of the interesting libraries and tools that were discussed:

MonoTouch - A development environment for creating iPhone apps in C# with .net

App Vis - A place to download a visualizer for your iPhone Apps status.

Five Second Test - Interface feedback

Squeezing every drop of performance out of the iPhone - A slideshow by someone who really tried to get a smoothly operating app.

Anti-Crack - piracy prevention for your iPhone Apps

Pinch Media - I've talked about them before in this blog, but they came up a bit during the camp. A website for a great library to learn about how users are using your application.

iPhoenix Fund - A fund for developing 133 iPhone apps

I myself gave a keynote today, about Cocos2D and developing games quickly. Although I do not think it has as much value without someone speaking to it, it has been requested that I share the keynote presentation. For those interested, a link to it exists at: this link.

As I type this, those participating in the app track are finishing up development on their app. They gave a demo of what they had a couple hours ago, and it really is amazing how quickly they came up with an app idea and began to implement it. If I understand correctly, the app is actually going to be used at the Calgary Science Center.

The camp was a lot of fun and overall a large success. If you are in the Calgary area, interested in iPhone development, and missed out, I urge you to attend the next one. I will post with details in my blog about it when I know them, instead of the day before like I did this time.

Thanks again to Michael Sikorsky for organising and hosting the event!

Friday, October 16, 2009

iPhone Dev Camp

I'm a little late in posting about this, but tomorrow and Sunday are iPhone Dev Camp in Calgary.

If you are interested in iPhone Development and want to meet some of the people in Calgary who are involved with it, if you have $25 and a weekend off, if you would like to hear some Keynotes by those involved in the scene in Calgary...then come along!

Details can be found at:

I will be Keynoting on Sunday about my experience with Castle Conflict and using the Cocos2D for iPhone game engine.

In other news, Ant Attack was submitted to the App Store on Tuesday, October 13th, at about 9:30 pm, so it should hopefully be live on October 27th-28th.

Sunday, September 27, 2009

Storytelling and Games, Part 1

I love stories. Stories can do so much; they can take you to a far away world when the stresses of the real one are too much. They can educate you on history, science, people, and more. They can make you cry, laugh, gasp. They can introduce you to new characters that can come to feel like friends to you.

My preferred medium for story telling is books. For a myriad of reasons, I find it difficult to find a story in any other medium that can engage me as much as a well written book can. There are a few reasons for this:

1. My favorite part of a story usually ends up being the characters. Nothing lets you get more into the mind of your character than being able to hear their thoughts directly.

2. I like long, engaging plots. My favorite books are usually greater than 700 pages long. It's a lot easier for a book to get written that is 700 pages long than to have a movie or tv series with the same plot produced. In the TV series, each new character, backstory, and locale adds to the budget, and the lengthier a book, the more of these that are likely to exist. A book can add new locales without having to get board approval for a budget raise.

3. Movies are often 'ADD' oriented - people want to sit down, have an epic experience, then walk out and be done. Oftentime, they don't carry anything with them after a movie. A book, on the other hand, is more difficult to read in a single sitting, and the characters could be with you for days, weeks, months, even years (depending on the speed that you read), making them feel that much more important to you.

4. In general, I am not a huge fan of typical Hollywood-isms. (Big Explosions, car chases, end of the world, clues hidden about that reveal over time how the movie will climax, etc.)

5. I'm not good at reading epic poetry.

Granted that there are plenty of things that you can do with television and movies that cannot be done with books. I would not even think of reading a book about Kung-Fu if there was a movie done about the book starring Jackie Chan. In fact, the visual medium can be an excellent way to tell a story in a different way then a book.

Let's take for example a similar idea and see how well it translates into books versus movies, and then I will talk about how it translates to games:

The Scene: A man walks into a room where another man was killed. Various clues are littered about the room.

In a book: This type of scene can work very well in a book. The author can describe each of the clues, and even describe the man's reaction to each one; perhaps he knows what some of them mean. This makes the reader feel smarter, but still puzzled; what do the other ones mean?

In tv: Tv's advantage is it does not have to call attention to every clue that is in the scene. It's on the screen; it is up to the viewer to locate and puzzle over the various clues. If there is a bloody handprint on the window sill, and the viewer sees it, they can draw a conclusion that the murderer escaped through the window. They are rewarded for their powers of observation.

Unfortunately, this form of visual storytelling is rarely used. Modern viewers don't have the patience to look at a still shot for very long; next time you watch TV, count how many times the camera stays in the same spot for longer than 4 seconds, without some form of shaking, zooming or panning going on. It won't happen very often. So while this type of story telling can indeed be used, what happens more is there will be a dramatic effect, probably a snapshot, drawing attention to each relevant clue. This is so that the viewer doesn't get lost if they don't notice the handprint on the windowsill, but it does mean that viewers are spoon fed more.

In games: Being a visual medium, games have the same advantages that TV has, but since the player is in control, they have a bit more freedom. Placing clues around the game that the player can discover by moving through the world does not cause impatience, because the players are able to spend as much time looking at and investigating said objects as desired.

As the above example shows, games have the chance to take an experience that is good in books and good on tv, but make it something more. Suddenly, instead of observing the clues being discovered, the player is discovering the clues themselves. (This has, in fact, been used in many games over the years, from Hugo's House of Horrors to Myst to Hidden Object games, etc.)

Games have the potential to do some really neat, and interesting, things with storytelling. The unfortunate thing is that, they are not done very often. To many game designers, story telling means tossing in some cut scenes between the action in the game, where we learn that a) the world is in jeopardy of being destroyed / taken over, b) we are humanity's last hope because of prophecy/some equipment we have/our past, and c) the enemy is evil and stands for nothing good, so killing him would not only be perfectly okay, but probably better for everyone involved. Also, killing him solves all of our problems.

There are, of course, other stories, but that's the general feeling a lot of games go through. (Think: Legend of Zelda, Tales of Symphonia, Legend of Mana, Half Life 2, etc. etc...)

So why is it that a lot of games, this medium that has the potential to tell some truly interesting stories, are telling stories that pale in comparison to most things that hollywood, tv, and literature are capable of coming up with? What makes a good story, and how can games make it better?

I hope to answer these questions over time, and will hopefully have time to continue writing this blog series as observations are made. I would like to draw one initial conclusion:

Most games are designed as games first, with the story tacked on afterward to drive the player, so the game and story do not necessarily work together. In order for a game to have a truly magnificent story told, the gameplay and story have to be designed to work in harmony.

Thursday, September 17, 2009

iPhone Tip

If you are getting security errors (Error launching remote program: security policy error) when trying to run an iPhone app on your iPhone with the correct provisioning profile, go into the organiser window and uninstall all provisioning profiles that may be expired, as they apparently can cause trouble.

Discovered this from a comment in the following blog post:

While I'm here, may as well toss up a couple current Ant Attack screenshots, the game we are currently working on for the iPhone. The goal is simple: kill ants, buy things to kill more ants.

The ants scattering

The queen ant that the player will uncover at the end of the level

Wednesday, June 17, 2009

Lessons learned from Castle Conflict - marketing and design

Castle Conflict is not doing poorly. It is not making me Flight Control levels of money, but it certainly is not leaving me penniless either. I think the app has been alive long enough, and I've heard enough from the users, that I can begin to draw some conclusions.

First off, Castle Conflicts marketing campaign has not done a lot for the game. It has been reviewed on many websites, appeared on many websites, been cracked on many sites, even received a couple of youtube videos. They haven't been without value - I've recieved small boosts from such websites. For example, around the time of the apps first review, the app was getting about 15 sales a day, but the following day, it had 27. At that point, it was easy to measure that the review had given the app a boost of about 10 sales a day. It was not a particularly great review, but it still helped a bit. I cannot measure if we would have got more sales if we were better reviewed, but it seems likely to me.

Unfortunately, the first release was full of design problems, which I will get to shortly, and we did not get a lot of great reviews off the bat.

Another avenue of advertising that did next to nothing was facebook ads. We got plenty of impressions (49K in a single day), but very few turn to clicks (11), which is to be expected. However, those 11 clicks were made on a day when the game had only 17 sales, so the chances that each click became a purchase is highly unlucky. Cutting the facebook ad dropped sales to 14, and the game had been on a downward trend at that point, so it can't even be said with certainty that cutting the facebook ad had anything to do with that.

Luckily for us, about a week and a half after our game went live, we received one of those dreamt of e-mails from apple. It was so exciting that I didn't even believe it at first. "To Broken Kings, we at apple really love your game and want to promote it..." That doesn't happen to just anyone, and we quickly provided the assets requested. Our sales jumped from 11 on a Monday to 1.2K on the Tuesday. They dropped to about 880 a day and settled there for a week (until the app dropped a page in the 'New and Noteworthy' and 'What We're Playing' pages). We put it on sale and it managed to hover at about 700 sales on page two, and on page three it's getting between 2 and 3 hundred sales a day.

The app has been reviewed on many sites since that time but it's a little less clear how much of an effect those have had. The sales data has not changed overly much since apple started promoting us, other than when it moves down a page, so it's clear the reviews have yet to do anything stunning for us. On that note, we haven't taken advantage of any paid advertising opportunities other than facebook, so hopefully in the next blog entry we will have something to say about that.

In short:
Facebook ads - not effective
Having your game reviewed on an app website - Remotely effective (perhaps more on a good review)
Getting featured by Apple - Highly effective, highly recommended


We made two mistakes, one when developing Castle Conflict, and then one after when we sold Castle Conflict. They were:

1) Releasing the game with a single level, and
2) Charging $1.99

Releaseing the game with a single level
The first mistake was a design mistake - we released the game with only a single level. This is not a mistake immmediately, but you have to know that your game is a single level game before you release it as a single level game. I was looking at Flight Control when I made the decision that a single level would be enough for Castle Conflict, but I failed to notice two key differences:
1) In flight control, you are driven to keep playing because you get a new high score at the end. The game always goes until you lose, but you will usually think, "Oh, I could have done better!". As such, it inherently drives players to play again.
2) In flight control, the only person you have to beat is yourself. In that sense, it does not rely on an ai remaining interesting, as Castle Conflict does.

As I've mentioned before, this game was inspired by and largely based off of Medieval Clash. Medieval Clash was a free gamemaker game that I played in my youth when I was still fiddling around with gamemaker in my free time. Like this game, it had only one level, with the challenge being adjusted based on the users settings (difficulty, how fast the trees grow, etc). We mimicked that, because it had worked so well (for us) when playing Medieval Clash.

To push players along, however, we checked how well they did and, if it was rather well, we would suggest to the player, "Why not advance to the next difficulty?". In an update we released (that just went live yesterday after 18 days in the queue), we made this pop up no matter how well the player did, as long as they won. Otherwise, players wouldn't know why to play again. What would be different? My statistics from Pinch have revealed that not everyone visits the settings page, so many people play the game a couple times on easy, and if they are not good at it, they won't see the point in continuing.

Players NEED motivation. There are several things that can motivate a player: growth, advancement, beating a score are notable ones that I have uncovered. Castle Conflict did none of those things. Each game starts on a clean slate, so there is no growth. The game does not score you. It may advance you, but only if you do well. Without this, the player will be lost in the game after playing it once. We had assumed - wrongfully - that the player would want to play again because of the gameplay alone. That was what had driven us to play Medieval Clash again and again in the first place, why shouldn't it work on our end users? We were, of course, a lot more passionate about the game (enough so to make a game based off of it) then we could fairly expect an average user to be.

There was one other difference between our app and Medieval Clash, however. The settings for Medieval Clash were on the title page, whereas our settings are hidden away on a settings page. This was essential because the iPhone screen has less space than a computer screen, but it makes the customisability aspect of the game less obvious.

Charging $1.99
We thought (and still think) that Castle Conflict was a fun game. We thought that players would most definitely get their moneys worth from it. And we had worked hard - skipping sleep, working around other responsibilities, taking no leisure time (other than one afternoon when we were far ahead) to get it out there. We figured, if we weren't getting a dollar a sale, it hadn't been worth it. So we priced the app at $1.99, so that after Apples cut of 30%, we'd still have $1.39.

This was pride, and it led us to make a bad decision. Our game may be worth $1.99 on an online game website, it may even be worth more, but on the iPhone, games that provide hours of entertainment often sell for $0.99. As such, any game that costs more must have an obvious reason for costing more. If not, players will get upset that they are paying more and not getting more - and we received several reviews, both in itunes and out of, saying that the app would be great if it had cost $0.99, but wasn't worth it for $1.99. A lesson for any developer hoping to take something from our experience is - unless your game has some really obvious boost above other games (being 3D, being more like a console game experience, etc.), it's probably better to just charge $0.99, and prevent anyone from complaining about the price (as this will hurt your sales).

We noticed this, but even after apple promoted us, we didn't change our price. Our app hit #48 by the Friday after we were promoted it, and if we had put it on sale that weekend, we may have cracked the top 25 with all the additional sales we could have gotten at half the price. But we didn't, until the app started sliding off the charts. when it was in position #98, in a panic to prevent it from falling off the top 50, we put it on sale at $0.99, and it pushed the app back up to #80 - but we missed the opportunity to really have the app go far. Of course, we could not have known how much of a hit our sales would take when apple moved our app down a page in the featured apps, but it still hurts to think about where we could have been.

I was going to talk a little bit more about some design things I think have worked that other games have done, but I think I shall leave that as a future blog entry.

Final Note: We got another youtube review, and it was quite nice:

Wednesday, June 10, 2009

Population Control Teaser

Population Control is an interesting project. I actually started it while still in college, as my final project for my artificial intelligence class. It quickly became my favorite project from college, and during the day where we introduce ourselves to industry, I had it running on my computer the entire time to show off.

I always had fun tinkering with it, and most people I've shown it to think that it is actually a game that could make money. Of course, people I know are biased in my favour, so that doesn't make them right - but I loved the game idea enough, and had enough fun playing it, so I decided to give it a shot.

This project has become a joint collaboration with Robots and Pencils, a small company run by the same guy I helped teach iPhone Dev School with recently, Michael Sikorsky, as well as his wife, Camille, who is doing the art.

This is what the game looked like originally, when I programmed it in college, complete with programmer art. You may even recognise the sheep from this game as being what I selected as my avatar on blogspot. While the game may have been solid, it definitely lacked the art necessary to crack it in todays market. Luckily, Camille seems to be a genius at making animals cute, and what we currently have looks something like the screenshots below:

We are hoping to have the game at a state where we can begin a distributor hunt very soon. Hopefully in that time, I will have a chance to discuss some of the behind the scenes details of the game in this blog.

Friday, June 5, 2009

Pinch Media Update

I have previously discussed Pinch Media and piracy, and I would like to take a moment to commend Pinch Media for a move they made recently.

Now, Pinch Media actually allows you to filter your data by how many users are real users, and how many users are pirates. I don't know yet how accurate this data is but the numbers that they have so far line up with what I have been finding on my own.

Their system is not entirely without limitations, however - for example, you cannot compare how many pirates have performed each action vs. how many paid users have. It is not yet a perfect system, but it is definitely a nice system.

This, of course, comes as Castle Conflicts first update should be coming near to propagating to the app store. In the update, I had included code that detected if a cracked version of Castle Conflict was run and - if so - actually supplied a SEPARATE application id, so that I could compare stats. I will probably be taking this code out with my following update, unless I find the observations in behaviour in-game of pirates vs. non-pirates striking.

However, Pinch Media does reveal a few interesting pieces of data with this new update:

1) Of Castle Conflicts users, currently about 47% (6510) are pirated - meaning that we just recently cracked the halfway mark of paid vs nonpaid.

2) However, only 35% of all game sessions were by pirates - non-pirated users play the game roughly twice as much as pirated users do! (My states corroborate an increase in usage by paid users - before we started receiving more sales, when we had many pirates, our usage stats indicated that users were running the app approximately 3.12 sessions each. However, that number has since gone up to roughly 4.61 sessions per user (63,831 sessions over 13, 847 total users)

3) Users spend more time playing when they didn't pirate the app - there is not a hugely significant number, and it is hard to judge overall as these numbers fluctuate from day to day, but on a normal day, a paid user runs the app approximately 17+ minutes (with the longest average session to date being 33 minutes), but a cracked user on averate runs it 15 minutes (with the longest average session to date being 24 minutes).

Thursday, June 4, 2009

Windows on Mac - A Mixed Bag

I do most of my work on a 13" macbook.

It's not a high end mac; it's actually quite close to being the bottom of the spectrum of this years models. But its specs matched the Windows machine I was working on at the time, and the reason I was buying it was for iPhone Development. A friend of mine had recently built an iPhone app on lesser specs, so I figured that the cheap bet was the safe way to go for doing indie development.

Shortly after I got my Mac, I used BootCamp to install windows on it. I was surprised by how wonderfully Windows ran on the mac. The aforementioned Windows machine was literally a piece of junk ... typing into firefox's URL bar often resulted in a bit of lag before the text appeared. This was partially due to the machine being used for over a year without a lot of cleanup, but it was still painful to use as a development machine.

On the mac book, when I clicked 'My Computer', a window popped up named 'My Computer' in less than a tenth of a second, as opposed to the Dell, where it usually takes 3-4 seconds. It was, quite honestly, for a geek like me - a breathtaking experience. I was running Windows...and it worked. WELL.

Even Visual Studio loads in under five seconds, where on the Dell it could take upwards of two minutes, without any project being loaded on it.

(This is, of course, the spoiled part of our age - that two minutes can seem like a long time to wait for something to happen).

There are two downsides to the Mac I've since uncovered though. One is that any game I am developing runs at choppy frame rates that I can't reproduce in other places (the games get roughly 60 fps on the Dell). I don't know if this is a graphics card problem, or a driver problem, or a 'your code is inconsistent' problem, but it does make working on games a little more problematic.

The other problem is that for the past week, with little to no warning, Windows has occasionally BlueScreened because of a driver failure, then shut itself down. When this happens, it will usually happen again shortly after starting up again.

Windows did recently update, and it hasn't happened since, so I am hoping that perhaps the update fixed it ... but we shall see.

So; Windows on a Mac: Mixed Bag. Windows runs way better than it has on any machine I've used recently (including a clean install of Vista on an HP TouchSmart), and I am still spending more time being productive, even with the Blue Screens. But the slowdown when running games is a bit of a pain.

Tuesday, May 26, 2009

iPhone Dev School

This weekend, I am helping to teach a class on the iPhone.

The class takes place over the weekend and is targeted at software engineers who are looking for a quick introduction to the iPhone environment.

The class starts from the ground up - from introducing users to xCode and Interface Builder, the main development tools on the iPhone, and covers a lot of ground, including playing sounds, using the accelerometer, detecting multi-touch, using tables, using picker views, using tab views, using navigation controllers, using quartz drawing, will be a very packed weekend.

The course takes place in Calgary. If any are interested in attending this weekend, further details can be found at:

Wednesday, May 20, 2009

First Week of Sales

One of the neat features of developing for the iPhone is a library provided by Pinch Media called Pinch Analytics. It allows you to track usage of your iPhone app in details.

Included among the stats it collects for you are how many people use your app, how many times they start your app, and how long in total your app has been running. From this data, it also predicts how much you may have made, how much goes to apple, etc. And best of all, it only takes about fifteen minutes to install.

In short, I highly recommend using Pinch Media, and I'm going to even give a quick demo of the steps it takes to set it up in your code.

But that's not what this entry is about. This entry is to give an impression of what the first week of sales is like for a company's first game. And, notably, to discuss something that I hadn't expected, and a lot of first-game companies probably will not expect, but that is a very real reality of commercial iPhone Development - Piracy.

Quick Pinch Media Overview

The nice thing about using Pinch Analytics is that, once you have the analytics library installed in your app, there are only three lines of code that you need.

The first starts your 'beacon', and should be called when your application is launched.

- (void)applicationDidFinishLaunching:(UIApplication *)application
NSString *applicationCode = @"AppCode Provied by Pinch in Application Info";
[Beacon initAndStartBeaconWithApplicationCode:applicationCode
useCoreLocation:NO useOnlyWiFi:NO];

The second ends your beacon and, similarly, should be called when your application shuts down.

-(void) applicationWillTerminate:(UIApplication*) application
[[Beacon shared] endBeacon];

Simple, easy, snappy! With just those three lines of code, you get all the usage statistics about when, how much, and for how long. Not too shabby at all. But there is one more thing about Pinch that gives you tons more data - the idea of subBeacons. This allows you to track, not only how used your app is, but WHAT actions inside of your app are being performed.

That, my friends, is vital information that every application developer should want.

-(void) startGame: (id) sender
[[Beacon shared] startSubBeaconWithName:@"NewGame" timeSession:NO];
GameScene* gs = [GameScene node];
[[Director sharedDirector] replaceScene:gs];

And that's it. You can also time sub beacons ... so you can learn how long players are doing things for. That wasn't essential for my app so I never used that feature. By sprinkling your code with such items wherever necessary, you can really learn how players use your app.


I will forewarn all readers who decide to use Pinch Media to be very careful about getting overly excited about the numbers you receive on your first day. It's not that these numbers are inaccurate; it is merely that they may not mean what you think they mean.

I was burned by this. I went to bed the night that Castle Conflict went on sale, and Pinch told me it had 6 unique users (5 of which were me testing it). I woke up and Pinch told me I had 596. I was freaking ecstatic. I had heard that crossing the 100 mark of sales in a day was a huge milestone, and I had received 590 while I slept? That seemed to be a little bit too good to be true. But the numbers were there and they sure looked good. I had spent the few hours before bed sending my game off to as many sites as I could, and I thought that perhaps one of them had posted it on the front page already and it had paid off.

That was, of course, incorrect. It had been posted in a listing of games on one website, and that was about the most it was going to receive in terms of publicity other than a forum post I made on Touch Arcade, which had proved surprisingly active. By the end of the first day of sales, Castle Conflict had reached 1,666 unique users. With the 20 promo codes I had given away and the 5 users who were me, that still looked like over 1600 sales. When I checked my official itunes numbers the next morning and found I had not even cracked 50 sales - 48 new sales and 3 promo codes used - I was confused, and then doubtful, and then angry.

Because I knew what it was. I had seen, through my twitter search for Castle Conflict, a link to a cracked version of Castle Conflict. But I had wanted to believe in the huge numbers of first day sales so much, I had assumed no more than 10% could be crackers. Even when I thought about it from a cynical point of view, I was certain that at least half of the sales had to be real. I mean, it couldn't be THAT easy to put an iPhone game on a cracked iPhone, could it? There must be far more users seeing this game on the top of the new app list willing to pay a buck 99 for it, than hackers deciding to download it. Right?

The numbers obviously proved that I was incorrect in that assumption.

To this date, Castle Conflict is just looking to pass the 200 sale mark. Over 3500 users have run a pirated copy (and know at least 6000 were downloaded!). Let this be a warning to ALL new iPhone app developers: Chances are, when your app is new, it will be pirated between 3 and 4000 times in the first week. Pinch Media even makes a note, in their FAQ, that if your numbers are far larger than apples, it is probably because of pirates.


As I just stated, Castle Conflict has had less than 200 sales so far. The first day, when it reached 48 sales, I am certain that was mostly on the strength of the Touch Arcade post, and it passing through the twitter stream of the city I live in. These 48 sales put it in position #43 in the strategy game section of the app store, and it has yet to surpass that position. The numbers have been slowly declining, and last night it hit its lowest sales yet, with 14 sales.

The marketing engine is slowly getting online, so there is a chance that sales will be up in the near future - in fact, I am expecting it. As mentioned, this game only really had two things to boost the sales and awareness to this point - the touch arcade forum post, and twitter, with a potential slight boost from the site that listed it (148apps).

My app did not even get the initial boost in publicity most iPhone Apps get by being put on top of the 'new app' list. Why not? Because, by my own folly, I forgot to adjust the release date. When I submitted it, I set the release date as the submission date, so that it would go live ASAP. A good strategy, except that when it actually went live, I needed to change that date to the day it went live. Otherwise, the app store would think it's 9 days old.

With that in mind, the sales have been pretty good, and they can only get better as awareness increases. Today it was reviewed and featured on the front page of appvee, and I'll soon know how much that effects sales. We are also planning on doing an update soon, as doing so will boost it to the top of the top app list.

But back to piracy...

I mentioned Pinch, I mentioned Piracy, and I mentioned Sales. This was to give some context regarding the interesting stats I am about to show, which actually give me a lot of heart about the future of this game and how well I believe it's going to do.

The thing to think about pirates is as follows...for the most part, they are often younger and probably do not have credit cards. They have iPhones or iTouches, yet still refuse to pay for apps that are $3 and less. They feel they are part of a pirate 'community' and that probably allows them to justify their action better than anything else they claim; the fact that others are doing it too. They have jailbroken their iPhones. And they can crack your app with a fair amount of ease, and then submit it to many sites. (I have found Castle Conflict on at least 6 websites, including one in Japanese and one that my computer didn't have fonts for. The number I cited above, of over 6000 downloads, was from the only one of those websites that actually counts downloads, so the real number is undoubtedly higher).

So when a pirate sees a 5 MB game posted to the websites they follow, it isn't even a matter of whether or not they would pay for that game. It's a matter of it being easy to install a 5 mb app without even thinking about what it is, before the app gets taken down by the apps creator. (I haven't bothered going through that process). They will download it. They might even run it, if they ever feel the compunction. But since they have a slew of new, free apps to try, their attention span for any one app is likely to be limited.

Their 'public' justification is that they believe the app store is flawed, that apple has allowed many crappy apps through, and that they are tired of being burned by paying $0.99 for an app that actually kind of sucks. They worked hard for that dollar, and now, they want the chance to try such an app BEFORE they download it. If they like it, then they'll buy it.

This is an outright lie. And Pinch Media will help me prove this.

Let's consider the numbers that Pinch Media has to report about Castle Conflict:

To date, Castle Conflict has 3,796 unique users. Roughly 200 of those are legit (paid, promo code, developer). The rest pirated the game.

To date, Castle Conflict has been run 11,858 times. That means that, if sessions were divided evenly across users, the game had been roughly 3.12 times per person. If the Pirates truly had NOT liked the game, they would not have run it more than perhaps twice, but probably only once. So if each pirate who has not bought a copy had only run the app once, then that would mean that there were somewhere in the field of 8,250 play sessions by the 200 legitimate users.

If that were the case, I'm sure a lot more word of mouth would spread about this app, which users thought was worth playing 40 times in the week they bought it, and I'd be making a lot more money. So the assumption must be that, in general, people who download Castle Conflict like it enough to play it multiple times.

But there is one other stat that is interesting. In the 11, 858 sessions, players have started 22,036 new games, and continued 697 more; that's 22,733 times in total. That means that players play roughly 1.91 games per session. That means that the average number of times a player plays Castle Conflict, so far, is 5.98. Nearly 6 times per user! That's a pretty good record, as far as I'm concerned. (For those who don't think continuing is as valuable as a new game, the number is 5.81 play per user; I would argue, however, that continuing is MORE valuable than new games, as it indicates the player's desire to keep playing clearer than a new game).

And that's not even counting how many pirates are likely to have run the app once and quit. I can't account for what percentage that is, but it seems that this app has at least SOME staying power to it.

So the reality is that pirates are incorrect. They will play an app beyond the 'free trial' range, and they will still not pay for it, even if that app costs a paltry two dollars. If all the pirates who played this game 6 times had bothered to pay for a copy, I'm sure I would be a lot closer to breaking even.

One Last Note...Detecting and Dealing with Piracy

I found a great blog this week about piracy and detecing/dealing with it. It's located at this location. If you go to the first few of entries, the author includes a great explanation of HOW pirates crack your app, and how to detect in your app if that crack has been used on your app.

As a summary for the technically inclined, what pirates essentially do is load your app into memory, grab that RAM and output it as a file, then modify the root.plist to have the SignerIdentity field claim that the app was signed by apple. This allows them to put it on their jailbroken iPhones.

As a programmer, what you can do is detect if your plist is a different size than you know it should be, or you can check if the SignerIdentity key exists in your plist. The code to do so is pretty easy, and again, exists in more detail in the above blog. For convenience, it is:

NSBundle *bundle = [NSBundle mainBundle];
NSDictionary *info = [bundle infoDictionary];
if ([info objectForKey: @"SignerIdentity"] != nil)
/* do something */

What should you do once you reach this point? I have considered several options...from allocating tons of memory, to putting in an infinite loop, but upon further consideration, I realised these were all BAD ideas.

Simply because, pirates can be just as vocal as regular users. And you don't want them spreading the word that your app causes crashes or locks up iPhones, because that will scare potential buyers as much as it will scare potential pirates. And you want to do everything in your power to not scare potential buyers.

My recommendation is to put in a splash screen that pops up from time to time. This is less likely to be something pirates will try to figure out how to remove, it still allows them to have a good experience (and hopefully sing your games praise somewhere), and there's the off chance that they may be guilted enough by it to actually purchase your app.

Of course, unless this is under a one hour task, it probably will NOT be worth your time. The reason for this is simple - most pirates still will not convert to sales, but you're not doing anything about them. You could probably generate more personal income by continuing to plan/implement features/polish that actually improve your game and make more people want to buy it. It is, truly, impossible to solve the pirate issue completely.

At the very least, I intend to use Pinch Media to give me some REAL numbers about how many people are running a pirated version of my app, instead of the conjecture used above. I would even like to know how many times they are playing the game. It may not add any value to my game, but I'll be honest, I want to know how much pirates are playing my game. That may be the best test of how successful your game is - if you can find out that pirates, who have no financial backing pushing them to play the game, and who have a slew of other free apps to distract them from it, keep coming back to it, then you can feel confident that once your game does get more widely known in the actual app store, it should do quite well.

Tuesday, May 12, 2009

Castle Conflict is on sale in the app store as of today. (May 12, 2009)

How it will do in the future is a mystery. I will be promoting it over the next couple of days, and hopefully it will grow from there. It could be anything from a rousing success to a huge disappointment. Only time will tell.

Like Firemint games, who recently released the sales data for Flight Control, I am not going to be keeping any secrets about the success of the app. While I am not intending to do a full on pdf report (unless maybe if things go really well), advertising techniques and sales numbers will not be kept a secret (if so, it is only because there is nothing interesting to report).

Here's to hoping!

Up to date screenshots:

Wednesday, April 15, 2009

Castle Conflict: Finished. We can resume sleeping.

It is 11:17 pm, make that 11:18 pm, on Wednesday night, April 15 2009.
In roughly 42 minutes, Josiah and myself are expected to have our game done, based on the deadline that we set for ourselves.

And we are able to stop here and say, we met our goal.

I mean sure, we could continue to sweat the minutae and make the game more and more polished. That is, in fact, what we have been doing since Sunday. This project went off surprisingly well. All of our key tasks, from the first priority (needs to be done for the game to be complete) to the final priority (Would be nice but far from essential) were finished, minus a couple that got scrapped.

In that time, we've taken a step back from the game and focussed on the user experience, and I think perhaps that was just as important, and that if we hadn't finished early and had that time, the game would not be considered a success. I mean - the gameplay itself is fine. But I think the two of us both learned a lot about making a product in this time, as well as about the work flow.

The exciting thing is that at the end of 8 days, the two of us have made a game together, complete with everything from audio to ai to kick butt graphics to an easter egg named Sir Theodore Quentin III.

The last is proof that the two of us get along well and are able to make each other laugh, and also a sign of our love for the game.

Perhaps I shall write an in-depth post mortem tomorrow. It might even be better to do so after the game has actually shipped, since by then I'll have actually got it on the iPhone (still haven't gotten my developer approval from apple) and will have more experience to share.

But in the mean-time, I will share some screenshots and small tidbits about them:

Our button, in the iPhone simulator.

New title screen, complete with sexy new logo.

What the player sees the first time they play the game.

The help screen, including the first tantalizing hint about our Easter Egg. Hint: He does not show up in the help screen initially.

Initially it looks like this.

When the player does well, the game politely prompts them, from the stats screen, to try a harder difficulty level. If they do really well, they get a trophy!

Biggest Problem

The biggest problem I encountered with cocos can be demonstrated with the following screenshot:

As can be observed, there are strange lines around the sprite. I observed this many times, often with scaling and occasionally with moving objects. My initial instinct was that it was a problem with the sprite sheet, but further investigation revealed this was not the case.

Research in the cocos2d for iPhone community revealed that this problem actually occurred because my units had floating point positions. Given that my game moves dynamically based on time, it was entirely unavoidable that this would be the case, but rendering at floating point positions created the behaviour seen above.

The solution was far from elegant but given our time frame, perhaps the most reasonable. (The elegant one would be figuring out why cocos2d or openGL was doing that and fix it.) Essentially, I removed as much scaling as I could, and then, in my units, taught them to move with two positions - one position that they knew about, with proper floating values, and another that cocos new about, which was their position rounded to ints.

Why were two positions necessary? Why didn't just ints work? I actually did try it, but it had some strange behaviour. Characters were jumping around choppily, and some characters weren't able to move because they didn't even travel a pixel a frame! In short, any unit whose speed was less than 60 pixels a second was unable to move properly, and only three units in the game move faster than that. As such, the internal floating point position was essential to keep the movement fluid and fun, while the render-only rounded position was essential for proper rendering.

And that is the end of the reign of Castle Conflict. With 21 minutes to spare before our deadline, I end this blog post.

Saturday, April 11, 2009

A Title

According to our xp-dev page, we have completed 95 of 106 tasks. Of the 11 tasks remaining, they range from getting the sounds playing in the game to getting our splash screen in the game. We are in the final stretch.

The main things we are going to be working on from now on, other than the above mentioned essentials, are the 'shiny' things that will give the game more appeal - little animations here and there to make the game feel more alive. As well, because it has not yet been put on an iPhone (and won't be until I get approved by apple), I can't verify that there won't be some performance snags we haven't yet encountered - but those can and will be dealt with when appropriate.

Some of our recent progress:


The title screen. As you can see, it lines up directly with the main screen, such that when you click Play, it appears to the player as though the hud simply changes. We thought this was essential to give the player the feeling of being in the game from the get-go.

As the continue button suggests, saving and loading is functional. The game also auto-saves when it is closed.

There is one other milestone hinted at by this title screen: we have finally come up with a name for the game. We actually were fond of Castle Clash but it sounded too close to Castle Crashers. After much pondering over names, we finally settled close to where we started, with Castle Conflict. It's not going to change the world; but then again, it's just a name.

Some of the aforementioned sparkle is in this screenshot - a bird flying in the background, and sunlight reflecting off the water. Just tiny little things that aren't very obvious but help give the game a polished feel. (If you can't see them, try right clicking -> view image).

The settings screen, with the font built by Josiah on it. This one hints at a milestone above and beyond the settings that we hit today - artificial intelligence. The ai now uses all units and is far more intelligent than it was previously.

The new organisation of the buttons. Now they are sorted by functionality and price. Some extra tweaking will probably still go into this area of the game. (For example, no price is shown as of yet)


Josiah and I are both feeling highly optimistic. I think the biggest thing about this game that makes me proud to be working on it is that every time I see it, I want to play it. The graphics are appealing, the gameplay smooth and pleasant. The experience feels very well thought out and accessible.

I actually can't wait to be done so I can put it on my iPhone and actually play it.

We have 4 days left after today to hit our deadline.

Friday, April 10, 2009

Newest Images

Current Progress:

Images speak louder than words - below are images of where the game (still untitled) currently is.

Taking the opponent by storm - Cavalry and zeppelins, in action.

A shot of the ground units in action - the woodcutters, armored knight, and foot soldier.

Bomber laying waste to whatever it can

Cannon launching a projectile against the opponent

Staying on Track?

Today was Friday, the third real day of work on the project. And at the end of the day, nearly all graphics were complete, and nearly all gameplay was complete. There are still a few areas that are going to need tweaking - the ai only knows how to use three of the units, for example, since I haven't touched it since the original prototype from last Sunday.

Main areas we have to investigate still include: interfaces (as you might be able to tell from the images, it could use a little tweaking in terms of layout), audio, and the general niceness that people expect with iPhone applications (auto-saving on quit. etc).

We are well on track to have all of this done by midnight next Wednesday. To our surprise, we may even be able to finish sooner, if we are able to maintain our pace from the past three days.

Wednesday, April 8, 2009

First day of madness

The secret to getting things done is just to do them. Over the course of today, Josiah was able to make most of the graphics for the game, and I was able to get almost all of his graphics in, get animations in, add a couple more units, and help prettify movement.

We started today with the following: . (Anyone who plays game maker games may recognise the art in this game as being ripped from a game known as Medieval Clash ... this was done during the prototyping stage to enable me, a programmer who can't draw, from having to try and draw things. The game we are making is in fact inspired by Medieval Clash.)

By the end of today, the game looked like this: .

This can be compared with Josiahs latest mockup, and you can see that we are well on track.

You may notice in the above image that there are two buttons repeated, and that they still have the old graphics. This is because I have not yet got Josiahs button images in the game (they are already complete). Cocos does not have an Atlassed HUD Image, like I thought they did, so I'm either going to have to get the HUD split into a separate image for each button state (bad ... ) or figure out another solution.

Now, I'm going to end this blog post on a quick tutorial on what specifically you need to create an animation in cocos2D and have it play and repeat. There may be a better way; this was the best I could find today. Due to our development cycle, the quick and easy wins are what we are aiming for.

Step 1: Create an AtlasSpriteManager

Assuming that you have an image named img.png, make the following call:

AtlasSpriteManager* mgr = [AtlasSpriteManager spriteManagerWithFile:@"img.png"];

Once you have your mgr, add it to your Layer, Scene, or other Cocos2D node.

[self addChild:mgr z:GAME_DEPTH];

Step 2: Create an AtlasSprite and add it to your AtlasSpriteManager
CGRect rect = CGRectMake(0, 0, 50, 50) ;
AtlasSprite* sprite = [[AtlasSprite alloc] initWithRect:rect spriteManager:mgr];
[mgr addChild:sprite z:GAME_DEPTH];

Step 3: Create an animation
An animation in Cocos2D is represented using an AtlasAnimation. So create an atlas animation and supply it with the rectangles you want.

AtlasAnimation* animation = [AtlasAnimation animationWithName:@"anim" delay: 0.1f];

If your sprite sheets, like many that exist, are laid our horizontally, you can use a nice cheat to get your sprites lined out without having to hard code each value.

int numFrames = 4;
for(int i = 0; i < numFrames; i++)
int x = rect.origin.x + (i * rect.size.width);
[animation addFrameWithRect:CGRectMake(x, rect.origin.y, rect.size.width, rect.size.height)];

Turn your animation into an action

Next, you must create an Animation action and apply it to your sprite.

id action = [Animate actionWithAnimation:animation];
[sprite runAction:acion];

On Repeating
The above will actually only play your animation once - if you want your sprite to play repetitively, you must create another action from your initial reaction that repeats. This can be done as below:

id repeatAction = [Repeat actionWithAction:action times:100];
[self runAction:repeatAction];

As best as I could tell, there was no way to create an action that would repeat forever. Supplying an aribritrarily large number to times may work in some cases, but I'd recommend actually digging deeper and finding a real solution, or implementing one, in most cases. In the case of this game, because of the small time frame and because our objects are not on screen for longer than 10 seconds at a time, setting the action to repeat 100 times was a suitable solution.

The week of no sleep

Based on how hard I consistently push myself, one might begin to wonder if I was perhaps a little bit insane.

Let's review the facts: I am developing three games at the moment: one full time (Gwabs), when on the side when I have the time (Population Control) and one is awaiting some feedback from our desired distributor before I have anything to do (NaviBlast).

So why is it, then, that I would think it would be perfectly okay to start a new game project? Using new technology I'm not familiar with?

And why would I set the goal of completing that game by midnight, next Wednesday?

The Plan

The game I am making is currently untitled. The reason that I feel that it can be completed is because of two very simple facts:

1) I was able to program the core gameplay / prototype in 7.5 hours on Sunday. Giving myself 8 days to polish it into a product does not seem unreasonable, as long as I am able to dedicate enough time to it.

2) I am working with Josiah, an old friend of mine, who I have worked on games with in the past. Him and I are both able to put in a fair amount of hours on this project to ensure that it succeeds as quickly as possible. Josiah is amazingly talented - he has been on several game projects, doing game design, level design, audio work, and pixel art. While every one of the games he's worked on was an indy game available for free, his work ethic is superb. Currently, his main project is a computer game called Worlds Beyond. Josiah also does music, and has his own band, Swimfail, under which he has released 3 LPs and 3 EPs.

The Pitfalls

Alright, so it sounds like we have a dedicated team. But that's not enough, and there are several pitfalls that need to be considered.

1) We have two people doing the job of 4. Josiah is doing all the art and audio; I am doing all programming and business side of things. At the same time, both of us have been involved in the game design process.

2) We have 8 days. But that doesn't mean that we each have 8 days to contribute. As previously mentioned, we are both actively involved in other projects. I have to give Gwabs precedence over this game, and will have to spend time on Population Control. Josiah probably has other commitments of his own.

3) Josiah does not have an iPhone. We are developing for the iPhone, but everything that we build, he is not going to be able to see. Only I am going to be able to see our final product, and he's going to have to rely on screenshots and screen captures to help him know what tweaks he needs to make.

4) Josiah lives in Victoria. I live in Calgary. In short - we are not even going to see each other in real life during the course of this project.'

5) It's on the iPhone. That means that the game is going to have to gracefully handle the player quitting at any time, incoming phone calls, etc.

The Method

So how are we going to overcome the above obstacles?

1) Rapid Design Process - almost as soon as we agreed to this project, Josiah and I spent about 3 hours fleshing out the design, figuring out how we want things to look / what we want to accomplish, and by the end of it, we had what was roughly a full on design, fleshed out as rough notes. Feature Lock has already been implemented.

2) Tiered Design - Our design allowed us to separate different gameplay elements into different categories of importance. If we don't have units that can collect resources, our game cannot work. If those units don't have an animation for harvesting resources, we can still make it clear to the player what's happening. Perhaps we don't need to include every unit; flying units, for example, add an extra layer of balancing that we may not need if time does not permit.

3) Constant Communication - We have to ensure that we are both up to date on what is going on. There can be no confusion about who is doing what, or when we can expect art assets.

The Tools

1) XP-Dev: XP-Dev is a free subversion host (up to 1000 MB) and also provides the ability to create and assign tasks, create wiki pages, report bugs, etc. We are using XP-Dev for our tasks, to sort them by priority, and estimate how much time the project is going to take.

2) Messenger - In order to remain in constant communication, we need to be able to communicate constantly. Using Windows Live Messenger (for Josiah) and Adium (for myself), we are able to constantly be available to each other.

3) Drop Box - For easy transfer of files

4) XCode / iPhone SDK / Cocos2D: These are the tools that I will be using to write the code and test it. I am using the Cocos2D engine to allow for quick development, so I don't have to spend a lot of time mucking about in OpenGL to get things on screen.

5) Josiah is using some less than standard software: where many artists would turn to photoshop, Josiah is using what he describes as "a weird obscure piece of engrish software that I can only assume is named "character mucker 1999" but otherwise seems to have no title", and modplug tracker for music and sfx. He is also using 'Cool Edit Pro 2' for mixing and mastering.

The Final Words

Is what we are attempting even possible? Can two individuals really give up all of their free time, and perhaps much of their sleeping time, for 8 days, just to make a single product on the side of their other commitments? Success or not, it's going to be a wild ride - but Josiah and I are determined to push ourselves and prove to ourselves we are capable of anything.

182 hours remain between now and the end of our project cycle. Time allowing, there may be more blog posts outlining our processes, where things take less time than we expected, where they take more. With luck, next Thursday there will be a post mortem here describing, in high level, just HOW we turned a quick prototype to a full fledged product in just 8 days.

Thursday, March 19, 2009

iPhone Game Design - Getting it Right : Blocked

The iPhone app store is going crazy, with over 25000 apps available for download already. One must give their props to apple, who must be making a ton of money from their share of the downloaded money.

As a developer, the iPhone is an enticing platform. Like the Nintendo Wii and DS, it offers a slew of new functionality that allows developers to create applications that can be intereacted with in new, exciting ways. And like Xbox Live Community Games, it has a channel that is relatively easy for any developer to publish their app on.

With the ability to push a new product to the iphone relatively quickly, many developers have swarmed to the platform. Achieving a position in the top 25 paid apps in the app store is an accomplishment in and of itself.

One of the most prominent app types in the app store are games. Of these games, Blocked, a 99 cent game, is currently sitting at position 6 in the top 25 paid apps. For any developers looking to pull a profit from the app store by developing a game, I think that Blocked is definitely one that needs to be examined in detail.

Blocked is supremely simple in many ways. The graphics use minimal colours and are, for the most part, rectangles stylized to look like rocks, on a grid paper background. The gameplay uses only one iphone feature - touch. And the idea (moving blocks) has been around for ages, appearing in many action/adventure/and rpg games throughout the history of gaming.

So, on a system that allows users to have apps with internet connectivity, access to their phone, geographic tie ins, advanced acceleromator functionality, and many different types of touches, why does an app that only allows the player to perform one action, simply by moving their fingers, be such a success?

I think that the story behind the success of the game is about as simple as the game itself.

Blocked is a game that is immediately accessible. Anybody who had used an iphone knows exactly what to do in blocked. There is a 'help' screen that explains what the goal is to lost players (move blocks out of the way and get the blue block out of the screen), which most players will only have to reference once, if at all.

For a game where the player does only one thing, Blocked is deceptively addicting. Because the actions the player performs are so simple, the player knows that they are able to beat any level - but it will tax their brain. The game follows the principle of 'Easy to Learn, Hard to Master' to a tee.

The game also puts the player into the game straight off the bat. As soon as the game loads, which does not take long, the player is taken directly to the game. There is no title screen where the player selects to load a file, start a new game, tell a friend, or get help. They are simple greeted with a simple interface that has a level, and a few controls.

This minimalistic interface ties into what I'm assuming was one of the games goals, which is to be a stress free game. Like a crossword puzzle or a sudoku puzzle, blocked does not require the player to solve the puzzle in a set time limit. When creating a game, many designers are tempted to add challenges to the game, such as time limits, or dangers, or limiting the number of moves a player can perform, to increase the challenge. Blocked has wisely foregone this option, allowing the mental challenge the game provides to drive the fun.

The game follows a stress free pattern in nearly ever facet. I so far have only reached Medium, so if this changes later on I cannot comment, but for the beginning of the game at least, every single level takes place in a single screen. There is no camera moving around to stress the player out as they try to find out what else is going on, there are no unknowns - the player always knows everything at their disposal (in this sense, it is even less stressful than a crossword puzzle, as the player does not have to constantly reference what the current row of letters is for).

If the player is stuck on a level, the reset button is always available in the lower left corner, allowing the player to start from scratch. If they are frustrated, then they can just skip past the level, even if they haven't beaten it. The only limitation to which levels a player can play is based on which is the lowest difficulty they have completed completely.

On top of being incredibly simple to pick up, addicting through 'Easy to Learn, Hard to Master' (ETLHTM) and stress free, Blocked has an extremely polished user experience. The game puts them right into the game as soon as it's loaded; if they were playing before, it loads both the level they were playing and their last configuration in that level. Navigating to any level is easy through the level select screens, which are sorted by difficulty, so if the player wants to move to a different level, there is no challenge in doing so. If they simply want to move forward or back a level, there are even arrows on the top of the screen.

In terms of development, Blocked does not seem to be a difficult app to develop. With very few art assets, and simple gameplay, the most time was probably spent on polishing the user interface, and designing the levels for the game (I believe there are about 100 in the game, sorted by difficulty into tiers of about 20 levels each). By concentrating on a simple, stress free, and polished user experience, it was able to rise to a high level of success.

Saturday, January 24, 2009

James Clavelle - Tai-Pan

Taipan is the second book (chronologically) in James Clavelle's Asian Saga. Do not be fooled by the fact that it is linked to the rest of the series however; it is a stand-alone story that can be read regardless of what else you have read in the series, and make perfect sense.

James Clavelle's writing is always jarring to me initially, because he can be viewing the story from one characters point of view in one sentence, and then the next sentence be viewing it from another characters point of view. However, this is perhaps one of the strengths that gives his stories such power - every character has his say.

And that is the driving force behind his stories. Behind everything else that happens, every character is scheming, planning, and then scheming some more. But James Clavelle's characters are self serving and devious, and they are often planning things that will benefit themselves more than others - just like real human beings. Plans often go against the plans of others.

Yet the story is carried much by the planning and less by the execution, for James Clavelle artfully inserts plot twist after plot twist, driving the story in new and exciting directions with each passing chapter. Plans are often being reworked, put on the back burner, or discarded entirely. When reading his books, I am often reminded of the quote: "Man plans, and God laughs."

Tai-Pan takes place in the 1840s, following the 'Tai-Pan' of the Noble House, a british trading company. Tai-Pan means leader, and the leader of the Noble House is Dirk Struan, an irishman who has many alternate plans. He rules it with his half-brother, Robb; their main competitor is Brock and Sons, another trading company that is run by Tyler Brock and his son, Gorth Brock. Struan and Brock have long been embittered enemies and share a history ruled by hatred and revenge, scheming, wins and losses. Their rivalry drives much of the planning between these two characters.

Noble House and Brock and Sons are both Opium traders, trading with the Mandarins China through the port of Canton. Britain is attempting to open up the border to China, believing that it is the key to Asia, and world domination.

These are just a couple of the driving factors in the story - there are many more that come up during the course of the story - religion, penitance, forgiveness, revenge, nature, love, sex, marriage, global themes, etc...there is pretty much no stone left unturned. And this, too, helps lead to the fullness of the story and the characters.

Much like Shogun, the book starts in the middle of a story, and by the end of the book, there are so many threads going on that you don't know how James Clavelle could possibly wrap it up. And he does not attempt to try; this book is much like a snapshot of real life. There is no clean beginning and ending in any story, not with all the different factors and characters that become involved, and it becomes impossible to try and tie things up. So the book ends but the story is allowed to continue, in your mind, as you fathom how all the myriad of characters will respond to and move forward given the conditions at the end of the book, and what other events will occur that they will have to respond to before the book is over.

The following is a spoiler, so if you intend to read the book, DO NOT read any further!

At the end of the book, after all the scheming, planning, fighting against disease, etc., Dirk Struan is killed in a tai-fung storm, leaving all of his plans unfinished, and unlike my expectations, his life is not ended by Tyler Brock - their rivalry was ended by an indifferent force outside their control. All the different things that the book was coming towards come to a sweeping end in that book, as the british settlers in Hong Kong are forced to come to terms that their Tai-Pan, the man who seemed so immortal to them, has vanished. Many of his secrets remain unknown; many of his plans, even those closed to fruition, now lay in ruins; and there is much left that other characters were planning based on him. I believe by ending the book in this way, James Clavelle was making two statements: one being on the power and nature of the world (and with it, nature itself), no matter how immortal someone may be, they cannot control everything around them; and secondly, that no matter how powerful and god-like someone may appear, their life can still end at any time, unexpectedly - so it is best to do the things that you plan on as soon as possible, instead of doing the things that do not matter to you, before something you could not have expected comes along and ends your life.