G is for Games I own

The last decade has seen a renaissance in board gaming. The Internet and crowd funding platforms such as Kickstarter have made it particularly easy to publish a game and 1000s of new games are released each year.

For this post I thought I’d go over my collection and talk about the games I own.

BSG box artBattlestar Galactica

This game is based on the recent TV series. The players are the humans trying to escape the Cylons. Unfortunately a few of the players are secretly Cylon agents trying to derail the other players. My gaming group never really got into this one. I suspect it is because we know each other too well and can tell who the Cylons are right from the start.

 

Descent

Descent box art

****Descent is an awesome board game. The bulk of the players are adventures working their way through a dungeon, one of the players gets to be the Overlord and it’s their job to stop the players. The board consists of interlocking tiles that form the map of the dungeon. Miniatures are used to represent the location of the players and the monsters on the board. With treasure, traps, equipment upgrades and magic, Descent is basically a RPG dungeon crawl in board game format. I own the first edition of the game and a typical game can take 3 to 4 hrs to complete. The second edition has much more streamlined rules and apparently only takes an hour or so to complete.

 

Evil Baby Orphanage Box Art

Evil baby orphanage

This is a casual card game. The premise is that each player is a Time Nanny whose job it is to grab famously evil people when they where babies and place them into time orphanages before they can do harm. Each baby has a mischief value and the first player to START their turn with 8 mischief points wins. This is harder then it sounds as the other players are actively stealing your babies or activating their bad behaviors causing all sorts of mayhem. This is a fun and quick game with a great theme. A game takes between 15 and 30 minutes to finish.

 

Hex Hex XL

Hex Hex XL box artThis is another card game. This time you are bored wizards bouncing a spell (hex) between each other. If a wizard is unable to pass on a hex, it triggers, causing the wizard to lose points and the wizard who passed them the hex to gain points. The game ends after each wizard has had a chance to cast the first hex and the player with the most points wins. This game gets pretty hectic as cards can cause hexes to duplicate, be forced to only travel in certain directions and do more damage. Game length is  about 30 minutes depending on the number of players.

 

Lords of Waterdeep box artLords of Waterdeep

In this game you play one of the secret Lords of the fantasy city of Waterdeep. The goal is to accumulate the most victory points in 8 turns. The primary way to earn points is to complete quests. To complete quests you need to gather together clerics, wizards, rouges, warriors and gold using your agents which you place at various points at the board. Additionally each lord has a number of types of quests which are their forte, finishing these earn extra victory points at the end. As well as blocking access to resources using your agents, you can also hinder the other players by playing intrigue cards. Whilst the game sounds and looks complicated it’s actually very straight forward and easy to learn. It’s fun to play but has quite a bit of depth to it. Game length is about 1.5 hours.

 

Munchkin

Munchkin box artMunchkin is an older card game but still a great game. The players are heroes delving through a dungeon, collecting  treasure and fighting monsters. The first player to reach 10 levels of experience wins. Levels are gained (or lost) by fighting monsters. Other players can aid or interfere with another player’s actions. This is definitely a “screw-your-friends” type of game so you really want to play with people who can handle that. The cartoon art on the cards is fantastic, full of geeky RPG references. A game typically takes about 45 minutes to play but it can drag on if players are being silly.

 

Pandemic box artPandemic

Pandemic is a very interesting board game as it is a cooperative game,  it’s players vs the board. Basically the players need to move around a map of the world, fighting the spread of 4 pandemics, trying to cure each one before the world is overwhelmed. The mechanics of the games are such that as play progresses things become more and more dire which really ramps up the stress levels. Each player gets a number of actions they can perform as well as a specialist role which gives them some kind of extra ability. The players really need to work together and plan ahead to win. I really enjoy this game but several in my gaming group find it very stressful, particularly when you dial up the difficulty of the game. It takes about an hour to play the game.

 

Settlers of Catan

Settlers of Catan box artOne of the most successful of the modern boardgames having sold over 18 million copies. Settlers sees players trying to get to 10 points first. Points are awarded for each city and town a player owns. These are placed at the corner of hex tiles that generate the player either wood, ore, sheep or brick resource cards. These cards are used (in different combinations) to build roads, build towns or upgrade towns to cities. The game also allows players to trade resource cards.  There is no direct player conflict in the game but you can cut off other player’s access to the resources they need, hold trade embargoes and set  The Robber on them to steal their resources. This game is very good with simple, elegant mechanics. If you were looking to get a game that will appeal to a wide group, get this one.

 

Small World box artSmall World

A first glance Smallworld looks likes Risk with a fantasy theme but it’s much more then that. Each player draws a race and a power from a deck. This gives the player a number of units to grab and hold areas of the map. Each area of the map held at the end of the player’s gives them a victory point. Additionally each power and race gives the play additional abilities or ways to earn bonus points. For instance if a player drew Humans as their race they would get an extra victory point for each field area of the map they hold (they like to farm). If that player also drew Flying as their power they would be to able to place units in any area of the board, rather then areas adjacent to their current ones (which is the standard rule).

An interesting aspect of the game is that a player can put their current race into decline, skip a turn and pick a new one. This is needed because your units slowly get whittled down by other player’s attacks to the point where  you cannot hold enough areas to earn any decent amount of victory points on your turn. When to go into decline can be crucial to winning the game. Because the combination of power and race are randomized, replayability of the game is high. For instance you might have Commando Elves one game and Peace Loving Elves the next which radically effects how you play with them. The game comes with a number of different boards and the one you use depends on the number of players you are playing with. The number of players also determines the number of rounds that are played before victory points are tallied.  This is great game with easy rules which,  typically takes about an 1 hour to play._

_

Hopefully this post has wet your appetite. If you are looking to get started I’d suggest grabbing a copy of Settlers Of Catan or Small World to start.

F is for Feature Driven Development

Feature Driven Development (FDD) is my favorite Agile methodology. I have been using it for a number of years and it works really, really well. Here is a quick intro to FDD that I wrote a while back.

An introduction to Feature Driven Development

Feature Driven Development (FDD) is an Agile software development methodology. It provides a simple 5 step process that focuses on the delivery of quality software aligned with business needs.

FDD has a strong focus on efficient, up-front scoping, planning and costing, which makes it easy to slot into enterprise project governance structures.

The 5 Processes

The five FDD processes are grouped into two phases; the “start up” phase and the ”construction” phase. The focus of the start up phase is around scoping and planning,

whilst the construction phase is focused on the iterative and incremental build of the solution.

By the end of the start up phase, a highly accurate business case can be created (if required by an organisation’s governance structures).

FDD Proceses

Process 1 – Develop an overall model

During this process the scope and the architecture of the solution are developed. This process generally takes the form of a number of half-day workshops involving all parties (stakeholders, architects, project managers, testers, developers, domain experts etc.). Outputs are typically story boards, deployment diagrams, use-case models etc.

Process 2 – Build Features list

During this process the solution is broken down into a list of features. A Feature is a part of

the solution’s functionality expressed in client or stakeholder terms. For instance:

  • Calculate the total amount of a Sale
  • Calculate the total quantity sold by a Retail Outlet for an Item Description
  • Determine the most recent Cash Register Assignment for a Cashier

This list is prioritized based on business needs, technical dependencies and risk. This process is typically completed in a workshop with all the participants of from process 1 and usually only takes a couple of hours.

Process 3 – Planning

In this process the features are grouped together into “Work Packages” and a project plan is built around the delivery of these work packages.

A work package is designed to be 2 weeks long, with the team deciding on how many features can be fitted into each work package. The end result of this process is a firm project plan for the delivery of the prioritised feature list. Costings for the project can then be easily derived from this plan.

Process 4 – Design by Feature

During this process the team perform the detailed analysis, design and design QA for the features in the current work package. As with all Agile methods this work is done with heavy involvement of the stakeholders and domain experts. Once completed the development of the Feature can start.

Process 5 – Build by Feature

This process is focused on the delivery of unit tested code into a build of the solution, ready for testing by stakeholders, testers and other interested parties. This allows for early integration, testing and feedback which is crucial for a modern software development project’s success.

Rinse and Repeat

After a work package is completed, the project plan is reviewed and work begins on the next work package. This allows the solution delivery to adapt to changing business requirements and needs.

Tracking in FDD

Tracking is a key aspect of FDD. All tracking is performed against features. During the Design by Feature and Build by Feature processes, a number of milestone dates are tracked. This provides early warning of any potential issues. For example:

Feature Tracking

As each milestone is met a percentage complete is calculated for the feature, missed milestones are highlighted in red on progress charts.

Additionally, velocity charts are used to validate that the project is on track. Typically a feature completed by week (actual vs. planned) chart is used for this:

Velocity Tracking

Finally a “parking lot” diagram is used to summarise the overall state of the project:

Parking Lot

Scaling FDD

FDD is easily scalable to various team sizes, for example a small sized project team might look like this:

Small project

Whilst a large project team may look like this:

Large project

With 3 coding teams working on different features in parallel.

Summary

Agile methods are a great way to effectively build software and FDD is an easy to follow and implement example of an Agile method.

E is for Elastic band contraption

My eldest (currently 5) is big on “making” inventions” and experiments. Last weekend he desperately wanted to invent something with engines. Not having any engines handy I figured we could perhaps do something with elastic bands. Googling didn’t turn up anything too exciting but I did come across a picture of something from my childhood: a cotton reel with and elastic band threaded through the middle of the reel and held in place with a matchstick which you then wind to make a wind up toy:

Source http://www.minieco.co.uk/cotton-reel-tanks/

Source http://www.minieco.co.uk/cotton-reel-tanks/

Unfortunately I didn’t have a cotton reel (nor suitable elastic bands it turns out) but after raiding the recycling bin and craft supplies I managed to collect:

  • Some cardboard toilet rolls
  • A pizza box lid
  • Some elastic bands
  • Some popsicle sticks
  • Some small matchstick sized bits of wood

First off I got the boys (child number 2 now joining in) to trace out 4 circles on the pizza box lid, using an upside down glass as a template.

These we then cut out as wheels, punching a hole in the middle of each one.

We then threaded an elastic band through the wheel, down the cardboard toilet roll and through the other wheel. On one end we hooked the elastic band over the matchstick sized bit of wood and the other end went over the tip of the popsicle stick.

All set we wound up the elastic band (using the popsicle stick) and calamity! The elastic bands we had were too weak and snapped when wound up :(

A quick raid of the bathroom secured us a couple of hair ties as replacements for the elastic bands. Unfortunately these were too strong, when wound up nothing moved… so off to the garage where we found a couple of metal washers to insert between the wheel and popsicle stick and…. success!

After some experimentation we discovered that its best to not wind the contraption too much, otherwise it just goes into a crazy spin! However if you wind it up about 7 times it travels in a nice straight line.

We taped the wheels to the cardboard tube with some sticky tape and the boys then decorated their vehicles with paint and pens. Then it was off to the driveway to hold some races ☺

Here is a video clip of the vehicle in action:

YouTube Preview Image

D is for DNS

Alright, I thought I’d do a quick blog on the DNS or the Domain Name Service? Why? Well because without it the Internet as we know it would not work and subversion of the DNS system is how Turkey recently blocked access to Twitter, Facebook and YouTube so it’s very topical!

First off you need to know that every computer connected to the Internet has a unique numeric address, kinda like a phone number.  For example the server that Google runs on (at least one of them) has an address of 74.125.237.114. If you type that into your browser’s address bar you will see the Google search page!

Now, in the real world, it’s very hard to remember more then a few phone numbers, so we use phonebooks, like the white and yellow pages, to make it easy to look up a phone number. This is basically what the DNS is, the phonebook of the Internet. When you type in www.google.com into your browser, your computer uses the DNS to figure out that the address of the computer you want to connect with is 74.125.237.114 !

This fun video explains things in more detail:

YouTube Preview Image

So how did Turkey block Twitter, Facebook and YouTube? Well, initially they forced the Turkish ISPs to change their DNS servers to provide the “wrong” address for the Twitter, Facebook and Youtube’s servers. This meant that a person connected to the Internet in Turkey who tried to access these sites saw some kind of government site instead.

People quickly clicked as to what was happening and spread the word to configure their computers to not use their ISP’s DNS servers but to instead use Google’s servers (at 8.8.8.8). In fact this information started to appear as graffiti on walls and posters in Istanbul:

Source http://mashable.com/2014/03/21/twitter-ban-turkey-graffiti/

Source http://mashable.com/2014/03/21/twitter-ban-turkey-graffiti/

This worked for a while until the Government got wise and forced the ISPs to block traffic to 8.8.8.8 and 8.8.4.4, effectively cutting off access to the Google DNS servers.

Still as John Gilmore famously said: “The Net interprets censorship as damage and routes around it” and by using virtual private networks (VPNs) and censorship resistant networks such as Tor the people of Turkey were still able to connect to Twitter, Facebook and Youtube to air their views about their government.

Viva la Internet!

C is for Code

I believe that everyone should be able to program a computer! Now I can see you all rolling your eyes but bear with me for a moment.

We live in the Information Age, computers are everywhere and computer literacy is a skill everyone needs. Unfortunately most people stop short, learning to drive a computer but not really learning to use its full potential.

Now don’t get me wrong, I’m not advocating that everyone become professional programmers. We are strange bunch and you really have to love puzzles and think in a particular way to do coding as job, but the number of times I have seen people perform mindless, error prone, tasks on a computer which could be automated by a simple computer program is astounding. For instance re-sizing hundreds of photos or writing 100 personalized letters, one… at… a… time…

Work smarter not harder is the name of the game!

So what is this “code” stuff anyway ? Well, computers are pretty simple devices, powered by electricity everything comes down to whether something is turned on or off. Programming (or coding) is the process of writing out a set of instructions that you want the computer to perform and then en_coding_ them in to a form that the computer can understand.

In early days of computers this meant that a computer program (a group of instructions) would look like this:

10110100 00001001 10111010 00001000
00000001 11001101 00100001 11000011
01001000 01100101 01101100 01101111
00100001 00001101 00100100

Some poor engineer would need to figure out all these 1’s and 0’s (ons and offs) and then enter them into a computer by either toggling switches or feeding it paper tape with holes punched into it. By the way those 1’s and 0’s above display the text  Hello! on the screen when execute by a computer!.

Clearly this wasn’t productive at all. So the concept of an “assembler” was developed. This would allow a program to be written in a human friendlier way which, could then be assembled into the 1’s and 0’s that the computer could understand. So now you could write the following to print Hello! on the screen, instead of coding up a bunch of 1’s and 0’s:

start:
        mov     ah,9
        mov     dx,hello
        int     21h
        ret

hello   db      'Hello!',13,36

This is much better…not! At least it vaguely looks like English but its still not really easy to understand. Luckily 3rd generation “languages” were developed which, meant that programs could be written in English (with a very strict grammar) and then “compiled” into the 1’s and 0’s needed by the computer. Our program to display Hello! on the screen now just becomes:

print "Hello!"

Much simpler!

A crash course in how programs work

A computer program contains 4 different things:

Statements – Instructions to do something. For example the print statement we saw above or

1+1

Which adds 1 and 1. These can be combined, so the following prints out 2 on the screen:

print 1+1

Loops – Instructions to do something a number of times. For example to display the numbers 1 to 10 on the screen:

for count in range(1,11):
    print count

Conditionals – Instructions to do something, if something is true. For example:

if 1+1 == 2:
    print "The answer is 2!"

Variables – Places to store things (data) needed by the program. For example

answer = 1+1
print answer
answer = answer + 40
print answer

Which:

  1. Adds 1 and 1 and stores the result (2) into a variable called answer
  2. Displays the value of answer on the screen (2)
  3. Takes the value of answer, adds 40 to it and then stores the result (42) back into the variable called answer
  4. Finally displays the value of answer again on the screen (42)

Tada! You’re programming

Its remarkably easy and with a little bit of study, you can save yourself hours of time or even write yourself that smartphone app you have also wanted. If you are interested in learning more about programming, the Internet is chock full of resources. I’d suggest you check out the Codecademy or The Khan Academy sites to get started. The examples above were written using a language named Python (named after the Monty Pythons) which is particularly easy to learn, but it is only one of many different computer languages.

Oh yes and those tedious tasks I mentioned at the start of this post, here is how you would solve them in Python:

# Python program that resizes all the .jpg images in a folder named "photos"

# load some "modules" that tell the computer how to manipulate files and images
import glob
from PIL import Image

# we want to resize images to 640 by 480 pixels
size = (640,480)

# grab a list of the .jpg files in the photos folder
photos_to_resize = glob.glob('photos/*.jpg')
print "Resizing: " + str(photos_to_resize)

# resize each photo in the folder and save the resized photo
for photo in photos_to_resize:
    resized_photo = photo[:-4] + "_resized.jpg" # create name for the resized photo
    im = Image.open(photo) # open the photo
    im.thumbnail(size, Image.ANTIALIAS) # resize the photo
    im.save(resized_photo, "JPEG") # save the photo
    print photo + " resized and saved as " + resized_photo

and

# Python program that generates a personalised letter for a list of people
# it generates a word document with one letter per page

# load a "module" to tell the computer how to create word documents
from docx import Document

# the list of people that we want to create letters for
names = [
'Emma',
'Charlotte',
'Ella',
'Sophie',
'Hannah',
'Emily',
'Jessica',
'Olivia',
'Grace',
'Isabella'
]

# create a new word document
document = Document()

# for each name in the list create a letter
for name in names:
    document.add_paragraph( "Dear %s," % name) # add the salutation

    # add the rest of the text
    document.add_paragraph( "Thanks for your interest in the Acme 2001 Widget. We are pleased to announce that these are now available for sale.")
    document.add_paragraph( "As a valued customer you can purchase one with a 25% discount!")
    document.add_paragraph( "Yours Sincerely")
    document.add_paragraph( "Horace P Sweet")

    # add a page break so we get one letter per page
    document.add_page_break()

# save the word document
document.save('Letters.docx')

B is for Blender

I have tinkered with 3D graphics for years, using POV-Ray in the mid nineties and later Hash Animation:Master. However these tools were pretty limited or not widely supported and commercial tools costed (and still do) a small fortune which put them out of reach of hobbyists.

Blender Logo

So I was very excited when Blender was released in 2002 . With its commercial features and it being free (open source) the scene was set for great things to happen.

Unfortunately Blender’s origin as an in-house product for a visual FX studio meant that it was hard to use, with a confusing user interface and buggy features.

However Blender is a show case of how open source software works. A community quickly formed, new features were rapidly added and a new improved (and consistent) user interface was developed.

Today Blender is an easy to use, powerful application. In fact it has several releases a year, outdoing most commercial applications in the speed at which it evolves and improves.

So what can Blender do? Well pretty much anything you need to produce 3D animation and special effects. It supports 3D modelling, animation, physics, rendering, video editing and compositing. It even has a game engine and is widely used by hobbyist and indie developers to create assets for their games.

One interesting aspect of Blender are the blender movie projects. Every couple of years the Blender Foundation raises funds and tackles the production of a movie. As they do this, they fine tune and enhance the product based on real world experience. All the assets of the movies are also released to community. There have been 4 movies to date and the 5th one is in the works.

YouTube Preview Image YouTube Preview Image YouTube Preview Image

There are also a number of other “open” movie projects. For instance Caminandes:

YouTube Preview Image

If you want to give Blender a go I ‘d suggest you start with the very well paced tutorials by BornCG, for inspiration you cannot go wrong with the excellent tutorials of Andrew Price over at Blender Guru and finally, here is a tutorial on creating some cute Minions:

YouTube Preview Image

Happy Blending!

A is for Apathy

I started this blog way back in 2001, the 2nd of October 2001 to be exact (according to the Way Back Machine)

However in the last year or so I’ve been very slack at posting anything (other then my automated tweet logs).

This is a shame because my blog does get a fair bit of traffic (about 5000 unique visitors a month) and contains popular posts such as my Creating your first Unity Android App post which averages about 150 views a day.

So today I have decided to take the Blogging from A to Z Challenge which is to write a blog post each day in April themed to each letter of the alphabet.

Hopefully this will kick my apathetic blogging butt into gear!

Tech Tip: Change AngularJS template delimiters

I have recently been doing some development with the Bottle Python web app framework. Unfortunately it’s simple template system uses the same template delimiters as Angular (“{{” and “}}”). Worse you cannot change these delimiters in Bottle.

Fortunately you can change them in Angular using the following:

var myApp = angular.module('talkpoint', [], function($interpolateProvider) {
    // set custom delimiters for angular templates
    $interpolateProvider.startSymbol('[[');
    $interpolateProvider.endSymbol(']]');
});

Which given a Controller looking like this:

myApp.controller('TodoCtrl', ['$scope', function($scope) {
    $scope.todos = [
        {text:'learn angular', done:true},
        {text:'build an angular app', done:false}];
}]);

Allows you to write Angular template code looking like this:

<div ng-controller="TodoCtrl" class="row">
  <ul >
    <li ng-repeat="todo in todos">
      <input type="checkbox" ng-model="todo.done">
      <span class="done-[[todo.done]]">[[todo.text]]</span>
    </li>
  </ul>
</div>

A is for Artemis

Artemis LogoA few months ago, I had a group of friends over. Usually we just sit around and socialize, sometimes we play a board games or watch a movie but this time we did something different…. we played Artemis.

So what is Artemis? Well its a multi-player Starship Bridge Simulator where each player is assigned a different station (played on a PC or iPad) of a Starship Bridge. For instance there are helm, weapons, sensor, comms and engineering stations. One player is the Captain who gets to give the orders.

The aim of the game is to work together to complete Artemis’s mission.

Incredibly geeky I know and I wasn’t sure the group (especially the wives) would be into Atermis so after a couple of wines I floated the idea of trying out Artemis and showed them this video clip as an into…

YouTube Preview Image

 

Surprisingly everyone agreed to give it a go and so began the voyage of the plucky Artemis, her dysfunctional crew and their inept Captain.

Installation is pretty straight forward, after you purchase the software ($40 USD) you get an installer that run you on each of the player’s PCs (or laptops in our case). There is no licensing key and the developers rely on an honor system that you don’t share the installer outside of your 6 players. There are also a iPad and Android apps ($2.99 USD) that lets you use a tablet as a station.

One thing that you will need is one PC to act as the server. This PC also drives the view screen which lets the Captain see what is going on since they typically don’t have a PC (and as Captain you then get to yell out things like “Bring up Tactical on the view screen, Ensign Young”). My Dell Zino HTPC wired up to the living room 42-Inch LCD TV worked perfectly for this.

As a minimum you need three players to play: Captain, Helm and Weapons. Players can control more then one station but that often proves to be too tricky in the heat of battle. The game really shines when you have a full crew of 6 and all stations manned.

The game comes with a number of scripted missions but in its basic mode your mission is to just fend off waves of enemy ships that are trying to destroy you and your starbases. We have found that upping the difficultly level and setting the Sector setting to something other then “Barren” makes for quite an interesting game. You can also play in “Elite Co-Op” mode which lets a total of 6 ships (each with 6 players) play together which sounds like it would be awesome.

Over the last few months we have played with a number of different groups of people. I’ve been constantly surprised at how everyone gets drawn into the game (even the non Sci-Fi/geeky ones) and just how much fun it is. I would recommend that everyone give the game a go.

And just to set the record straight… the reason the Artemis was destroyed was that engineering did not fix the engines in time. It had nothing to do with the fact that I reversed the ship into the mine field we had just laid!

Update: Version 2.0 of Artemis was released last week and it features a ton of new features including:

  • Updated UI
  • Up to eight simultaneous bridges (48 players)
  • Full-fledged PVP mode, where any number of sides and teams can battle each other
  • Four new NPC non-combatant ships now ply the spacelanes, offering many new scenarios for Artemis crews.  These ships can be broken down, hijacked, blinded, held hostage, and more
  • Major AI and pathfinding improvements
  • Artemis ships play in real 3D now, with climb/dive controls (button, keyboard, and joystick).  Players can fly OVER a black hole, and come up underneath enemies

Word War III – Dev Diary – 05: The app meets real players

Oops it has been a while since I last posted but I have actually been working on the game!

As I mentioned in at the end of my last post, the plan was to get the game working end to end. First off I created a number of new classes most extending FContainer. LetterButton for each of the letter buttons that the player can tap, Letter for each of the letters of the word, Keyboard to hold and manage the letter buttons and Word to manage the word.

Creating these classes allows me to use the tweening library to animate buttons, words and letters appearing and disappearing. I also added handlers to these classes so that they can callback into the main game code when things happen such as a player tapping a button.

Here is a class diagram of the classes in the game:

Main classes

In the GameScreen’s Update() method I added some code to increment a time value every second of play. This method also holds a game over check which bounces the user to the game over screen if they exceed 120 seconds of time. For the moment I have also added a simple bar sprite that I resize to represent the time that has passed. I turn this into a more self contained class the future.

Here is the code for the Update() method:

override protected void Update()
{
      // inc the framecount
    framecount++;

      // has a second passed? Futile runs at 60fps
    if (framecount % 60 == 0)
    {
          // inc time and score
        time++;
        score+=5;

           // tween progress bar to new position
        Go.to(progBar,0.99f,new TweenConfig().floatProp("width",time*6.5f).setEaseType(EaseType.Linear));

           // has the player run out of time?
        if (time > 120)
        {
               // yep, stash their score and bounce them to game over screen
            Main.instance.lastScore = score;
            Main.instance.GoToScreen(ScreenType.GameOverScreen);

        }
    }
}

You will also notice the score increment that adds 5 points for every second that the player has survived.

The bulk of the game logic sits in the HandleLetterButtonRelease() method. This is called when a letter button is pressed by the Keyboard class:

private void HandleLetterButtonRelease(char theLetter)
{
      // was the letter in the word?
    if (word.PopLetter(theLetter))
    {
          // yep, give the user more time and play a good beep
        time -=1;
        FSoundManager.PlaySound("ok_beep");
    }
    else
    {
           // nope, penalise a wrong guess and play bad beep
        time+=2;
        FSoundManager.PlaySound("bad_beep");
    }

      // is the word complete?
    if (word.isComplete())
    {
          // give the player 10 more seconds of play time
        time-=10;

          // play word done sounds and give player 500 points
        FSoundManager.PlaySound("word_done");
        score+=500;

        // tween the word off the screen and then...
        Go.to(word, 0.2f, new TweenConfig ().
        setDelay(1.0f).
        floatProp("scaleY", 0.5f).      
        floatProp("alpha", 0f).
        setEaseType(EaseType.BackInOut).onComplete(c => {

               // remove the word from the stage
            word.RemoveFromContainer();

               // grab another word from the list of words
            wordPos += (int)RXRandom.Range(1,20);
            if (wordPos > Main.instance.words.Count)
            {
                wordPos = (int)RXRandom.Range(1,50);
            }

               // create a new Word and add it to the stage         
            word = new Word (Main.instance.words [wordPos]);
            word.y = 35;
            AddChild(word);

               // reset the keyboard showing any letters buttons that were hidden
            keyboard.Reset();           

        }));
    }

      // Pin the minimum time value to 1, award 1000 points if player manages to wind the clock this low
    if(time < 1)
    {
        time =1;
        score+=1000;
    }
}

I also dropped in some placeholder SFX and background track to round things off. Here is a clip of the final result:

 

YouTube Preview Image

 

Play testing

Proud of my work I handed the game over to Mrs Gremlin… she hated it! After a Q&A session it turns out that a) she doesn’t really like word games but more importantly b) the word list was awful.

Even though I had sanitized the list, she felt that the words were just too obscure. For instance “fashioned” was “not a real word”. So I went back to the drawing board and found a list of the 1000 most common words from texts in the Gutenberg Project. I quickly wrote some code to score each word (using the same algorithm I detailed here), sorted the list and dropped the list into the game.

This time Mrs G got into the game (particularly when she found out my top score was 7000ish which gave her a target to beat).

Since then I have shopped the game around my friends and acquaintances to get feedback. The highlights of this feedback are:

  • The game needs a non competitive (non time based mode) for those who want to just mindlessly guess words
  • The World War III theme did not gel with a lot of the girls. I need to think on this one
  • The score does definitely gives the game a competitive edge. At a party everyone was trying to beat everyone else’s scores. The couple of teaches in the group were whipping everyone’s butt whilst decrying some of the capabilities of our less learned friends
  • The progress bar was too easy to miss. I suspect this is because the progress bar doesn’t yet have the DEFCON milestones on it which should hopefully make things way more obvious.
  • Themed word lists
  • Background animations: bombs falling, lasers shooting them down. Planes flying passed etc.

So quite a bit to work on. Having said that no one thought the game was terrible and most played several games so I’m hopeful that I have something interesting here.