Tag: battle for vesta
Adding Save Game to Battle for Vesta
by john on Mar.08, 2010, under iPhone
One of the most requested features for Battle for Vesta is the ability to save a game. This is an entirely reasonable request. Playing the game all the way through can take some time and it is inevitable that you’ll get interrupted by a phone call or some other distraction and find yourself wanting to pick up where you left off.
Also, over the last few updates the game has gotten a lot harder. I find myself getting shot much more frequently and making it through the last few missions is really difficult. Sometime I just want to replay the mission that I just died on rather than start over from scratch.
I started thinking that the retry functionality was the low-hanging fruit and that I should implement it first. Then after some thought it occurred to me that I could kill two birds with one stone. The simplest way to do this was to save the starting conditions at the start of each level and then add a new way of starting the game, a “retry” button. Pressing the retry button would start the game up on the same mission that was last played. So if you die or get interrupted you can always go back to the start of the last mission you were playing.
It turns out that this requires very little code, but it took me a bit of googling to find the bit of the iPhone framework that does what I need. It turns out that there is a persistent dictionary for the iPhone called NSUserDefaults that allows you to store key/value pairs. It also handles persisting them to flash so you don’t even have to worry about the filesystem. So now I have some simple code to save a game in my startLevel() function:
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
[prefs setInteger:level forKey:@"levelKey"];
[prefs setInteger:myLevels.goodRemaining forKey:@"goodRemainignKey"];
[prefs setFloat:shieldPower forKey:@"shieldKey"];
[prefs synchronize];
and some complementary code to pull that information back up when a user hits the retry button:
void retry()
{
gameOver = false;
if (isHit && deathCounter <= 0)
{
isHit = false;
uKills = 0;
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
NSInteger retryLevel = [prefs integerForKey:@"levelKey"];
NSInteger retryGoodRemaining = [prefs integerForKey:@"goodRemainignKey"];
float retryShield = [prefs floatForKey:@"shieldKey"];
if (retryLevel == nil)
{
shieldPower = 6.0f;
level = 1;
energyCollected = 0;
}
else
{
shieldPower = retryShield;
level = (int)retryLevel;
energyCollected = 0;
myLevels.goodRemaining = (int)retryGoodRemaining;
}
startLevel();
}
}
And that's about all it took to add both save and retry to Battle for Vesta. I'll be submitting this update to the App Store today, so you'll be able to use this feature soon.
I should mention that my Googling eventually led me to the the iCode blog which had a helpful walkthrough of how to use NSUserDefaults and which convinced me that it was the correct (and simplest) way to implement what I wanted. However the blog states that the synchronize message is not needed. In my experience it is needed as I tried it without it and it didn't work.
Piracy and iPhone Game Marketing
by john on Jan.05, 2010, under iPhone
So Battle for Vesta has been live in the App Store since December 28, 2009. In that time I’ve posted about it in forums, promoted it on this blog and Facebook and Twitter, given away a lot of promo codes, and posted on a lot of forums. I created www.battleforvesta.com and posted a trailer and videos of gameplay on YouTube and Vimeo. I’ve also emailed dozens of iPhone app review sites. So far one of them has been kind enough to send an automated acknowledgment of submission email, in which the site admits that it might never even look at my game and even if the game gets looked at it probably won’t get reviewed. There has been no response at all from the others.
In short, while I haven’t done a perfect job of marketing my game, I’ve done as well as I knew how to at the time and have learned some lessons. I’ve also set up Google alerts so that if the game gets mentioned anywhere I know about it and can respond appropriately.
Marketing an iPhone game is incredibly difficult right now. The market is crowded (much of it is crap) and it is very hard for casual users to discover new apps that might interest them. With this in mind I’ve priced the game at $1.99, so that it can be an impulse buy. While I think the game is worth more than that, I didn’t want the price to be a barrier to people that were merely curious about it.
So after being live on the App Store for a week I’ve sold about 30 copies and about the same number of people have turned in promo codes. I’m not ecstatic about those numbers, but I’m not surprised either. I will say that I’m a bit disappointed in the unwillingness of people to rate and/or review the game, especially if they’ve been given a promo code and agreed to.
This morning my Google alert told me that the game had started to show up on pirate sites. I had expected this and I was actually a bit surprised that it didn’t happen the day the game came out. In less than an hour one pirate site indicated that the game had been downloaded more than 30 times. No, I’m not going to link to any of them. I will note that I am amazed that they show up on the second page of a Google search for the game. Odd that pirate sites seem to have so much credibility with Google.
I’m trying to figure out exactly what it is that annoys me about this situation. I think there are a few aspects to this.
One is that $1.99 is cheap. That’s less than coffee money. If it entertains you for 30 minutes total you’ve gotten your money’s worth and then some. I’ve played it for countless hours and I fire it up just for fun every day. So I hardly think that price is an excuse.
Secondly, if $1.99 is really going to break the bank, ask me for a promo code. If you claim that you’ll post a descriptive review (I don’t even ask that it be positive) then I’ll give you one. I know full well that the chances of you actually posting that review are about 1 in 10, but that’s the way Web 2.0 works, right? If you pirate the game and love it there is no legitimate channel for you to rate the game, review it, or give feedback. So now not only am I out a sale (which I was willing to give up) but I’m also out any chance of your love of the game helping to make it go viral, or even your criticisms of the game being used to improve it.
Finally, it is immensely frustrating to put all the above mentioned effort into marketing this thing through legitimate channels and get very little response. Yet the game gets downloaded as much in an hour from a single pirate site as it did in a week legitimately. This makes me wonder if somehow the pirates know something that I do not. They’re able to make my game more popular in an hour than I am.
Finally, if this is just kids who somehow saved up $200 for an iPod touch and don’t have any pennies left to fork over for a game, I guess I can understand. Almost. ($1.99!) I’d still rather give it to you for free than have you steal it from me. But somehow I suspect that the majority of this isn’t being done by penniless kids at all but is perpetrated by people that can easily afford the game and just get some perverse joy out of cheating me.
While I’m at it, the first four people to comment on this article will get a promo code emailed to them.
Fastest App Approval Ever?
by john on Dec.30, 2009, under Uncategorized
I submitted Battle for Vesta to the App Store on Dec 23, which is also the day that iTunesConnect went down for the holidays. It came back up on Dec 28 and the game was approved pretty much as the site came back up. That’s 5 calendar days, which is impressive, but it is also basically zero working days, which is unheard of.
I’ve just submitted a 1.0.1 update, we’ll see how long that takes to process.
Battle for Vesta – Live on the App Store
by john on Dec.28, 2009, under iPhone
Battle for Vesta is now for sale on the App Store for $1.99. I suggest that you buy it. And tell all your friends to buy it. Seriously. Two bucks is cheap, and the game is great.

Also, www.BattleforVesta.com is live now. Link to it.