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...

Welcome to the Experiment!

This blog is designed to track the highs and lows of the development of a new turn based strategy game for the iPad and Mac. The game is based on classic board games, such as Risk and Samurai Swords/Ikusa. The working title of the game is "Riskoid", but that will change once I get around to thinking up a better name!

At the moment, I have a working prototype of the game, which I'm going to start letting people play. Normally, I wouldn't dream of releasing a game that is this unfinished, but as the game's so broad is scope, I figured the sooner people start playing it, the better it will become. On the other hand, it could be as buggy as all hell and people might hate it. I'm hoping for a nice middle ground!

The game is being developed using v2 of the cocos2d framework. Whilst the game is not that graphically intensive, I love the fact that with a few small tweaks, I can pump out both a Mac and iOS version using the same code. Sweet!

As the game needs quite a large screen to be sensibly played, I've decided to produce an iPad and Mac version, but not an iPhone version. There's no technical reason for not having an iPhone version, but I just think of the small screen, it might be too fiddly to play properly. No small screens for you!

Anyway, please come back periodically and check what I'm been up to!

Cheers,

Dean.