Posted October 5th, 2010 in Game Design by Charles Micou
Although we are currently limited to 2D in a big way, and our projects for a while yet will still probably be top down (perhaps iso with overlapping to mimic 3D if I somehow develop artistic ability overnight), I cannot stop drooling over this:
The running at over 1000 fps at times might be a little excessive, but I doubt a cap would be to hard. This opensource Java engine is still an alpha after all, and it looks like it has a whole lot of potential.
Callum and I would need to switch from using Eclipse to netBeans, but it’s far from the end of the world, and well worth it by the looks of things. 3D is just one of those things that makes everything better.
I should probably stop daydreaming and get back to doing some work since this is such a long way off, but maybe in a year’s time we’ll have some 3D up and running.

Thoughts on Maps for Shyft

Posted October 1st, 2010 in Game Design by Charles Micou
As Callum pointed out earlier, the map we’re working with for testing is not one you’d want to use when actually playing a game. First of all, it needs to be fair. This usually implies symmetry or randomness (which I will get on to further down), or both. More importantly, however, a good map needs to be interesting.
Consider the map below:
This map looks quite nice: the trees are by the water and the mountain, and everything is spread out in an even way. What really matters about this map, though, is that there are multiple strategies a player is likely to consider:
So, we have Player 1 starting in the bottom left, and Player 2 starting in the top right. Because roads provide such a large bonus to movement, mobilising troops towards the centre of the map (A) is very easy and the fastest path to the enemy. However, the choke points caused by the bridges (B) mean that you can hold off your opponent. The alternative is to go round the sides, passing through (C). Note that because of the very defensive terrain near (D), it would be wiser for Player 1 to attack along the bottom of the map whereas Player 2 would be better off going along the top. This slight imbalance means that you either have to scout or preempt your opponent.
This constitutes what I would call a fairly good map. If you had the added complexity of resources (which we might get around to adding at some point) and construction of units, many resources placed in the centre and perhaps a few along the flanks would make this map more fun.
Our criteria for maps, such that they could be generated via some seed numbers (and perhaps a selection of other factors) would have to be as follows:
-The two teams can reach each other

-Tiles are assembled correctly (i.e. rivers the right way around)
-The map is symmetrical (simply because this makes balancing so much easier)
But what about if we want good maps:
-There is more than one route to the enemy
-There is imbalance in these routes, such that decisions have to be made by each player as to which route to take
-Aesthetic appeal and ‘common sense’ in placement of tiles (this is a hard, yet interesting bit)
-There is ample space to manoeuvre troops, but also choke points
I am all for a random map generation option: it gives the game a longer lifespan, can be more fun under certain circumstances and provides variety. However, if 10 or 20 maps similar to the above (which was not by any means a challenge to make) could be played to provide this variety, the quality of the random maps would need to be quite good to compete. It looks like if we want to give the game more longevity via maps, letting the user use Tiled to make their own is the best option at this point.

What is an algorithm?

Posted October 1st, 2010 in Game Design by Callum Lawson

A algorithm is defined by both the algorithmic problem and its solution. An algorithmic problem is the characterisation of all the legal inputs for the algorithm and the desired outputs for those inputs. This is a rather trivial example of an algorithmic problem:

  • Given a set of numbers (i.e 5,9,7,2,1,5) return how many numbers are divisible by 3.
For the above set of numbers the answer is 1. One could easily write a function that would give this output:

for input(a,b,c,d….) output(1) 

This would provide the correct output for the example set of data but not all possible sets of data – it is not an algorithmic solution. An algorithmic solution is one which will provide the correct output for any legal input. The pseudo-code below would be an example of an algorithmic solution for this problem.

(1) create variable a
(2) for – number of numbers in the set
           if – current number is divisible by 3
           add one to variable a
(3) return a

This code would produce the correct output for this algorithmic problem regardless of what the input is as long as it is a legal input (a set of numbers). It does not matter if the set is 5 numbers or a million – the correct result will be returned.

After claiming that my line of sight code in the previous post was an algorithm I realised that I do not know the definition of one. So I did some research and wrote the above. In hindsight I think I was correct in calling my code an algorithm.

Shyft GUI

Posted October 1st, 2010 in Game Design by Charles Micou
I’m Charlie, and since Callum’s ability with programming far surpasses my own, I have stayed pretty much completely out of the code so far. However, as the slightly less graphically challenged member of the pair of us, I have so far done most of my work on potential content, graphics, GUIs and gameplay mechanics.
The way the GUI has come along so far is very interesting, as it has sort of evolved with the way the game is going so as to keep the code simplistic while making the GUI as intuitive and easy to use as possible.

The earliest GUI design was simply a way of displaying the information that we knew we’d need:

This was then refined to a slightly less conventional layout, with commands for units on the sides (map background image was taken from Advanced Wars as a placeholder):
Comfortable with the shape of something similar to the above, we expanded it to accommodate some of the features we decided to add:
After some refining of the above, we have finally settled on the bar you see on the right dynamically adapting to which tile the user’s cursor is over, or which tile has been selected. This will mean that we can display more things in more space as and when they are needed.