Game in development – at last!

I’m not sure exactly why. Confidence?  Time?  Simply being in awe of daring to do something that I hold in such high regard?  I simply don’t know but I’ve tried and tried to motivate myself to write a modern version of Laser Squad for a long, long time.  (Same goes with Dark Side, Hydrofool, Tau Ceti and Auf Wiedersehen Monty)  I got as far as a buggy version of Monty before real life took over.  Now I’ve got some motivation and I’ve pulled my finger out…

Rebel Forces is now in development!!!

I feel it would be a heresy to simply remake Laser Squad since, although it’s a classic, it’s also quite limited by the machine it was originally written on.  My intention is to remake an enhanced Laser Squad.  Cleverer, more flexible and with many more scenarios – even a campaign!

The current state of things is that I have defined the core C# objects and am building using MonoGame which should allow me to (eventually) publish for all the major platforms.  I’m going to charge a nominal fee for the game.  It would be nice to actually make some cash to pay for licences, etc. but I’m not planning on charging more than a pound for each version.

Currently in scope are:

Windows 8 Store, Windows, Windows Phone

in scope but lacking a licence:

Linux, Android, Ouya, PS Mobile, iOS, Mac OSX

Anyway, I digress.  I currently have the core objects in place albeit slightly threadbare.  I’m in the process of building an editor to allow me to build scenarios.  Naturally, once I have some scenarios ready, I can build an engine to process the moves, etc.

I don’t like to make detailed timescales since real life has a nasty habit of interfering in your plans but if all goes well, I’m hoping to have the editor up and running properly by mid-March.  Then I’d hope the engine would take another month to 6 weeks to build.  Finally, I’d hope that while testing, I can get my sprite sheets cleaned up with nicer graphics and ping in some music and sound effects.  Then a final round of beta testing (any volunteers?) and I can start putting together the releasable campaigns – with free future updates/campaigns subject to time and demand.

I also plan to contact Julian Gollop for permission to include the original missions as unlockable rewards in-game.  I’ve heard he’s made the game public domain but to have his blessing would make it even better.

One final thing, I’ve made the editor with a rule builder which should (hopefully) give stronger conditions and scoring for gameplay.  For example, I’ve included some sabotage/subterfuge rules to allow for missions where you hack a computer for data or even plant a virus.  Also, you could plant bombs or transponders for mother ships to target a particular location :)

If anyone has any other suggestions or ideas, please leave a comment.

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Hello people. Is it really 10 months since my last post? I really need to pull my finger out. Sorry guys!

Anyway, onto the subject at hand. Why is the XML Serializer so piss poor?

Well, apart from being text-based meaning it’s quite large and bulky to begin with, it also has a massive overhead trying to work out what is what, what is not and how it’s going to store everything. We were working on a large(ish) quantity of data (about 150mb) and getting load times of 10+ seconds and save times of up to 40 seconds. Not ideal for a product that needs almost instant response.

A little bit of googling and I came across the following article in Code Project:

http://www.codeproject.com/Articles/15700/Optimizing-Serialization-in-NET

Ok, it means a little more work in understanding what the guy has done but my goodness! We got data serialization down from 40+ seconds to around 180ms! That was jaw-dropping!

The key is using the binary serializer and the library abstracts the detail quite simply so you literally tell the serializer what you want to save, what order and let it do its thing. The author deserves an award. The code isn’t rocket science and the implementation is very straight forward but the results are simply amazing.

Be careful though, you need to pay attention to the order and structure of your data but once written, it simply does it! Brilliant work Simon Hewitt!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

C# – The world of Events and Delegates

Those of us who have been playing with C# over the years have gotten used to the concepts of a delegate and an event but what use are they and how do we implement them?

Basically, an event is something that happens within the application and the application notifies the rest of the application about this event taking place. This could be useful for other parts of the application to take advantage of.

A delegate is a reference that allows you to run code based on the event that has taken place. But what use is that? It sounds all well and good but why would we want to do this?

Well, how about we write a game that has things shooting at each other. We don’t really want to write code that keeps checking things all the time. It’s much quicker and easier to just let the application tell you something has happened and react to it. So how do we do this?

Ok, here is a simple class:


namespace EventsAndDelegates
{
public class Firing
{
public event FireHandler Shot;
public delegate void FireHandler(Firing f, ShotOnTarget e);
public void Start()
{
while (true)
{
System.Threading.Thread.Sleep(1000);
if (Shot != null)
{
Random random = new Random();
int randomNumber = random.Next(0, 100);

ShotOnTarget SOT = new ShotOnTarget();
if (randomNumber > 80)
SOT.HitTheTarget = true;
else
SOT.HitTheTarget = false;
Shot(this, SOT);
}
}
}
}
}

This basically has a method that continuously loops. The method pauses for a second then generates a random number between 0 and 100, if the number is over 80 it sets the event’s argument ‘HitTheTarget’ to true, otherwise it’s set to false. It then fires the event indicating a shot has occurred.

Also, to make things a little easier on the eye, an EventArg class:


namespace EventsAndDelegates
{
public class ShotOnTarget : EventArgs
{
private bool wasHit;
public bool HitTheTarget
{
set
{
wasHit = value;
}
get
{
return wasHit;
}
}
}
}

This is nothing special, it just allows us to put data into the Event arguments which could come in useful later on…

Now the main form:


namespace EventsAndDelegates
{
public partial class frmMain : Form
{
private Firing fir;
private Thread oThread;
delegate void SetFireCallback(Firing f, EventArgs e);

public frmMain()
{
InitializeComponent();

fir = new Firing();
Subscribe(fir);
}

private void btnFire_Click(object sender, EventArgs e)
{
oThread = new Thread(fir.Start);
oThread.Start();
}

public void Subscribe(Firing f)
{
f.Shot += Hit;
}

private void Hit(Firing f, EventArgs e)
{
if (lbFeedback.InvokeRequired)
{
SetFireCallback d = Hit;
Invoke(d, new object[] { f, e });
}
else
{
ShotOnTarget feedback = (ShotOnTarget) e;
if (feedback.HitTheTarget)
lbFeedback.Items.Add("Hit the target");
else
lbFeedback.Items.Add("Missed the target");
}
}

private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
{
// Stops crashing while closing form
oThread.Abort();
}
}
}

As you can probably work out, the form consists of a button called btnFire and a ListBox called lbFeedback. When you start the application, you are presented with the button and the empty listbox. Behind the scenes, the main form subscribes the Hit Method to the Firing delegate (which is observing the Shot event) allowing us to get feedback when the event is fired.

Now if we click the button, we create a thread that runs forever. This thread will contain the Firing object and will be running the Start routine within the object. As you know, every second the Start method will be taking a shot and reporting if it has hit or missed its target to the Shot event. Since we have subscribed the Hit method in the main form to the delegate, each time the event is fired, the Main Form’s Hit even gets fired also. Pretty neat eh? There is some code to allow safe threading to take place (for the curious, you can’t access objects via separate threads but you can create a local object with the same data which you can access. You create the local object, then call the Hit method again with the new objects and we don’t get an exception!) but then we add text to the ListBox. Either a hit or a miss notification.

The final method (formMain_FormClosing) just kills the thread before we close the applicaton or we get another exception when closing the application once we’re done.

So there you have it, Events and Delegates in a fairly simple example. Using this functionality should significantly help people componentise their code and allow them to be able to drop whole classes easily into other applications with practically no code changes to the class required! Much, much easier in the long run!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Remakes – How Laser Squad Works (Part 3)

Oooh, now this is where it gets quite interesting. I’m going to discuss the AI of the game. To some people, the AI seemed quite fiendish. In truth, it isn’t that fiendish at all. The difficulty levels were mainly due to less resources for the player and more units for the AI team. So… how does the AI work?

Ok, let’s start with movement. Each game map has a set of location nodes. Two of these will generally indicate straight lines between locations. Duh! You may say. But this is important. Think of “Moonbase Assault” where you have to navigate corridors. Not trying to walk through a wall would be helpful there! Anyway, each unit has a patrol route. This patrol route is made up of a set of nodes which, each turn, the unit must make their way to the next node. Combine this with the fact that the units start within a ‘start area’ and you have a small element of randomness in the locations of the AI units each game. This also allows an element of unpredictability in when you expect a unit to turn the corner. For example, in Moonbase Assault, if a unit started in the same location each game, you can predict which turn they come around a particular corner and wait there with opportunity fire. You can still do that if you wish but you could be waiting a few turns which could be better used to complete objectives. Especially if another of your units distracts the AI unit in the mean time…

Which leads onto what happens with the AI unit itself? The unit will have its line of sight checked to ensure that any units that are visible to the unit are recorded accordingly. Then the unit moves and after each action, the AI will assess whether it should carry on with the route or do something else. Fatigue and Automatic Fire is updated and checked after each move to see if they are valid. Automataic Fire being for the non-team units, naturally. If Opportunity Fire has been triggered, the opposing team is given the opportunity to fire at the unit.

Now what happens when your AI unit is distracted by something happening? Well, They turn to face the distraction and are given a short period of time to remember something has happened. The AI unit then reserves action points so they can pop a shot at you if you decide to come into view. Otherwise they will happily pop a few shots off at you anyway. Fairly straightforward and simple really. If you don’t reappear after the timer has run down, they happily go back to their patrol route as if nothing has happened.

So there we have it. Once you know this, the AI doesn’t seem so smart does it? Nicely implemented but not that smart really. Bearing in mind the effort and capacity to fit the game into 48k and you realise that it’s more than adequate AI for the old 8-bit machines.

VN:F [1.9.22_1171]
Rating: 10.0/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +2 (from 2 votes)

Remakes – How Laser Squad Works (Part 2)

Well, here’s the second part in the er… multi-part series of my analyses of how Laser Squad works. This time around, we’re going to look at the player stats and how they’re calculated and used within the gaming engine.

As you may realise, Laser Squad is pretty much a number cruncher with a nice gaming front end. In real terms, you could probably get a board for the map, counters and the like for the teams, weapons, etc. and work out the moves based on rolling dice and calculating scores. Fortunately, the computer does all that for you (with the added bonus of not showing you the ‘unseen’ opposing player’s pieces when you make your move). This reduces the tedium and increased the fun!

Let’s take ‘The Assassins’ as our example scenario. Corporal Jonlan has the following stats:

Constitution: 36
Stamina: 244
Morale: 250
Weapon Skill: 70
Close Combat Damage: 10
Strength: 56
Agility: 52
Toughness: 6
Morale Value: 40
Victory Points for Killing: 24
Size: 5
Action Points: 131

There are also some other stats that are worth noting but aren’t involved in calculation so much:

Can’t Pick up/Drop: false
Can’t Change/Drop/Pickup: false
Items lost with unit: false
Immune to morale loss from damage: false
Dead: false
Can be equipped: true
Manually deployable: true
Always reserve APs: false
Cautious Movement: false
Ignore threats: false
Infinite Ammo: false
Target Terrains: false
Target visible enemies only: false
Ignore items: false
Ignore 0 threat units: false
Total item size limit: 90
Item held: none

As you can imagine, there is a lot to take into account there but there is an obvious ‘one size fits all’ approach to the game pieces. So let’s get to business. How are in-game Action Points calculated?

Ok, we have the initial action points value of 131 (for Jonlan). Then we take away Jonlan’s burden (i.e. whatever he is carrying) which is calculated as (action points*weight carried)/(2*unit strength). We then remove Action Points based on wounding. Wounding is based on max constitution-current constitution)/toughness rounded to the nearest whole number. Naturally, this would be 0 at the start.

We then remove the weight of the armour and that should be your current Action Points for the turn.

Now Stamina is affected by fatigue (i.e. you have been carrying a lot of weight over a period of time). Fatigue is a counter that is incremented each turn if burden-adjusted Action Points (Action Points – Burden total) divided by 2 is greater than the current fatigue value (starting at 0). If this is the case, a calculation is made ((burden adjusted APs/2) – fatigue) and stamina is reduced if this value is less than the current fatigue count. Otherwise, the stamina value is increased and the fatigue count is reset to 0.

Other conditions that come into play are that if stamina is less than 32, your calculated action points are halved. Also, the game ensures you can never have less than 10% of your maximum action points (i.e. 10% of 131 or 13 in Jonlan’s case here).

I’ve not investigated the long-term effects of these calculations but over a game lasting 25-30 turns, I think the calculations are robust enough.

Opportunity Fire is basically calculated from your final action points less the burden. So if you had 41 action points for the turn and you have a burden score of 20, you would need to leave 21 Action Points to allow Opportunity Fire during the opponents turn.

Morale gets decreased by (Current Morale / (max constitution / damage)) when damage is done to a unit. I’ve been unable to find the level where panic kicks in but suspect it is something like 30% of the max Morale value.

Ok, I’ve bored for my country now. I suspect there are a number of mistakes in my calculations above so anyone who can confirm/correct what I said would be most appreciated. Also, anyone who can confirm how panicking works will be a star!

What’s next? How about a little about how the AI works?

Credit is due to the following:

Julian Gollop: Author and mighty fine game designer
William Fraser: Generously allowed me access to his commented reverse-engineered source code.

VN:F [1.9.22_1171]
Rating: 10.0/10 (3 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)

Remakes – How Laser Squad Works (Part 1)

For those who aren’t the three people interested in my Laser Squad dissection and attempted remake, I’ll give you a brief summary of the current plan and situation…

Laser Squad is a one or two player strategy game set in the future. The Laser Squad are similar to the Rebels from Star Wars and set about doing missions in order to achieve a specific objective. The themes of the game can be seen in various shows or movies. A simple example being ‘Moonbase Assault’ is a base that is storing data and well guarded. Such a computer system was a core focus of Season 2 of Blake’s 7 where Blake set the objective of destroying central control (*spoiler* which was then found to be somewhere known as Star One *spoiler*).

The game itself basically sets two teams against each other. One or both teams can be human controlled. Sadly, single player only allowed the player to be the Laser Squad. Each mission started by the player equipping the team with weapons, ammunition and armour. They then deployed the team into the deployment squares on the map and, once both teams have deployed, they have a number of turns to complete their given objectives.

The ultimate objective was to score 100 victory points. These points were allocated depending on what the mission objective was. For example, killing Sterner Regnix on ‘The Assassins’ scored 100 victory points for the Laser Squad. The Droid Squad scored points for each Laser Squad member they killed (generally calculated as (number of dead LS members / total LS members) * 100).

How you played the missions was completely up to the player. You could use the (in)famous Assassins tactic of arming Jonlan with a rocket launcher and many missiles and just have him keep shooting until he blows enough of the house away to reveal Regnix and take him down. Alternately, you could split the squad into 2 and attack both sides of the house together until you reveal regnix or encounter a droid. That was the beauty of the game. It didn’t really care how you played it too much which meant you can come up with your own strategies for winning.

Naturally it isn’t as easy as all that. You could run out of ammo. You could miss a target 3 feet away from you. You could panic and drop your weapon. You could be fatigued from carrying too much over a long distance. Julian Gollop implemented some really neat features.

This first article will focus on the sprite and map details.

With it being available on 8-bit systems, the graphics were very basic compared to today’s flashy 3D effects. They maps were a pseudo 3d/isometric style giving a basic 3D appearance but clearly only being 2D. Each sprite consisted of 4 x 8 byte pairs of information. In laymans terms, a byte pair can be used to represent the values between 0 and 255 by converting from hex (base 16) to binary (base 2). This in itself means you can create a simple sprite shape consisting of two colours. An example of this in action (for those not really too well versed in the detail of how a computer works) would be:

base 16 is represented by the numbers 0-9 then the letters A-F to represent 10-15
base 2 is represented by the numbers 0 and 1

8 is represented by the binary number 00001000 using 8 bits
F is represented by the binary number 11111111 using 8 bits

This means that the binary pair 8F is equal to 0000100011111111

As an aside, it also means that the byte pair 8F represents the decimal (base 10) number 143.

Using an actual 4 x 8 byte pairs from the game:

0000010303030100,0080C060FCE0C000,0201020106080000,A0C020C030888000

we have

00 00 01 03 03 03 01 00, 00 80 C0 60 FC E0 C0 00, 02 01 02 01 06 08 00 00, A0 C0 20 C0 30 88 80 00

Each of the 8 byte pairs represents a quarter of the sprite and take the form:

Top Left, Top Right, Bottom Left, Bottom Right

Using the knowledge from the previous example, the first 8 byte pairs will be

00000000
00000000
00000001
00000011
00000011
00000011
00000001
00000000

in binary. Now, putting them all together as they would look in the game:

00000000 00000000
00000000 01110000
00000001 11000000
00000011 01100000
00000011 11111100
00000011 11100000
00000001 11000000
00000000 00000000

00000010 10100000
00000001 11000000
00000010 00100000
00000001 11000000
00000110 00110000
00001000 10001000
00000000 10000000
00000000 00000000

A better (clearer) representation being:

…………….
………!!!….
…….!!!……
……!!.!!…..
……!!!!!!!!..
……!!!!!…..
…….!!!……
…………….
……!.!.!…..
…….!!!……
……!…!…..
…….!!!……
…..!!…!!….
….!…!…!…
……..!…….
…………….

Which some may recognise as the Dalek-a-like robot from Cyber Hordes walking (?) right.

The game map was a 2D grid 80 squares by 50 squares consisting of one sprite per square. A simple mapping of sprite 0 = value 0, sprite 1 = value 1, etc. in the map grid manages to build a fairly complete picture of the maps. For some reason I’ve yet to determine, many sprites match up but others don’t. I’m assuming a mapping table exists indicating which sprites map to which map value. My concern is that it would seem an additional effort to add this extra mapping so why bother? Why not just use the exact sprite values? It can either mean I have messed up and got the wrong numbering or I’ve missed something important. Fortunately, by running the game, I can build a mapping by checking the live map with the one I have generated and make any necessary changes to my mapping lists.

Ok, I’ve waffled on enough. Next time I’ll go through the gaming system and explain how stamina, damage, etc. are calculated.

Credit is due to the following:

Julian Gollop: Author and mighty fine game designer
William Fraser: Generously allowed me access to his commented reverse-engineered source code.

VN:F [1.9.22_1171]
Rating: 9.5/10 (2 votes cast)
VN:F [1.9.22_1171]
Rating: +3 (from 3 votes)

I love a good first person shooter (FPS) but really enjoy pitting my wits against another mind in a strategy game. It’s no secret that I’ve been wanting to remake a strategy favourite of mine for a considerable time (Laser Squad). I feel that one of its main attractions is that you are pitted against an opponent with similar strengths and gaming units meaning it is a true battle of wits to beat your opponent. Chess is probably the ultimate game in this respect.

Over the years, companies have released games with various themes, styles and additional elements requiring planning and strategic thought giving us a rich and varied choice of gaming experiences. Sadly, whether it be by design, accident or just inevitable conclusion, a lot of these games end up with the ‘brute force’ conclusion.

So what is ‘brute force’? A simple example is simply banging against a barrier until it gives way. Not elegant or skilled, just a war of attrition and willpower. Another example would be unlocking your briefcase when you’ve forgotten the combination. There are 1000 possible combinations of digits and trying each one in sequential order will get you the answer eventually. Great if the code is 0000, a pain if it’s 9999! Again, not skilled or elegant, just a war of attrition and willpower.

So how does this occur in strategy gaming? Well, generally the ‘pieces’ you are given have strengths and weaknesses which seem to follow a ‘scissors-paper-stone’ pattern. Your infantry unit can walk around land mines but are vulnerable to tanks squishing them, tanks go boom over landmines but can pretty much squish or boom infantry but infantry can manoeveur around fixed placements and tanks quite easily. Yes, it can get complicated very quickly and this is where doing your homework pays off when playing other players. Some ‘pieces’ are ‘super pieces’. Nuclear weapons, laser satellites and so on. They seem to have the upper hand over most of the other pieces on the board. So what does every player do? Keep banging away against the opposition until they have reached a point where they have these ‘super pieces’ and then brute force their way to victory! Add to this the fact that on higher gaming difficulty levels, you tend to see the same things being done to you (i.e. pump out resources until you have an unbeatable army then march onto the enemy base) and the game gets rather predictable.

Is that even a strategy? Well, in the broadest definition of ‘strategy’, yes. Yes it is. Sadly it seems to be the common strategy your average gamer opts for. No skill or specialist knowledge required. Get your big guns and shoot at will. Saying that, your true strategist will absolutely annihilate such a player in online play. How? Using knowledge as a weapon!

I recall playing Dune 2000 a decade ago (strange that) and I was using some brute force against the AI. I was making slow headway but could see the game taking a couple of hours, by which time all the spice will have dried up and we’ll end up with a ‘last man standing’ scenario. I decided to get clever and sent a couple of scouts to er… scout the AIs base. I found that there was a gaping hole right at the back of the base where the wind traps, construction yard and storage silos were guarded by a few tanks. A brainiac idea came to me. I built up a fairly sizeable force and a small, building-busting force of about 6 tanks. I carefully moved the tanks to within spitting distance of the hole. Moved my massive army to the front of the base and let rip. Suddenly, all the guardians of the special buildings moved to the front of the base to fight off the invaders leaving me a free run in destroying all their production buildings. Conclusion? They repelled the invading force but had no means of replacing the lost buildings or replacing the lost units. My next attack took out the base and victory to me. Success in 15 minutes instead of 2+ hours. Brains over brawn. A big thanks to Arnold J. Rimmer for an adjustment of his original tactic. Any mention of ‘Risk’ stories will be dealt with severely!

So back to the question… Can we counter ‘brute force’ wins? Sadly, I don’t think we can. If we only had games like Laser Squad and Chess, we’d lose a massive audience of players who enjoy such games but either can’t grasp or can’t be bothered to grasp the intricacies of the game. No interest means no games get made. Disaster!

The only way I can see of reducing the opportunity to ‘brute force’ is:

    – Reduce availability of ‘super pieces’
    – Improve the AI to intelligently counter opposing pieces properly
    – Put a cap on player pieces
    – Limit resources thus forcing tough decisions to be made

Some of these seem to have been implemented in many games already whether it be because of machine/application limitations or a conscious decision to make things fairer. Let’s read these in more depth:

Reduce availability of ‘super pieces’

Only being allowed to have one or two of a ‘super piece’ and/or forcing a long period of time between iterations of such a piece will limit the player in what they do and how they use it. i.e. forces them to use it strategically! Building a force of 10-15 ‘super pieces’ and marching onto the enemy base is textbook ‘brute force’.

Improve the AI to intelligently counter opposing pieces properly

AI is still relatively infantile in the world of research but in limited-scope applications it can be quite brilliant. A strategy game is a limited-scope application and even the poorest of strategists would know to use kryptonite against Superman and if they see the wicked witch of the west, they know they should be off to the kitchen to get a bucket of water. AI in games doesn’t seem to think of the defensive/counter approach very much. If the player is throwing horsemen at you, start generating pikemen to counter! The same if the player is using tanks to defend their base, use missile-carrying soldiers to take them out! Force the player to use their guile and skill!

Put a cap on player pieces

In all fairness, a lot of games use this anyway. It’s included as a point of note. It’s either that or you get an army of thousands marching onto the enemy base.

Limit resources thus forcing tough decisions to be made

Isn’t Tiberium wonderful? Constantly available but refreshing itself over a period of time. A big part of decent strategy is making the most effective use of your resources! Having a neverending supply doesn’t make it any kind of disadvantage. Limiting the resources forces the player to spend wisely.

This list is probably not conclusive but I feel that a stronger implementation of those features will make the modern strategy game more er… strategic.

VN:F [1.9.22_1171]
Rating: 9.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Remakes – What makes a good remake?

Over the years we’ve seen many classic games appear on our favourite platforms. They’ve fitted into all kinds of gaming genres, various backdrops and at appropriate times in the world’s history. Looking back at some of these games, they tend the all fall into three categories.

    1. The game itself is as great as ever but looks dated
    2. Streets ahead for its day but is now old hat after a replay
    3. What on earth did I play that load of rubbish for?

Whatever the reasons are that we liked a particular game, we decide to remake it so we can reminisce about ‘the good ole days’, to add or improve the original to how we’d like to see it, to enhance the whole game experience for the 21st century or just because we can! But what exactly makes a good remake?

The announcement of the new XCom game by 2K Games has been met with both excitement and disappointment. This is for many different reasons but what I feel is the biggest reason people are a little disappointed is that it seems as if the development company are breaking the golden rule of a much-loved mythos, that being DON’T MESS WITH THE HISTORY!

There are great examples of where the Mythos has been messed around with and actually improved the whole thing. “Battlestar Galactica” is something I was totally against when the ‘re-imagining’ was announced a few years ago. It is now one of my all-time favourite shows. Why? They improved it! Gave it more of an edge. Fleshed out the stories, added depth to the characters and made it very tense and exciting. Saying that, there are other examples where messing with the mythos actually made things worse. My example being Rob Zombie’s “Halloween” movie remake. Yes, it is interesting to know the background to Michael Myers and what happened to send him over the edge. The thing is… you just removed a major ‘fear factor’ from the movie. That being the fact that you don’t know what happened or why he is doing this. Is there a pattern to his killing or is it totally random? Random or a hidden agenda is far more scary than knowing he won’t kill character x because of a well known reason. So there are arguments both for and against. Personally, I prefer to keep the mythos unchanged – espeically one so well established and loved as you’re effectively alienating your core market.

So, back to gaming and the question at the top of the page. What makes a good remake? In all honesty there is no definite answer. One man’s passion is another man’s hate. Remaking a game with retro-style graphics is something someone may love but is probably a pet hate of someone else. Making a perfect one-to-one remake of an original game may be job done for some but a missed opportunity for others.

This means there are no hard and fast rules but I think I have come up with a general set of guidelines to follow to maximise your audience:

    1. Keep what made the game fun in the first place!
    2. Remember it is YOUR remake and YOU have final say in what is implemented.
    3. Feedback is important, listen to it!
    4. Don’t be afraid to ask for help or suggestions.
    5. Set reachable targets and meet them.

Confused? Don’t be. Let’s summarise each point:

1. Keep what made the game fun in the first place!

When all is said and done, you loved a particular game because it gave you hours of entertainment. “Head Over Heels” was an isometric game, would making it 3D add, detract or keep the same level of fun? Would adding more enemies in “Space Invaders” improve the experience? Why did you keep coming back to the game time and time again? Don’t implement features for the sake of it. Change or add something ONLY if it will add something to the gaming experience.

2. Remember it is YOUR remake and YOU have final say in what is implemented.

YOU are remaking this game. If you get help, you’re part of a team remaking this game. This means that you are going to have to fulfil every promise you make. If you think the ghosts in Pac Man being resurrected before the pill timer ran out was unfair, don’t implement it. If you think that once eaten, resurrecting the ghosts where they stand 3 seconds later would add something to the game, implement it. (as a side note, I think they are lousy suggestions, I’m just giving examples). This leads back to point 1 – the game must be fun or you wouldn’t play it!!

3. Feedback is important, listen to it!

There was a recent debate on RR regarding feedback. If you don’t want to hear negative comments about your remake, don’t ask for feedback. At the same time, don’t expect many people to want to keep playing your game either. The people on RR are gaming veterans of 20+ years. They know what is enjoyable and what isn’t. A subset of them have remade games too and know what the pitfalls are and can make great suggestions regarding what to fix or add to your game. Their suggestions could mean the difference between having an average game and a classic remake! Of course we don’t like being criticised but if we don’t embrace and learn from our mistakes, we don’t move forward and keep making the same mistakes time and time again. Again, this points back to the previous point, it is up to you as it’s YOUR remake but these guys want to help you. Let them!

4. Don’t be afraid to ask for help or suggestions.

This is an extension of the previous point. As well as asking what you can fix, you can also ask people what they’d like to see in the game too. Personally, I know I just can’t draw to save my life. I asked for help with Monty and got the talented LoBo pumping out sprites and screens at will. I still need to come back to that project but his work allowed me to concentrate on what I am good at – coding! Admittedly, people won’t just pop out with offers of help if they think their efforts will be wasted. Put together some code. Rip the original sprites and sound effects and knock together a small demo. It only needs to be a room with some of the gaming features working. If people see things are progressing, they’ll be more inclined to offer their help. I also got many suggestions for new features and fun things to add to the game. Things I just didn’t think of. It may be YOUR remake but it doesn’t mean you have exclusive access to all the best ideas out there.

5. Set reachable targets and meet them.

When writing any application, you need to plan and set targets. More importantly they need to be realistic. While building Monty, I set the main objectives to be things like:

    – Implement collision detection with Monty and enemy
    – Animate Monty
    – Make screen drawing routine more generic
    – Add sound effect when Monty jumps

These are simple things you can probably implement in a few lines of code in most cases. Sitting down and achieving 3 or 4 of your objectives in one sitting is a great ego boost and encourages you to do more. You can then set more objectives for next time. Before you know it, you’ll be ready to write a room/level editor and throwing out a small demo for the community to try out, review and give feedback on.

I hope I’ve allowed a few of you to think more about what is involved with remaking games and given you all a few ideas as to how to make the most of your time.

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

Assembler – How it works!

Ok, I wanted this to be a C# and XNA blog but, as a related aside, I’ve been wanting to learn Assembly Language since I first became aware of it as a 7 year old. It was the language all the great 8-bit games were written in and nearly 30 years later my interest hasn’t really diminished. I’ve always felt that knowing how the machine under the hood processes your code is going to be a help in writing more efficient programs in whatever your language of choice is. I just never really got around to it. I’ve been toying with remaking Laser Squad for years. It’s a personal favourite and still very playable some 23 years later. Extracting the stats and learning how some of the pathfinding routines work would require some reverse engineering meaning I’d need to learn Assembly.

Anyway, a few weeks ago I asked fellow members of RR if they knew of some good resources to learn Z80 Assembler for the Amstrad or Spectrum. Emulators are freely available and generally have some excellent features so I thought that if I could get hold of some tutorials, I could have a read during my lunchbreaks and pick up the language over a number of weeks. I’ve done computing at GCSE, A-Level and degree level and knew loads of theory but never actually got taught how to write Assembler code. Lessons on “Twos Compliment” and “Binary Coded Decimal” as well as learning what a mantissa is, understanding how stacks and linked lists work is… Yawn-o-rama! I expected it to be a hard trek but…

THERE IS NOTHING TO IT!

All those lessons. All that boring theory. What would have helped? Giving a bloody context as to why we were learning all this. I expected numbers and things to be stored automagically in these formats and I had to be aware of them. I was also very confused as to how we’d know what was stored in which format. If the lecturer had simply said, “These are not mandatory, they are just efficient ways to storing numbers on a computer. It is up to YOU as to which you use, when and why you use them” I’d have probably learnt Assembly language years ago. I can sum up Assembler as the following bullet points:

    – You move numbers around using memory addresses and registers
    – Some registers are more important/useful than others
    – There are flags indicating something has happened
    – You can change bits using AND, OR and XOR
    – There are conditional jumps – basically ‘goto’ and ‘gosub’
    – You can call firmware routines directly to do stuff
    – There is a stack to store information while you use a register for something else

That’s pretty much it! If you want to store numbers as 16-bit values or 8-bit twos compliment, IT’S UP TO YOU! Naturally it requires a lot of coding to do some very simple stuff but you are poking about with the giblets of the machine and that’s delicate.

If you’ve been thinking about learning it for a while and have (like me) been put off by A-level teachers teaching theory without explaining its purpose, give it a go! The thread is easy enough to find on RR, the Amstrad tutorials are great and WinAPE is incredibly powerful. If you have any problems, drop me a line and I’ll try and point you in the right direction.

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

C# – goto, the spawn of satan

Oops, it’s been a week since I last posted but I guess I earned a break from working hard and I was struggling for an issue I came across recently. Then a quick google and I noticed some code that used something I haven’t seen since I was a teenager programming in locomotive basic on my Amstrad CPC 6128… a goto statement. I knew that C# does have this command and there are people out there who argue that it is useful. It probably is, but for the sake of your (and anyone who would be maintaining your code in future) sanity, DON’T do it!

I had another skim through the internet and found the following source code that uses goto:


for(int i = 0; i < size.Width; i++) { for(int j = 0; j < size.Height; j++) { Color c = Color.FromArgb((int)pixels[i,j]); if(c.A < 255) { hasAlpha = true; goto breakSpot; } } } breakSpot:

as you can see, the user is trying to iterate through a 2D array looking for a pixel with a value larger than 255 (meaning it has an alpha value) and is then exiting the loop. Despite this being a (relatively) safe usage of the goto statement, it makes for lazy coding.

How would I do it? well, here is what I'd do...


for(int i = 0; (i < size.Width && !hasAlpha); i++) { for(int j = 0; (j < size.Height && !hasAlpha); j++) { Color c = Color.FromArgb((int)pixels[i,j]); if(c.A < 255) { hasAlpha = true; } } }

Oooh, you didn't know you could do that did you? It's a for loop! You have a start value, an adjuster and a condition. The condition doesn't even have to have anything to do with the value used to count the loop. It generally does but it isn't required.

Anyway, I hope someone found that useful and that I've advanced the cause of the 'anti goto' movement. Enjoy!

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)