Monday, 30 May 2011

The Loop - Hurdles - The Final Clip

The Hurdle Loop.
For my metaphor I chose to do the ‘loop’. The loop in coding is something that repeats until a specified ending. For my metaphor I was looking for something that repeated the same thing until it was made to stop.
One of my many metaphor concepts and the one I have chosen for my final for this was track hurdles. Like in a ‘loop’, a hurdle jumper needs a starting command. For the hurdler this might be to run down the track, clear all the hurdles (maybe 10) and make it to the finish line, while in code it might be to draw a line and continue to draw an identical line every 10 pixels to the right for 15 lines. The hurdler will run to the first hurdle and jump it, then proceed to the 2nd, and then 3rd until all the set hurdles have been successfully jumped and the runner has crossed the line, in the way that a loop continues to repeat until the code specifies it to stop or it reaches a set limit.
I think this metaphor works well as it clearly shows the start, repetition in the middle and an ending, while remaining subtle enough to come across as a simple game of hurdles.

Example Code might be
__________________________________________________
void Hurdles Setup
{        
             Hurdler(6ft)
            Background (grass)
  }

Void Hurdle Race
{
          Int hurdle distance = 10m from start ;
          Int hurdle count = 0hurdles ;
          While(hurdle count<11)
             {                                                     
                    Hurdlejump(hurdle count*hurdle distance)
                    hurdle count = hurdle count +1
             }
}
____________________________________________________


No comments:

Post a Comment