Tiger Slug – Limax Maximus

Side view of the Tiger Slug

I disturbed this fellow while gardening today. He took off at speed across my lawn but since he is a slug I had plenty of time to get my camera a snap a few shots.

This is Limax Maximus – the Tiger Slug (or Leopard Slug depending on whether you like the striped tail or the spotted mantle) and they are impressively large. My garden is full of them. Most slugs I kill on sight, but I leave the Tiger Slugs alone because they supposedly kill other garden pests. Besides, they give me a slow moving target to practice macro photography.

Front view of the Tiger Slug

Arrrggh, it’s coming right for me!

Jumping Frogs – Using Python to Solve Puzzles

A few months ago I came across the following puzzle in a video game I was playing:

The starting position for the siz frogs puzzleThree frogs are happily hopping along a narrow board together when they meet another group of three frogs traveling in the opposite direction. These frogs can only move in the direction they are facing, and only if there is a space directly in front of them. Additionally, a frog can jump over the frog in front but only if there is clear space on the other side to land in.

How can the frogs (moving one at a time) pass each other and continue on their way?

Of course, this is a hoary old puzzle that most people come across and solve as children. It should be only a couple of minutes work with a pen and paper to confirm that it is possible to exchange both sets of frogs but I wouldn’t be much of a programmer if I used a piece of paper where hundreds of dollars of computer equipment would do just as well.

To solve a puzzle like this programatically requires three things: a representation of the current state of the problem, a way of generating every possibly legal move from a given position, and a way of figuring out when is a good time to stop.

Firstly, the representation of the board is a simple python list:

1
start = [1, 1, 1, 0, -1, -1, -1]

Frogs traveling right or left are represented by “1″ and “-1″ respectively. Empty spaces that frog can move into are represented by “0″. The advantage of this representation is that you can calculate the new position of a frog by:

1
newPos = pos + (representation * distance)

where pos is the current index in the array, distance is the size of the hop (either 1 or 2) and representation is either 1 or -1.

Next, we need a way of generating legal moves for a given position:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
def legalMoves(board):
	moves = []
	for pos, piece in enumerate( board ):
		jumpmove = pos + (piece * 2)
		move = pos + (piece)
		if ( piece == 0 ):
			continue
		if (not (( jumpmove < 0 ) or ( jumpmove >= len(board)))):
			if (board[jumpmove] == 0):
				t = list(board)
				t[pos] = 0
				t[jumpmove] = piece
				moves.append(t)
		if (not ((move < 0) or ( move >= len(board)))):
			if ( board[move] == 0):
				t = list(board)
				t[pos] = 0
				t[move] = piece
				moves.append(t)
	return moves

Now we need a way of keeping track of all board positions we have seen, so once we find the target we can print the states that led to the solution:

1
2
3
4
5
6
7
8
9
10
11
def evalAll( current, target ):
	next = []
	for a in current:
		n = legalMoves(a[-1])
		for q in n:
			t = list(a)
			t.append(q)
			if ( q == target ):
				return t
			next.append(t)
	return next

This code keeps a list of lists, each sublist being it’s own list of the sequence of moves investigated so far. For each sequence of moves, the next legal moves are discovered and new sequences are added to be investigated the next time this function is called. Technically this is called a breadth-first search because at all of the current legal moves are investigated before moving on the next stage. This is a very simplistic way of doing the job, but in this case the puzzle is small enough that it works well enough.

Finally, a simple wrapper that we can use to set things up and return the final result.

1
2
3
4
5
6
7
def solve(start):
	temp=[[start]]
	end = list(start)
	end.reverse()
	while(temp[-1] != end):
		temp = evalAll(temp, end)
	return temp

So now we can do this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
print solve([1, 1, 1, 0, -1, -1, -1])
 
[[1, 1, 1, 0, -1, -1, -1],
 [1, 1, 0, 1, -1, -1, -1],
 [1, 1, -1, 1, 0, -1, -1],
 [1, 1, -1, 1, -1, 0, -1],
 [1, 1, -1, 0, -1, 1, -1],
 [1, 0, -1, 1, -1, 1, -1],
 [0, 1, -1, 1, -1, 1, -1],
 [-1, 1, 0, 1, -1, 1, -1],
 [-1, 1, -1, 1, 0, 1, -1],
 [-1, 1, -1, 1, -1, 1, 0],
 [-1, 1, -1, 1, -1, 0, 1],
 [-1, 1, -1, 0, -1, 1, 1],
 [-1, 0, -1, 1, -1, 1, 1],
 [-1, -1, 0, 1, -1, 1, 1],
 [-1, -1, -1, 1, 0, 1, 1],
 [-1, -1, -1, 0, 1, 1, 1]]

Success!

You might say this is a waste of time since you figured out the problem in your head. Good for you, but try this on for size:

1
[1, 1, 1, 1, 1, 1, 1, 1, 0, -1, -1, -1, -1, -1, -1, -1, -1]

Stuff from my Old Hard Drive

I don’t usually keep a lot of files around. When I get a new computer I don’t tend to copy all my documents across – anything I haven’t looked at for a couple of months is probably not worth the fraction of a millimetre it takes up on the platter. On the other hand, some things I can never bring myself to delete. Here is something I rediscovered the other day:

This is one of the first MODs I wrote back on the Amiga. I never had a sampler or a very large collection of instruments, but I loved mucking around with MED trying to get a pleasant sound out of the 4 channel 8-bit sound. It is often said that there is a lot of crossover between programming and music, and the soundtracker clones of the 90s made that explicit which is possibly why I enjoyed it so much. Now days I can fire up GarageBand any time I want with any number of sampled instruments. I could say that I regret not having the time to produce music as an adult but the truth is that the inspiration isn’t there any more – my interests have moved in other directions.

Although none of my MODs ever sounded anything like as good as the music from the games and demos of the time, I am still pretty pleased with this one. It must date from form 6 (I was 16) which makes it vintage 1991. Listen to the sound of 20 years ago…

Jungle Drums MP3
Jungle Drums OGG

Google+ Social Media Features

Blog writers want feedback. For ages now I have been running a plugin on this blog that allows readers to quickly post things I have written to Twitter, Reddit, Facebook, etc in the hope that some of my wittier and more insightful musings might be widely distributed. The icons were there for years and, as far as I can tell, the icons were clicked exactly none times. None.

So I have removed that plugin and am trying something else.

Google+ is Google’s attempt at social media (previously) and I am liking a lot of what they are doing. It is sort of like a mixture of Twitter and Facebook, you can follow people without them reciprocating and anything you post can be shared with only a subset of people. +1 is Google’s equivalent of Facebook’s Like button.

If you are logged into G+ you can click on the +1 button to show you approve of the content and want to see more like it. You can go back through the archives and +1 as many articles as you want – go ahead, I’ll wait.

In addition, I have added my Google Plus feed to the sidebar on the right. I am not sure if I will keep this, I post very few updates, but we will see. I quite like having my long form blog posts and my short for G+ updates visible in one place.

Arduino Powered Tachistoscope

About fifteen hundred years ago I wrote WordApp, a Java applet tachistoscope that reads a text file from either the local filesystem or the Internet and displays it one word at a time. The idea is that it trains your brain to recognise words quickly, increasing your reading speed. I thought it was a little silly, but according to me web host’s logs WordUp still sees a bit of use even though I haven’t touched it for years.

I was hunting around for something to do with my Arduino while I waited for some other parts to arrive when I had the idea of making a physical tachistoscope that reads its data off an SD card and displays the text using an LCD display I have lying around.

The SD card contains the text to be shown. One of the potentiometers is used to vary the contrast on the LCD. The other is sampled by the CPU and converted into a delay to vary the speed at which the words appear.

Unfortunately the refresh rate of the LCD is very poor, so the text becomes almost impossible to read at even modest speeds. A better display might help, but I am not going to spend any more time and money on something so simple. Fortunately, the other parts I ordered arrived yesterday so I have other things to play with.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
An Arduino implementation of a Tachistoscope.
This uses both the LiquidCrystal and SD libraries (and repective devices). The 
words are read one at a time from a file on the SD card. A simple variable resistor
is used to control the speed.
In practice this does not work terribly well since the LCD display has a poor
refresh rate.
 
Pins: 
The LCD is connected via pins 2-8. Technically I could get away without the RW pin.
The SD card reader is connected via pins 10-13 (the standard SPI pins)
The variable resistor is connected via analog A0
 
Author: Andrew Stephens http://sandfly.net.nz/
*/
 
#include <LiquidCrystal.h>
#include <SD.h>
 
LiquidCrystal lcd(8, 7, 6, 5, 4, 3, 2);
File file;
 
void setup()
{
  lcd.begin( 16, 2 );
  lcd.clear();
  lcd.setCursor(0, 0);
 
  pinMode(10, OUTPUT);  // required if I ever change the CS pin from 10
  pinMode(A0, INPUT);
 
  SD.begin(10);
  file = SD.open("test.txt");
}
 
// Skip over whitespace, positions the file position at the start of the next
// word
bool findNextWord( File& file )
{
  int r;
  while ((r = file.peek()) != -1 )
  {
    if ( !isSpace(r) )
    {
      return true;
    }
    file.read();
  }
  return false;  
}
 
// Reads a single word (anything up to the next whitespace character) into
// the given buffer
bool getNextWord( File& file, char* buffer, int bufferSize )
{
  int r;
  while ((r = file.read()) != -1 )
  {
    if ( isSpace( r ) )
    {
      *buffer = '\0';
      return true;
    }
    if (bufferSize > 1 )
    {
      *buffer = r;
      ++buffer;
      bufferSize--;
    }
  }
 
  *buffer = '\0';
  return false;
}
 
 
// originally this function did more
int readResistor()
{
  return analogRead(A0);
}
 
 
void loop()
{
  char buffer[17];
 
  if (findNextWord( file ) )
  {
    getNextWord( file, buffer, sizeof(buffer) );
    lcd.clear();
    lcd.print( buffer );
  }
  else
  {
    lcd.clear();
    lcd.print("--end--");
  }
  int v = readResistor();
  lcd.setCursor(0, 1);
  lcd.print( v );
  delay(v);  
}

New Server

Regular followers of this website may have noticed that it has been offline for the best part of 24 hours. This was to get it moved from my hosting company’s legacy server to a more modern machine. I use OpenHost for hosting sandfly.net.nz, they perhaps are not the cheapest option (especially if you consider American bulk hosting) but on the plus side they actually rang me yesterday when they saw that I was lost in the maze of account options that their customer portal provides.

The upgrade went smoothly enough although next time I will remember to disable any WordPress plugins before doing the backup since some of them seem to not like being moved. Bouncing them back to active seemed to do the trick.

All this kerfuffle was just to upgrade WordPress to the latest point release. I think everything is working, although I have lost any WordPress comments made yesterday. Let me know if you see any (unintentional) weirdness.

Arduino POV Device Part II

Last week I wrote about starting with digital electronics with the Arduino prototyping platform. Getting something working was easy enough but I was dissatisfied with ugly result, especially when my friend Lloyd showed up with his extremely tidy version of the same idea. The piece of cardboard had to go!

My first version used a breadboard and uncut LED leads because I thought that I would want to dismantle the components for reuse. However I have since realised that I am a grown man with a career and can easily afford the $4.50 material cost. Behold POV version 2:



I won’t be entering this in any soldering competitions but it works OK.

The code has also changed. Compiling in what amounts to a 2D bitmap was a quick way to get something up and running but it wasn’t very flexible, especially since in the future I want to display long strings of text. This means storing glyphs (letter shapes) for every letter of the alphabet (plus digits and symbols) – what I needed was a proper font; what I got was this:

I then turned to Python to generate the program data to embed in the new Arduino code. This script slices the image vertically, generating one byte (actually only 7 bits) for each slice of pixels. What comes out is a long list of byte values that can be output directly to the Arduino’s IO pins to display each section of the text, along with a set of indexes that map letters to the start and end positions of individual glyphs in the array.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import sys
 
def GetSlice(i, pos):
	t = 0
	for q in range( pos, len(i), len(i) / 7 ):
		t = t * 2
		if ( i[q] != '\x00' ):
			t = t + 1
	return t
 
def GetGlyph( i, pos ):
	end = pos
	start = pos
	data = []
	while (end < len(i) ):
		t = GetSlice( i, end )
		if ( t == 0 ):
			break;
		data.append( t )
		end = end + 1
	return (start, end, data)
 
def GetFont( d ):
    result = []
    i = 0
    currentIndex = 0
    indices = []
    while ( i < len(d) / 7 ):
	(start, end, data) = GetGlyph( d, i )
	if ( len(data) == 0 ):
		break
	i = end + 1
	indices.append( currentIndex )
	currentIndex = currentIndex + len(data)
	result.extend( data )
    return ( result, indices )
 
if __name__ == '__main__':
    if ( len(sys.argv ) != 3 ):
        print "USAGE: program <input> <output>"
        exit()
    data = []
    i = file( sys.argv[1], "rb" )
    data = i.read()
    i.close()
    ( d, indices ) = GetFont( data )
    o = file( sys.argv[2], "w" )
    o.write( "static const int indices[] = { " + ",".join(map(str, indices ) ) + " }; ")
    o.write("\n")
    o.write( "static const unsigned char fontdata[] = { " + ",".join(map(str, d)) + "};")
    o.write("\n")
    o.close()

This scheme is more complex that the original bitmap but allows arbitrary text to be display without lots of editing. The modified Arduino code now looks like this. The first two lines contain the new font data, and you can see that the text to display is simply declared on line 5.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
static const int indices[] = { 0,4,8,12,16,19,22,26,30,33,37,42,45,52,59,63,67,71,75,79,82,86,91,96,101,106,111,116,121,126,131,136,141,146,151,156,161,163,165,167 }; 
static const unsigned char fontdata[] = { 63,72,72,63,127,73,73,54,62,65,65,34,127,65,65,62,127,73,65,127,72,64,62,65,69,39,127,8,8,127,65,127,65,2,1,1,126,127,8,20,34,65,127,1,1,63,64,64,60,64,64,63,127,32,16,8,4,2,127,127,65,65,127,127,72,72,48,62,65,71,62,127,72,76,51,50,73,73,38,64,127,64,126,1,1,126,112,12,3,12,112,126,1,15,1,126,65,54,8,54,65,96,16,15,16,96,67,69,73,81,97,62,69,73,81,62,17,33,127,1,1,71,73,73,73,49,65,65,73,73,54,24,40,72,127,8,121,73,73,73,6,62,73,73,73,6,65,66,68,72,112,54,73,73,73,54,48,73,73,73,62,3,3,123,123,27,27,127};
 
static int outputPins[] = { 12, 11, 10, 9, 8, 7, 6 };
static char text[] = "ANDREW";
 
void setup()
{
  for (int i = 6; i<=12; ++i)
  {
    pinMode(i, OUTPUT);     
    digitalWrite(i, HIGH);
  }
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
  delay(2000);
}
 
void loop()
{
  byte row = 0;
  byte endRow = 0;
  char* currentChar = text;
 
  while (1)
  {
    if (*currentChar == 0)
      currentChar = text;
    if ( row == endRow )
    {
        char t = *currentChar;
        currentChar++;
        t = t - 'A';
        row = indices[t];
        endRow = indices[t+1];
    }
    while (row != endRow)
    {
      byte mask = 64;
      for (byte pin = 0; pin < (sizeof( outputPins) / sizeof(outputPins[0])); ++pin )
      {
        digitalWrite( outputPins[pin], (fontdata[row]&mask)? HIGH : LOW  );
        mask = mask / 2; // divide mask by two, moving it down one bit
      }
      row++;
      delay(1);
    }
    for (byte pin = 0; pin < (sizeof( outputPins) / sizeof(outputPins[0])); ++pin )
    {
      digitalWrite( outputPins[pin], LOW);
    }
 
    delay(1);
  }
}

Still to do: This code is not very efficient. It uses digitalWrite() in a loop to turn on the LEDs. digitalWrite() is very easy to use but if you look at the source code you will see it does all sorts of unnecessary stuff for this job. I plan to replace it with direct writes to the required Arduino IO registers.

I also want to make the whole thing interrupt driven to free up the CPU. Why would I want the extra CPU time? I have plans for that as well…

Starting with Arduino

I have a new hobby – digital electronics! Last week I bought an Arduino Uno on a whim from JayCar. Being a typical programmer, I have very little idea how computers actually work on the physical level so this gives me an easy introduction to lower-level coding and electronics in general.

The Arduino is a small board with a fairly capable 8 bit microprocessor (an ATmega328 to be precise) with the IO pins hooked up to convenient headers ready for attaching external devices. The CPU has its own RAM and programmable flash memory, and it comes with a bootloader that can reprogram the flash via the handy USB connection (which can also power the whole board). It is hard to imagine a more plug-n-play device.

I decided that I would follow the well-worn path and create a persistence of vision device for my first project. Mine consists of 7 LEDs hooked up to IO 7 pins (via appropriate resistors), the idea is to make the LEDs blink in such a way that recognisable shapes appear as the LEDs are waved quickly in front of your eyes.

My prototype is a little rough, but works fine in a darkened room (I was too cheap to spring for super bright LEDs and the darkness hides my shoddy soldering job.) The breadboard is too fragile to wave around so the LEDs are mounted on cardboard and connected using a couple of metres of CAT5, which conveniently has 8 internal wires to supply the 7 LEDs with a common ground. The total cost is less than $10, excluding the breadboard and the Arduino itself.

The Arduino programming environment is pretty nifty. The language used is a limited form of C++ (no standard library or runtime support for much of anything) with some extra libraries for managing the CPU’s features. Compiling and flashing the CPU is as simple as pushing a button. Here is the code that generated the above picture:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Array holding the graphic to display
static char* text[] = {
" XX   X     X  XX     XXXX   XXXX  X     X     ",
"X  X  XX    X  X  X   X   X  X     X     X     ",
"X  X  X X   X  X   X  X   X  X     X     X     ",
"XXXX  X  X  X  X   X  XXXX   XXX   X  X  X     ",
"X  X  X   X X  X   X  X X    X     X  X  X     ",
"X  X  X    XX  X  X   X  X   X     X  X  X     ",
"X  X  X     X  XXX    X   X  XXXX   XX XX      " };
 
static int outputPins[] = { 12, 11, 10, 9, 8, 7, 6 };
static int graphicLength;
 
 
void setup()
{
	// setup the initial state of the pins
  for (int i = 6; i<=12; ++i)
  {
    pinMode(i, OUTPUT);     
  }
	// pin 13 is hardwired to the onboard LED, turn it off
  pinMode(13, OUTPUT);
  digitalWrite(13, LOW);
 
  graphicLength = 0;
  for (char* t = text[0]; *t!=0; ++t)
  {
    ++graphicLength;
  }  
}
 
void loop()
{
  while (1)
  {
    for (int i = 0; i < graphicLength; ++i )
    {
		// find out if the pin is supposed to be on (HIGH) or off (LOW)
      for (int pin = 0; pin < (sizeof( outputPins) / sizeof(outputPins[0])); ++pin )
      {
        if (text[pin][i] == ' ')
        {
          digitalWrite( outputPins[pin], LOW );
        }
        else
        {
          digitalWrite( outputPins[pin], HIGH );
        }
      }
      delay( 1 );
    }
  }
}

Not very efficient but simple enough to get going. I am already working on a more functional version which will have its own font and interrupt driven display.

State Highway Death : Turn Right for Murder

Here is our entry for the 2011 48 Hour Film Competition:



Watch on Youtube

The reviews were not kind, but everyone had fun making it. The elements this year were a character called Bobby Young, the dialog “What have you got”, a piece of bent wire, and the film had to end on a freeze frame. Our genre was “Road Movie”, to be honest I think we ended up with more of a revenge film (one of the other genres) but I think we got in enough travel to make it count.

My contribution was mainly as the camera operation, although I helped write the original script and directed the odd scene. It is my fault that Bobby is out of focus in the last scene – hi-def video is unforgiving.

So You Want To Make a 48 Hour Film Festival Film (Part III: Timeline)

Note: this is part three, see the first part for the introduction and disclaimer.

If all goes well, your effort should unfold something like this:

Before the competition: triple check the equipment. Do an end-to-end test by shooting some test footage, editing it into a short clip, and outputting it into the final format. Double check that the resulting file meets the requirements of the competition and take note of how long everything took. Remember to estimate how long your film will take to render and subtract that from the 48 hours you think you have to finish. Do this a couple of days beforehand so you have time to organise any replacement equipment should you need to.

Make sure that you have replacement batteries and recording media. Trust me on this.

On the Friday night: Send along a couple of people to the 48Hour kickoff event. The rest of the team should assemble somewhere quiet and comfortable. After the kickoff, your team’s representatives should phone ahead to let the team know the genre and required elements. The team should spend the evening kicking around ideas until everyone is happy with the rough shape of the film. The script should be written that night, ready for the start of shooting the following morning.

Saturday: Aim to start early, especially if travel is required. The script should have been emailed to the team during the night, so everyone should have seen a copy and know roughly what they need to bring in terms of costumes. With any luck, you can start shooting as soon as it is light. Aim to shoot the outdoor scenes first, you never know how much fine weather you are going to get. Make sure everyone is fed, people will be working hard.

With any luck, most of the shooting will be done by Saturday afternoon. If you are organised, it may be possible for your editor to start assembling finished scenes while the rest of the crew completes shooting but I have never been in a team that has managed this yet.

The editor can now get to work making a rough cut of the film. This should tell the complete story and give an idea of how the pacing works, but does not need music, titles, or much polish. It is here that the editor might discover that he or she does not have a shot required to tell the story, or that the sound is bad in one shot, etc.

Sunday: Assemble the crew you need for any reshoots and get them out of the way. You might have some ideas for different shots after seeing the rough cut, now is the time to try them out. Your musicians should be finishing up about this time. The final edit might take a couple of hours, depending on the complexity of your film. Adding in music tracks, and the title and credit sequences always take longer than you think. You really want to be finishing up about mid-afternoon. Remember that rendering your film can take hours if you have a slow computer. Don’t be like the people I see every year standing at the finishing line holding laptops still waiting for the render to finish as the clock strikes 7pm.

Now you get to bask in the knowledge that you have completed a film. Enjoy the heats, they are a lot of fun to watch.

So You Want To Make a 48 Hour Film Festival Film (Part II : Cast and Crew)

Note: this is part two, see the first part for the introduction and disclaimer.

Unless you are one of the mad people who can fling together a film solo, you are going to need teamwork to get the job done. Being on a team involves knowing when to share your ideas, and just as importantly, knowing when to shut-up and keep out of the way. You are going to be with these people for most of the weekend, so make sure you at least tolerate each other – things are going to be stressful enough as it is.

Apart from the actors, you are going to need some crew.

A director's chairMost importantly, the director decides how the action plays out in a scene including where the actors are positioned, what is in the background, what exactly the camera is looking at, etc. The director should not be afraid to boss people around if needed, and he or she has final say if discussion about an aspect of the filming gets “spirited”.

The camera operator is in charge of the camera equipment, including the lenses and making sure that batteries are charged and there is a fresh supply of media to record to. This person should know how to use the camera enough to make sure everything is in focus and the white balance is set correctly. The camera operator usually has a better idea of what is actually being recorded through the lens, so can often help with setting up lighting if this is required. Also, if you are recording sound directly onto the camera, the camera operation can check levels and microphone placement.

If you have a small crew, the director and the camera operator can be the same person, but it is often good to separate the roles since setting up the equipment can take up valuable directing time. While the camera operator is shooting, somebody shot be writing down a rough description of the shots being taken. This will help the editor later on.

The scriptwriter takes the ideas from the team and writes a shooting script. This will have all the dialogue and rough stage directions. In my experience, it is hard for people to write a script as a group; far better to let one or two people go off and whip something up once the general idea for the movie has been decided on. The script is not set in stone, but should give the actors the dialogue they need and the director an idea of what shots are needed to tell the story. Remember that the script needs to include all the required items specified in the rules.

The editor assembles the shots into a film and has the biggest influence on the final product. This person should be familiar with the software being used. Like scriptwriting, editing is difficult to do in a big group – one or two people maximum. If the editor can’t tell the story with the material the director shot, it may be necessary for the dreaded reshoot.

Depended on your film and who you have available, your crew might also include musicians, dedicated people for lighting and sound, drivers to ferry everyone around and possibly make-up artists if your cast is ugly.

So You Want To Make a 48 Hour Film Festival Film (Part I : Intro and Equipment)

Introduction

I have been involved in a few 48 Hour Film Festival projects over the years, this post is me trying to get down in writing the things that made our films successful. And by successful I don’t mean that we won prizes or accolades; I mean that we had a great time making them, learnt a few things, arrived at the finish line on time, and got to see our work projected on the big screen to a polite smattering of applause. In my view that is what the 48 Film Festival is all about.

None of the following advice applies to the superstar professional teams that enter the competition every year. Those people already know what they are doing. This is strictly for the first-timers.

Equipment and Software

Canon 550D CameraCamera, you need one (well, duh). If you don’t have access to a professional video camera, your options are a digital SLR camera in video mode, or a home camcorder. The camcorder will probably be easier to use, but the DSLR camera will have vastly better lenses. This year we used a Canon 550D, a low-end DSLR, and were pleased with how it looked.

Tripod, doesn’t have to be flash – we used a plastic one that my Mum got free in some special offer years ago. If you are feeling ambitious then try to arrange a dolly – we did without but it can add visual interest to otherwise static scenes if the camera moves smoothly.

Sound is an area where a lot of films fall down; our films have never had good sound because we skimp on microphones and it costs us in the heats. Ideally you want an external microphone with a long enough cord to put in on a boom or somewhere close to the actors. The other option is to rerecord dialogue later and lay it on top of the video during editing, but that is a big job for an amateur team. You can use the camera’s inbuilt microphone but the results will not be great.

Lighting is a problem for small teams, especially when filming indoors with small camcorders. If you don’t have access to proper stage lights, reading lamps that are not too directional can do at a pinch. If the weather is good, try to shoot outdoors as much a possible. You have to be careful shooting in direct sunlight, to avoid the actors faces being half in shadow you need a source of fill light. A white piece of cardboard or polystyrene foam can be used to bounce sunlight back the other way to eradicate annoying dark patches.

A car (or two), you will need to transport people and equipment around. Food and drink enough for the entire cast and crew. Nobody works well when they are hungry and thirsty. Sunscreen is important when filming outside. Petty cash on hand to buy props and supplies in a hurry. A few changes of clothes for your actors if your story takes place over multiple days. Maybe some make-up for the actors.

A computer and editing software. If in doubt, get an Apple Mac. All Macs come with iMovie (editing) and Garage Band (music, multi-track recording), two pieces of easy to use software that together make up 95% of what you need to make a short film. Better software exists but not for free.

Two other pieces of software we found useful were Audacity (sound editor), and InkScape (graphics editor for titles, etc). Both these programs are available for Mac and Windows, and are free. Make sure you have at least a passing familiarity with the software before the big weekend. Every minute will count once you get to the editing stage.

Whew! I didn’t set out to write so much. This is going to have to be a two part affair.

Minecraft Creeper Shirt

The minecraft creeper face textureI don’t use my computer for games much these days, but I have been playing a bit of Minecraft lately. Minecraft is a strange beast, more of a pastime than an actual game, but well worth the money. I have tried online games before, and although I like shooting things, the first person shooters all look the same after a while, and the MMOs are tedious. A huge, multiplayer lego set turns out to be just what I wanted. Besides, I find the lo-fi graphics and even the obvious bugs in the game charming.

As I was invited to a fancy dress party recently, I decided I needed a Minecarft creeper shirt. The creepers are the most terrifying creatures in the game, and I knew I needed to do them justice. 4 pots of fabric paint and many hours gave this result:Me in my creeper teeshirt

SsssssSSSSS – kabooom!

Not too bad, if I say so myself.

Update: I have been asked how the tee shirt was made. This was my first experience with this type of craft, so perhaps a better way exists, but the following steps seemed to work OK:

Materials

  • Plain white tee shirt (I brought mine from the Warehouse for the princely sum of $8. If I was going to do it again I might spring for a better quality shirt since the one I got was made from rather thin fabric.)
  • Long straight edge ruler
  • A dark pencil (2B or similar), dress makers chalk would probably be better
  • Textile Ink – I used Fastex Textile Ink which I found in the craft section of Warehouse Stationary. The colours I used for the Creeper design were Black, White, Leaf and Green.
  • Some brushes
  • Water
  • Small containers for mixing colours (I used yogurt pottles)
  • Lots of newspaper to protect the table top
  • Lots of copier paper for stencils
  • Baking paper
  • An Iron
  • Some scissors

Method

First I ironed the shirt until it was as smooth as I could make it. Then with the ruler and pencil I divided the shirt into squares of equal size. Because the design I wanted extends all around the shirt, some of the squares wrap around across seams.

Don’t make the squares too small! Large areas are much quicker to paint than small ones.

I started at the centre line for both the front and marched the squares towards the edges. It doesn’t matter that the squares the wrap around over the seams are slightly different widths, being symmetrical is more important.

With the dining table covered in newspaper, I laid out the tee shirt as flat as I could. Then I inserted the glossy insert magazines that came with the paper into the tee shirt to keep the inside surfaces from touching. This is to stop the ink from bleeding through to the reverse surface when you brush it on.

I used a purpose-bought Weekend Herald for this, because I knew it came with a lot of glossy paper inserts that will not absorb ink or fall apart when damp like newsprint will. If you follow my lead, it is vitally important not to accidentally glance at any of the editorials, regular columns, or especially the letters to the editor. You need to maintain your calm for applying the ink.

To get really straight edges on the design it is best to mask out the fabric with masking tape. I found the really cheap off-brand sello-tape works even better, as the adhesive sticks just well enough to do the job but comes off very easily. However, I had far to many square to paint, so I just used bits of copier paper cut more or less straight with scissors. Holding down the paper against the fabric with one hand, I quickly brushed on the int with the other, taking particular care with the corners. Working this way I found I could do a square every couple of minutes.

I needed a lot a shades of green, so I was continuously mixing colours. Some very vivid colours can be created, but mixing in too much black or white just results in a muddy mess. Some of the squares are supposed to be white – I just left them unpainted.

The squares that wrap around from front to back across the seams were the hardest. I carefully folded the sides of the shirt up to reach the hidden side, then placed bits of baking paper over the wet ink before I laid the fabric flat against the newsprint. The prevented the ink from smearing if the shirt moved around, the baking paper doesn’t get stuck to the ink as it dries.

Once the front was done and completely dry, I fixed the ink (see below) before completing the other side. Remember the wash and dry your brushes.

Fixing the ink (so it doesn’t run when damp) is done with a hot iron. Iron each part of the shirt for 3-5 minutes to make sure that the ink stay where it is supposed to. I thought I did a pretty good job, but found the the black areas still ran a little when I washed the shirt, so you might like to pay particular attention to dark colours.

Go forth and impress people* with your custom, one-of-a-kind shirt.

* results may vary