Thursday, August 14, 2008

The documentation

Well finally finished the project. Everything worked as expected (although the shakepad could do with some spacers just to make the movement a bit smoother).
Quartz in the end did what i wanted, so im happy there too.
But enough of that, here is the documentation:





The destruction of the wellington town hall's clocktower and facade.

The original story was that after the Napier earthquake in 1931, the Wellington council decided to do a survey of its buildings to see which were earthquake safe.
It was decided that the clocktower and facade of the town hall were a majour risk, so in 1934 they were destroyed, leaving just the building.

I decided to re-interpret this story in a way where the user could get one of two outcomes: an earthquake comes and destroys the building, or the clocktower is removed making the building earthquake-safe.









The Interaction
For the perpose of retelling this story through interaction, I created 3 distinct controls.













1. The floorPad:
The floorpad is basically the on
switch for the program, as the user steps up onto the pad the town hall fades in and the program is activated.
When the user steps off, everything is reset and readyed for the next user.



corrosponds to the mouse's left click.






















2. The Detonator:
The detonator represents an old fashioned TNT detonator in the form of a plunger.
To activate it the handle is pushed to the bottom.
If after stepping onto the floorpad, the user goes straight to the Detonator, T
he clocktower is removed earthquake-proofing the town hall.
However if he/she uses it after causing an earthqu
ake it simply clears away the rubble.



corrosponds to the mouse's right click.


















3.The earthquake pad
:
The last object is the earthquake pad. The user interacts with it by shaking it back and forth.
If the user uses the shake pad before destroying th
e clocktower (by using the detonator), The town hall is destroyed leaving only rubble.
However if he/she uses i
t after the detonator, the hall shakes but is not destroyed or damaged.


corrosponds to the mouse's position.




The three objects are connected as following:




The earthquake pad contains the controller itself. the colours of the connections corrospond with the colour of the wires coming out of the shake pad.




The Space

The space which the display uses is against a wall, prefrebally where the user can see the floorpad from far away, so opposite the door.
The stand itself takes up 100 x 70 cm so is not huge, but the floorpad protrudes out another 35 cm making the total space taken 100 x 105 cm.
The display used is a widescreen monitor, but it dosnt matter what size.


The Stand



The shakepad goes on the higher part, on the left, while the detonator gets placed on the lower part.
the height is approximatly that of a standard desk, which is just high enough for the average adult to reach without bending, but low enough for a child to reach.
The lower part for the detonator is just to make it more accessible for children, who might struggle to reach the high handle. It also however makes the detonator less dominant over the shakepad, so the user dosn't feel its more important.


Cheers
Ben Jack

Monday, August 4, 2008

My quartz


Bit of a birdsnest, but it works :P

Quartz, my patch and some Javascript.

Well as i said before, Ive finished my patch and have some handy bits to share.

First off is the Object type.
While trawling around trying to find a way to store values across frames i came across the Object type.
I haven't done much JavaScript before (just Java) and am not sure if this is just a quartz thing or not, but if you define an attribute of the Object class the attribute will be held like a normal variable instead of being calculated every frame (very helpful for storing values).
done by saying

if (Object.someVariable == undefined)
Object.someVariable = 0; //initializes the value to zero when composition is first started

you can then use this variable in your script.

here is an example using this. This script is for when my shake pad is shaken, it adds 1 to an object and sends true to one of the outputs when it reaches a certain value.
the output is then used to activate an animation.
inputs[1] is used as a reset switch.

if(Object.out == undefined || inputs[1])
Object.out = 0;
if(Object.count == undefined || inputs[1])
Object.count = 0;
if(Object.lastVal == undefined || inputs[1])
Object.lastVal = inputs[0];


else if(Object.lastVal != inputs[0])
{
Object.out = inputs[0]/2;
Object.count++;
Object.lastVal = inputs[0];
}

outputs[0] = Object.out;

if(Object.count < 70)
outputs[1] = false;
else
outputs[1] = true;


this script holds a click, ie output will be false until you press and release a button. it will then constantly output true (even after you release) until you press again. Sort of a toggle i suppose.

if(Object.released == undefined)
Object.released = true;
if(Object.out == undefined)
Object.out = false;

if(inputs[0] && Object.released)
{
Object.out = !Object.out;
Object.released = false;
}
else if(!inputs[0] )
Object.released = true;

outputs[0] = Object.out;

yer, thats all i have that other people might find helpful, but if scripts need writing I'm happy to help.

Finally.... updates!



I have been neglecting my blog a bit lately, and have some updates....

So.

Images, YAY. Here are some images of the city hall (before and after the destruction of the clock tower) i got from the turnbull library.

I've cut them up and made the first animation using flash (the demolisher animation)



I have completed my quartz composition, and will post some of the JavaScript patches i wrote encase anybody else finds them helpful.
ill make a new post for all that, however.