Wednesday, 2 May 2012

The Joys of Test Flight

If you're an iOS developer and you don't use Test Flight  testflightapp.com  you need to start immediately!  The site does two things really well.  First of all, it allows you to recruit test users for your app.  You can do this by passing out a URL for example: http://bit.ly/HJxYmd or via an email.  Best of all, if the email is read on an iPhone, the user can install all the bits and bobs necessary to run it.  No more mucking about with provisioning profile installs.

The other thing it does, it streamline the distribution of new releases.  When a user signs up, you can quickly copy their device details over to iTunes connect and update the relevant provisioning profile in record time.  Then when you create a new build, an email can be sent out to all the registered users.  Great stuff.

Best of all, the site is free to use!  Pretty darn good if you ask me!

Thursday, 26 April 2012

New Version for Mac and iPad

Today, I've released a new version for the iPad and Mac.  It now displays the valid territories to select for the various phases, as well as allowing the Mac map to be zoomed using the scroll wheel.

Mouse Scroll Wheel in Cocos2d

Today, I felt a bit dim.  For ages, I'd had a nice little slider on the game which was used to zoom the map in and out.  On the iPad version, I use a gesture handler to zoom in and out with a pinch.  I couldn't quite work out how to do the same thing on the Mac.

I was thinking I'd have to do some tricky gesture handling, or worse still, just use the ugly slider.

After peering into the CCEventDispatcher header, however, I discovered the delegate method ccScrollWheel. Derrr...  How better to handle scrolling than using the scroll wheel!  Five minutes later and the map is now zooming nicely using the scroll wheel.  Nice and neat!  Just read the deltaX and deltaY properties to see which direction the scroll was in.

It just goes to show how rewarding it can be to look at the header files now and then...

Thursday, 19 April 2012

Web Services for Fun and Profit...

Web Services. They're all the rage, but what can they do for YOU? I wanted to be able to spam, I mean inform users with a message of the day type functionality. The idea is, when the user starts the game, they get a brief message displayed on the home page. I plan on using this to tell existing players of the test version when a new version is available. That way, they'll know when to go get the new version.

the first thing I needed, was a service that would host my web services. I chose 123 Reg . I use them to host my web site and they had a reasonable sounding monthly charge for the service. I know have a database with which to store the data and a PHP enabled web site. The trick now, was to learn me some PHP!

My starting point was the excellent tutorials by Ray Wenderlich and co here. This gives a run down of how to create a simple service to send out and cash in promo codes. I'm definitely going to be using that. It seems like a neat way to get around that annoying 50 user limit for sending out promo codes.

After a brief bit of dabbling, I was able to get my Message of the Day (MOTD) service up and running. It was actually a lot easier than I was expecting. The syntax of PHP should be legible to any Objective C programmer.

I could go crazy and implement a whole bunch of user tracking using web services, but there are a bunch of sites out there who do that already, so I'm planning on using their services, rather than my write my own.

So, web services - useful and not that hard!

Wednesday, 18 April 2012

Highlighting Possible moves...

A common problem in strategy games is how or if possible moves are highlighted. On the one hand, for a new player, having a big shiny sign that says "Click here, but not there" is useful. On the other hand, it can make the board look cluttered and annoy a player who knows what he's doing.

What I'm been toying with of late, is adding some subtle highlighting to the territories that can be clicked on and make the invalid territories darker. So far, so good, but I'm conscious that I want all the pretty graphics to shine through. I don't want to make them too dark so that the images are obscured or look too murky. The next drop will have this shading in it. As usual, all feedback warmly welcomed!

Tuesday, 17 April 2012

Sample Screen shot


Here's how the game currently looks...


Castles and Towers!

The latest edition to the game is the addition of Towers and Castles. The idea is to encourage players to fortify their position by building defensive structures. Any territory can have a tower added to it. That gives a defensive bonus when attacked. 5 troops come out of the tower to defend.

The cost of the tower should be about twice the number of troops it gives. That way, it rewards the player over time, rather than giving an instant hit. it will make the territory easier to defend, but it won't be impenetrable.

Once a territory has a tower, the tower can be upgraded to a Castle. This gives the same bonus troops as the Tower, but it also makes defending the territory much easier. It effectively makes every unit in the territory harder to kill.

What I'm currently toying with, is what to do when the tower or castle gets overrun by the enemy. At the moment, the tower and castle are not affected. The new owner gets the full benefits. That will make people think carefully before maybe giving their opponent a boost if they lose the territory.

On the other hand, it might be fun for the tower to get damaged. Until it's repaired, it won't give any bonuses, but repairing the tower will be much cheaper than buying a new one. Something to be play tested, methinks...