Showing posts with label Musing. Show all posts
Showing posts with label Musing. Show all posts

Sunday, 26 February 2012

To the Moon, Tragedy, and Video Games

To the Moon is an excellent indie game available from developer freebird games.
This is an analysis of its story. I've tried to keep it spoiler-free. For reviews, check your favourite games site!




To the Moon

In the near-future, doctors can implant memories to rewrite a patient's (remembered) life. To do so they must hop backwards through the patient's memories, from the most recent and most easily accessible, to the oldest and most deeply buried memories that need to be edited to effect the desired change in a life's course.

To the Moon's story is multilayered. Like the outermost layer's sci-fi memory-hopping premise, the layers are exposed progressively until the game itself eventually reveals in its entirety what it is.
To the Moon is philosophical sci-fi, an engaging mystery, a bittersweet romance, and a Shakespearean tragedy. All of the layers engage and make each other meaningful, even (in hindsight) before they are made overt.

The outermost layer defines the overall framework of the story in reverse chronological order. But this memory-hopping is more than just a narrative gimmick. By the end of To the Moon we're forced to question whether happiness exists in a moment or across a lifetime, whether the people we love and have lost exist as anything more than memories - and what is the worth in those memories.
To the Moon's ending is open to interpretation, but not in the usual lazy way of leaving details obscured. The details of this story are concrete, although often subtle. No, the interpretation depends entirely upon our answers to those philosophical questions the game poses.

The game opens with a mystery: why does a dying old man, Johnny, wish to go to the moon so desperately that he would rewrite his life to do so? And even more intriguingly, why doesn't he know the reason himself? This premise also neatly keeps the story free from artifice: the narrative never unfairly hides anything for a cheap twist later on.
There is a twist, but it is a thing to marvel upon as the implications to all layers of the story become clear. It's a twist not because it shouldn't be revealed early but because it cannot be revealed early. The best kind.

Underneath the sci-fi and the mystery lies the compelling pathos of the third layer: the characters. It's here that we engage with the likeable doctors, and fall in love with Johnny and River and their awkward, bittersweet romance.
This is where To the Moon captures your heart and doesn't let go until the end of the game. It sustains the entire game with wonderfully-written amusing, sensitive, and heartbreaking dialogue.
This is how we come to care about the philosophical and ethical implications of rewriting memory. This is why we're driven to keep playing.

And here too is the central theme of the game: autism. Not memory-hopping, not love and loss, but Autism Spectrum Disorders and the particular challenge they all present: communication and connection with others. To the Moon explores with exquisite tenderness the fundamental need to connect with people, a need that isn't any less in those with a condition that makes it so difficult to do so.
We watch in helpless sympathy as River struggles to express herself to someone she loves and needs, in a confusing social world that she cannot understand.
In turn, Johnny's stoic, steadfast support for a woman that he knows he will never truly know is deeply touching - even, or especially, when his only-human selfishness shows.
This is the gentler, subtler tragedy of miscommunication that we can all relate to on some level. This is what To the Moon is really about, even though it's heaviest punch is yet to come.

Because To the Moon is a Shakespearean high tragedy, as well, and that tragic singularity at its core is the twist that unifies all of the layers above it - the sci-fi memory-hopping mystery, the sweeping romance, and the gentle study on autism - and shows that everything you might have thought was superfluous presentation or cheap emotional manipulation actually makes a perfect, beautiful, terrible, heartbreaking sense.

Tragedy

"Tragedy" is an oft-misused word. A car accident is not a tragedy. The death of a loved one is not (necessarily) a tragedy. A key requirement of tragedy is that there is always some way - some simple, easy way - to avert it, that it doesn't have to end that way... Except that in some sense the tragedy always was inescapable, that the individuals were driven by their nature to some inevitable conclusion.
The slow constriction of possibility into inevitability is what makes tragedy such a powerful narrative structure.

The question of free will is therefore fundamental to tragedy. Tragedy requires that the hero be free to avert it, but does not. Tragedy requires that the choices leading to it be driven not by random whimsy but by the definite character of the hero. Tragedy exists within the tension between freedom and inevitability.

Tragedy, then, is inherent in Autism Spectrum Disorders - these are disorders that are infamous for constraining the behaviour of those afflicted, and almost always set a course for conflict with an incomprehensible and seemingly hostile social world.
To the Moon explores the tragedy of ASD on two levels. First, there is the everpresent subtle tragedy of miscommunication that provides pathos at the character layer throughout the game.
Second, there is that singular event, the Shakespearean high tragedy.
Tragedy is driven by the character of its heroes, and To the Moon uses ASD as an unusual but compelling device to serve this purpose. A lifetime of apprehension and confusion over Johnny's seemingly callous behaviour, and the ultimate destruction of a lifetime's memories, could all have been averted if only River could communicate what it was that troubled her - but of course she couldn't, and so it wasn't, and that is the tragedy.

The tragic structure of the narrative isn't even apparent until the last act of the game, when the singularity at the story's core is revealed. Until then, the narrative's impact comes entirely from the simple pathos of the higher layers, which, thanks to excellent writing and characters, is powerful enough on its own to engage you and impel you headlong through the game.
But when the real tragedy is finally revealed, it slams all of that accumulated pathos into you at once, illuminating everything that you were already emotionally connected to under a new, Shakespeareanly tragic light.

The common (mis)usage of "tragedy" is simply to describe a narrative with strong pathos and sad ending. Notably, To the Moon doesn't have a sad ending - depending on how you look at it - but it's a truer tragedy than many narratives that lay claim to the name.

...and Video Games

There's something else that exists within the tension between freedom and inevitability - video games.

As game developers we are always exploring this fascinating region bounded by simulation on one side and cinema on the other. Just as tragedy funnels a character with the illusion of freedom to an inevitable conclusion, so too do games. The same illusion of freedom that makes tragedy powerful works for games.
And let's be clear: freedom is an illusion in all games, no matter how open they appear.

To the Moon isn't good gameplay in the usual sense of the word, but it uses the nature of video games very aptly to explore tragedy.
It could be (and is) criticised for being more like a movie than a game, but that's missing the point. It's not a movie, regardless of how little gameplay it does have, and even that small illusion of freedom makes it more powerful - in a fundamental way - than a movie can ever be, for the same reason that true tragedy is more powerful than a story with a sad ending.

To the Moon belongs unreservedly within the video game fold, and video gaming is so much the richer for having it here.

Monday, 1 February 2010

The Stable Marriage Problem

Previously I wrote about a mathematical model called the "Marriage Problem" which, whilst interesting, has a lot of shortcomings. Under very particular conditions (which are arguably quite unrealistic), it can optimise the chances of marrying the best possible partner I could expect. But even then it only optimises the probability of doing so, and that's small comfort if I marry someone today only to meet my true True Love tomorrow.


Go To Him
I still love you so, but if he loves you more, go with him.

Life is messy. What if you do fall even more in love with someone else than with your current spouse, and what if they fall in love with you? What if they also are married to another? Then should your respective vows forever keep your two hearts apart, or should you abandon that which once was beautiful but which beauty now hath ruined? What mockery is made of love in either case!
Oh, that this tragedy could have been averted! If only there were a way to ensure that everyone be happily married and never be tormented by temptation! If only Mathematics had something to tell us...
There is another mathematical problem, of similar name though quite distinct, called the "Stable Marriage Problem". Consider an equal number of men and women to be married to one another. Is it possible for everyone to marry, such that you could never find yourself in that lamentable hypothetical situation: preferring to be with someone else who would also prefer to be with you?


I'm Henry The Eighth
And every one was an 'enry...

Yes - it is possible.
Gale & Shapley devised a simple iterative algorithm for solving the problem: Each man should rank the women from best to worst according to his personal preferences, and each woman should rank the men according to hers. Then, each man should propose to the woman he prefers most. If a woman receives a proposal, she accepts it, and the couple are engaged. If a woman receives multiple proposals, she accepts the proposal from the man she prefers most. Then, each man who was rejected (because the woman he preferred most accepted another man's proposal) should propose to the next-most preferred woman on his list. As before, if a free woman receives a proposal, she accepts it, and if she receives multiple proposals, she accepts the one she prefers most. If an engaged woman receives a proposal from a man she prefers more than her current fiance, she dumps her current fiance and accepts the new proposal. Then, each man who was rejected or dumped proposes to the next-most preferred woman on his list... and so the process continues until every man (and therefore every woman) is engaged. At this point everyone marries their current fiance and the algorithm is complete.
This algorithm is guaranteed to finish (it won't keep iterating endlessly), and it is guaranteed to result in a "stable pairing" - an arrangement of marriages in which no two people prefer each other to their current spouses.
It is interesting to note how similar this model is, in principle, to the way our society has approached marriage in recent history.


Hungry Heart
Got a wife and kids in Baltimore, Jack, I went out for a ride and I never went back...

So if everyone followed these rules, would the world be a happier place? Not necessarily. Stability, in this sense, doesn't imply happiness: just because your marriage is "stable" doesn't mean that you wouldn't rather be with someone else - it just means that that person wouldn't rather be with you.
The mathematical "happiness" score of your marriage is determined by how high your spouse sits on your own personal preference ranking of all partners. The overall happiness of a given arrangement of marriages can be defined as the average happiness scores of all people. Note that husband and wife can have different happiness scores!
For any large enough group of men and women there will be multiple alternative arrangements of marriages that are all "stable", in the sense that no two people prefer each other to their current spouses. Some arrangements will be "happier" than others.
Gale & Shapley's model produces just one of many possible stable arrangements. In fact, there's a very interesting mathematical property of Gale & Shapley's model: It will always produce the arrangement that, whilst still being stable, is happiest for the men (who propose)... and unhappiest for the women.
Reflect for a moment, if you will, upon the parallels between this model and conservative real-life society: I wonder if it is coincidence that this model predicts unhappy marriages for women, and that our real-life notions about marriage are changing as women become more empowered?


All This Useless Beauty
What shall we do, what shall we do?

Remember that every man and woman ranks each potential partner from best to worst. These personal preferences are necessary for establishing that an arrangement is "stable" (we need some way of knowing whether any two people prefer each other to their current spouses), and is used to calculate the happiness of an arrangement of marriages. So far, and very politically correctly, we've assumed that the preferences are arbitrary, random - that beauty is in the eye of the beholder. But what if each person has an intrinsic "beauty" (or personality or intelligence; call it what you will, mathematically it's equivalent) that influences their standing in other people's preferences?
Caldarelli & Capocci showed that the more that "beauty" is allowed to influence the preferences, the more miserable everyone is in general. That's because the more homogenised our notion of beauty is, the more similar everyone's "personal" preferences become. The more similar everyone's preferences are, the less likely it is for you to marry high on your list, because the people high on your list are also high on the lists of rivals more attractive than you are. It's fine if you're beautiful, but rough for everyone else.
Surprisingly though, according to Caldarelli & Capocci's model, the more that beauty influences preferences, the happier that women are, on average, relative to men. The arrangements found by this model are still happiest for men and unhappiest for women, but the difference is less. And depending on how much weight is placed on beauty (not too little, not too much), a majority of women can end up much happier than if beauty plays no role.
I wonder, then, if emphasising beauty is a strategy for women as a group to maximise their happiness within a traditionally male-dominated society - making the best of an unfair situation?


So Far Away
You're so far away from me, so far I just can't see.

"Spatial homogamy" is the idea that people tend to marry people from their own area. "Propinquity" is the idea that the probability of forming a relationship is proportional to the square of the physical distance between people. Many studies have cemented these ideas in sociology: People tend to prefer partners who live close by. Someone commented on my previous article that the trick was to fall in love with someone within a certain distance. He was probably thinking about fuel prices and airfares, but how right he was - from a mathematical point of view!
If adding "beauty" to the model reduces overall happiness by homogenising people's preferences, then adding "distance" to the model does the opposite by mixing the preferences up again. Because everyone occupies a unique position in space, everyone's preferences are influenced in a unique way by the distances to other people.
In fact, I think it's probably even better than that. The distance relationship between two people is symmetrical, and therefore affects both of their preferences the same way - the person that you prefer because they live close by is more likely to prefer you as well, for the same reason. So the more emphasis placed on distance, the happier everyone should be. So - say hi to that cute guy or girl you see at the local market next time!


The Stable Marriage Problem is an incredibly rich area of research, bringing together combinatorial optimisation, game theory, economics, and even real sociological research. As far as I know it's not actually used to marry people off anywhere, but it is used for analogous problems like assigning students to schools and residents to hospitals.
There are a lot of other variants on the classical Gale-Shapley model that I haven't even touched - like models that take into account three-way matches (actually, even kinkier than it sounds if you were to apply it to dating...) and models that take into account "cheating" to get a better match for yourself.
There's even a variant, commonly called the Stable Roommate Problem, which matches pairs of people from within a single group, not across two groups like the Stable Marriage Problem. This might be a good model for gay marriage, but there's some bad news: there's no mathematical guarantee of stability in this single-group variant. But then, we've just seen that stability is no guarantee of happiness, so maybe that's not such a bad thing after all!

Saturday, 2 January 2010

The Marriage Problem

How do you know when it's time to get married? As a Maximiser (of which I shall write another time), this question troubles me. How do you know that the one you're with right now, of all the millions of people out there, is The One? How do you know that she isn't yet to come into your life? For that matter... how do you know that you haven't already said goodbye to her?


Don't Stop 'Til You Get Enough
Ooh!

Mathematically, if naively, the problem is simple to formulate. There are many mathematically equivalent versions - the most common is the "Secretary Problem". One version, called "Googol", presents it as a simple game. Imagine that in front of you is a stack of 100 unsorted pages, face down. On each page is written a number, any posible real number, within an unknown range. You can turn over a page from the top of the stack one at a time to see the number, and you can keep on turning as many pages as you like, but once you turn over a new page, you can't go back. Your goal is to stop when you think you've just turned over the highest number you think you'll ever get, and keep it - forfeiting all numbers yet to come and having already forfeited all numbers already seen.
What are your chances of selecting the highest number? Is it just pure luck, or is there a strategy? It turns out that there is a strategy to maximise the probability of selecting the highest number.
The basic idea is to "write off" some initial number of pages just to get an idea of the size of numbers that are in the stack, and use that knowledge to subsequently stop when you think you have the highest number.
Like in statistics, the trick is to obtain a large enough sample of the population to measure the natural variability, so that you can say with some degree of confidence that any given data point is, you might say, a significant other. The difficulty is that whereas in most statistics a larger sample set is better, in this problem a larger sample set increases the probability that the highest data point is in the sample set, and if it's in the sample set, you've already given it up.
So, what is the best strategy? It turns out to be in the form of a "stopping rule": turn over a certain number of pages, making a note of the highest number that you see, and then keep on turning over pages until you get a number higher than that previous best, and stick with this new best.
J. Gilbert and F. Mosteller of Harvard University proved that the optimal number of pages to turn over before stopping at the next new best is 37. This magic number is 100 (pages) divided by 2.72 (e, the base of the natural logarithm). This strategy works for any population size - just divide it by e and sample at least that many data points before stopping at the best so far.


When I'm Sixty-Four
Will you still need me, will you still feed me, when I'm sixty-four?

Now, let's apply this knowledge to the problem of getting married. What is the population size from which I can sample? Very roughly, let's say there are 6.4 billion people, 50% of which are women (3.2 billion), 50% of which are between 18 and 40 (1.6 billion), 25% of which are single and available, leaving 400 million. A demographer would be able to give you a more accurate figure, but what's a few hundred million amongst friends? Now, sadly, not every single one of those women is interested in dating me, but let's conservatively say that 1 in 40 will (because it makes a round number), resulting in a population size of 10 million. Going by Gilbert and Mosteller's 37% rule, then, I should date about 3.7 million women before thinking about getting married! If I 5-minute speed-date 24/7 for the next 35 years, then, and only then, I can think about settling down.


Love The One You're With
If you can't be with the one you love, love the one you're with.

Actually, it's a bit more complicated (no kidding!). In the classical version of this problem, the goal is to try to select the single highest number; the single best partner; The One. Anything less is failure. Aiming high is admirable, but risky: Gilbert and Mosteller's solution is optimal, but still results in only a 37% (1/e) chance of selecting the best partner. Not so great. But it gets worse: there's also a 37% chance of ending up with the last remaining option out of desperation (this would happen if my best partner was one of the first 37% of people that I passed over, meaning that I would never encounter anyone better and would search for the rest of my (dating) life in vain. So: a 37% chance of finding The One; a 37% chance of searching for my entire life only to end up with the last available option; and a 26% chance of something in between - not The One, but probably ok (guaranteed better than a random 37% sample of the population).
In light of those odds, maybe it's better not to optimise the probability of selecting the single best partner, and instead optimise the expected value of whoever is selected, even if they're not the best. In Googol the value would be the number on the page; in the marriage problem it might be the ranking of a partner's beauty, or intelligence, or some more sophisticated aggregate score (about which I shall also write later). The probability of selecting the single best partner will be lower, but the expected value of the partner who is selected will be higher.
J. N. Bearden of the University of Arizona showed that in this modified version of the Secretary Problem, called the Cardinal Payoff Variant, the optimal strategy is still a stopping rule, but the optimal sample size is the square root of the population size, not the population size divided by e. So now I only have to date 3162.27 people instead of 3.7 million - excellent! (sqrt(10,000,000) = 3162.27. I wonder how you date 0.27 of a person?)


This Year's Love
This year's love had better last...

So maybe applying the stopping rule to the literal population size is not feasible. Realistically, we're not constrained by the number of dates, we're constrained by time. Let's say that I want to get married before I'm 40 years old. I started dating when I was 19, so that gives me 20 years to date - 20 pages in my stack. The square root of 20 is 4.47. That means I should date for about four-and-a-half years before thinking about making a commitment. I'm 27 years old now... that's eight years into my dating window. I... I guess it's time to start looking for a wife!


Alright, let me concede that this is an extremely simplistic model of dating. It makes a bunch of assumptions that simply don't hold true in real life.
In real life, for example, I could go down on my knees - both for forgiveness and in proposal - and marry someone I've already dated.
In real life, direct sampling is not the only way of building up a predictive model of the (dating) world - we have anecdotes and movies and women's interest magazines; we share the models we've individually built up, with each other.
In real life... we fall in love and it just doesn't matter.

Friday, 1 January 2010

Unraveling Braid

I can't stop thinking about Braid; everything about it - gameplay design, art, sound - was executed nearly perfectly. And each of those aspects brought something new and interesting to the game. Nevertheless, being a game programmer, it's the code that I'm interested in here, and I can't help musing about how I would implement some of Braid's unique mechanics.

If you haven't played Braid yet but were kind of thinking about it, then stop reading this and go play it, right now! I don't want to deprive anyone of the smallest part of the wonder at exploring Braid's universe for the first time. If you haven't played Braid and don't intend to, then perhaps I can convince you to try it :)

Let me begin by making it clear that I don't know anything about the actual implementation of Braid; I haven't spoken to the developer and I haven't looked at the level editor. But how it's actually implemented is almost beside the point; this is a collection of more general thoughts inspired by Braid.

One of the first things to impress me about Braid was the consistency of its design. In essence, it's a platonic 2D platformer plus just 5 unusual mechanics:
1. The ability to rewind time for some objects in the world.
2. The idea of binding time to one of the dimensions of 2D space.
3. The idea of branching, but interacting, timelines.
4. The ability to distort time in one local region of 2D space.
5. The idea of making objects in some levels run backwards in time.

The ability to selectively rewind time (for some, but not all objects), and the ability to distort time (for some, but not all regions) provides ways for the player to affect the synchronisation of objects in the world to solve problems.
The idea of binding time to a spatial dimension in some levels, such that horizontal movement advances or rewinds time, ingeniously provides both an obstacle and a tool for overcoming other obstacles.
The idea of branching but interacting "shadow" timelines, such that the player can be in multiple places at once, provides a mind-bending tool for solving impossible puzzles.
The idea of running time backwards in some levels turns everything neatly on its head, makes the player gasp in delight when they realise some of the gameplay implications, and provides the most astoundingly clever ending to a game that I've ever had the pleasure to experience.

The player's immense satisfaction in each level comes from painstakingly learning how each new mechanic works, and then synthesising ideas to solve a problem. This game could only work by strictly adhering to the fundamental design mechanics. This is both impressive and requisite: it is impressive that the game never resorts to any special cases, but then, if it did, it would destroy the player's ability to derive satisfaction from their own cleverness.
And because the design never calls for any special cases, I imagine that the code must have been a joy to craft. That is what I am chiefly interested in here, for the observation that Braid adheres to a limited set of mechanics belies the subtle complexity of those mechanics, and therefore their implementation.

What follows is merely my guesswork.


1. Rewinding time.

At any point the player can rewind time by holding down a button, and release it at the point in time at which they wish to resume control and try again. That means what happened in the past needs to be buffered somehow.

Bad Idea Note: Simply buffering the player's inputs would not work, because although all games are deterministic, they are also convergent: given the complete state of the universe (including inputs), there will be exactly one proceeding state, but there may be multiple possible preceeding states (did the player get to their current position by running or falling?). This property of deterministic convergence is employed to mind-bending effect by mechanic #5.

A naive approach might be to simply record the position and state of each object at each frame. But besides being memory intensive, this would make interactions with other objects - which might be moving through time in a different direction or speed - awkward.
I think it would be better that the state of each object, including the player, be recorded at a slightly more abstract level - say, the start/endpoint and velocity of a jump. Each state would be coded to be able to play either forwards or backwards at a given speed, procedurally. This would allow objects to interact dynamically with others when slowed down or going backwards, and not be rigidly bound to what was recorded. This implementation would come in handy for mechanic #2, binding time to a spatial dimension, and #5, running some levels backwards in time.

The abstracted-procedural-state approach would allow every object in the game to have its own individual "timeline". For most objects their timelines would coincidentally match up - they would progress forwards and be rewound backwards synchronously - until their timeline is affected by another mechanic...


2. Binding time to a spatial dimension.

Using the above implementation, this would be fairly simple - control all affected objects' timelines based on the player's current velocity.

Bad Idea Note: It might be more intuitive to think of this mechanic as the player's horizontal position scrubbing backwards and forwards through time, like the progress bar on a media player. And it might therefore be natural to think of using the player's position, not velocity, to control object states. Unlike a prerecorded movie in a media player, however, the objects will not be in the same state on every occasion a given time is revisited. It's impossible to jump to a given time, you have to advance frame-by-frame, state-by-state, procedurally, so that all the interactions can play out dynamically.
That means using the abstracted-procedural-state approach with individual object timelines controlled by player velocity, even if all of the individual timelines happen to be controlled synchronously.


3. Branching but interacting timelines.

This idea, although the most mind-bending for the player to come to grips with, would actually be one of the easiest to implement. Assuming that we record what happened in the past using the abstracted-procedural-state approach, the implementation of this mechanic would be simple.
Each object has a "shadow" object, which is actually an entirely independent object. Shadow objects only interact with other shadow objects and purple objects, which bind together both their shadow and real selves. When time is rewound and control is resumed, most objects and their shadows resume what they were doing, following the same rules. Because it's a deterministic world, the objects and shadows stay in sync, unless something disrupts them by interacting with one but not the other.
However, the player is not deterministic, and can choose to take different actions when control is resumed. The player's shadow repeats whatever the player just rewound.
The player's shadow would be controlled by the recorded states: while rewinding time, instead of discarding the states that we rewind past, they would be kept to use as a control buffer for the shadow. When the recorded states run out, the shadow just slumps, uncontrolled.


4. Distorting time in localised regions of space.

This idea is nice and simple for both the player and the programmer. If each object has an individual timeline, then the speed of that timeline could be set to be proportional to the distance of the object from the distortion.


5. Run time backwards.

This idea is the most fascinating to play, and possibly the most difficult to implement, of them all - due to the deterministic-but-convergent property of games.

First, let's get the easy stuff out of the way. Using the abstracted-procedural-state approach, we would already have coded all the interactions for objects moving backwards through time - for example, a monster going from dead to alive when the player jumps on its head, rather than the other way around. So the basic interactions with objects are already taken care of.

Bad Idea Note: You might initially think that simply running time backwards at a fixed speed for all objects would be easy, given that we already have solutions for selective rewinding, variable timeline speeds, etc. The important difference is that in those cases, the past is known and it's just a matter of replaying it somehow - time can only be rewound backwards for as long as the player has been playing, to the start of the level. In this case, however, time runs backwards from the beginning of the level, and we haven't had a chance to record where each object was. Or will be. Or something. Arrgh!

From the player's perspective, this mechanic is amazing because, when time runs forwards, we can intuitively reconstruct where an object is likely to have come from by observing its current state in the environment. When time runs backwards, that reconstruction becomes a prediction. In a deterministic universe running forwards, given perfect knowledge, we can make perfect predictions - we know exactly where the monster will go. But in a convergent universe running backwards, even with perfect knowledge, we can't make perfect predictions - we can't know whether the monster will stay on the ground or "fall up" to a higher platform. It's amazing when, as the player, you realise that an object's "past" can be affected by actions in the "future", like blocking off a route which makes it impossible for a monster to have "come" from that route. It's like the weird world of quantum mechanics, in which a particle's past is determined by observations made in the future.

The difficulty is that deterministic-but-convergent property. All of the other mechanics could be implemented in a philosophically plausible manner, but I can't see any good way to do this mechanic except by "cheating".

In the other mechanics, the behaviour/AI of an object running backwards along its individual timeline is trivial - just reconstruct it from the recorded abstracted state information. In this mechanic though, we need some actual decision-making logic while running backwards. Take the example of a monster walking backwards along the ground, just about to go underneath a higher platform. Should it continue walking backwards along the ground, or should it "fall up" to the higher platform. What happened in its "past"?

Bad Idea Note: You might think of taking further inspiration from quantum mechanics and assigning a probability to each past, which is fine from a design point of view, but would be practically impossible from an algorithmic point of view. You would need to identify all the places at which the convergence tree can branch (perhaps this could be marked up in data). Then you would need an algorithm for traversing the convergence tree and pruning off the branches that come from impossible starting conditions. Then you would randomly select between the remaining branches. The problem would be identifying the impossible starting conditions - how far back do you branch before determining that the object is stuck in a loop with no start, and how do you account for the interactions with every possible branch of every other object? Combinatorial explosion!

The more sensible approach might be to have a deterministic "default" behaviour like "always walk", and to "cheat" by having the designer specify when the object should deviate from that default behaviour - for example, trigger a "fall up here" marker when the player blocks the ground route (meaning that the monster could not possibly have taken the ground route).
There are few levels that use this mechanic, and the places where there is ambiguity are even fewer, so this scripted approach would probably be manageable.

From a gameplay perspective this approach might also be desirable - having a deterministic default behaviour for each object results in predictability which is probably reassuring to the player, even though, philosophically, the player has no reason to expect the behaviour to be predictable.


So, that's all the main mechanics seemingly neatly implemented. I'm very impressed by how you would be able to get such varied gameplay from relatively simple, but far from obvious, rules.
Damn, I wish I'd made this game...

Friday, 30 January 2009

Leonard Cohen, Sydney 2009

When I first heard Hallelujah, I figured out how to play it on repeat and drove my brother crazy listening to it non-stop. I was a teenager, and Leonard Cohen's sorrowful lyrics held a certain superficial appeal. Going only by his songs, I always imagined Cohen as a saddened, world-weary man, and never saw beyond the surface to the depths of emotion over which sorrow was draped. So when this 74-year-old man made his entrance, sprightly skipping, onto the Sydney Entertainment Centre stage to a standing ovation, I knew my preconceptions were about to be overturned.
Who would have guessed? Leonard Cohen is essentially an optimist, an idealist, a hopeless romantic. He quips that when he was last on tour, 15 years ago, he was 60; "just a kid with a crazy dream". The saddest songs are rendered joyful when sung by this irrepressible man who's gone through it all and come out the better for it. He spent the last decade studying philosophy and religion, he says, "but cheerfulness kept breaking through." He, the man behind the music, is inspirational.
But oh, the music! Rich, intricate instrumental sounds replace the synthesised recordings on his albums - he shares the stage with an amazingly talented and versatile band, and his songs have been arranged to showcase their musicality. And share the stage he does, humbly, elegantly, graciously - solos on sax, harmonica, spanish guitars, harp, and double-bass interleave with his golden voice to bring a fresh appreciation to old songs. Performed live, the beauty of the music approaches that of Cohen's lyrics. This is more than a concert for fans of Leonard Cohen; it's a concert for lovers of music.
Now, the only sorrow I feel is the realisation that I'll probably never hear those songs sung the same way again. Recollection will fade from my memory, slowly obscured by those old recordings I can still play on repeat.

Sunday, 27 January 2008

Grammar and Love Triangles

I love The Beatles, but what's wrong with these lyrics:

From "Anna (Go To Him)":
"You say he loves you more than me, so I will set you free; go with him."

and from "If I Fell":
"If I give my heart to you, I must be sure, from the very start, that you will love me more than her."

Colloquial grammar is ok as long as it's unambiguous, and I have nothing against bisexuality, but the grammatical interpretation here just isn't Beatles!

Remember, when in doubt over a comparative sentence, write it out fully and then chop off the unnecessary bits:
"You say he loves you more than I love you"
"You say he loves you more than he loves me"

Monday, 11 June 2007

New Scientist and Science

My first issue of New Scientist was finally delivered today! I'm very much looking forward to getting up-to-date on the world of science again. And not just science research, either - one of the things I like about New Scientist is that it often covers current social and political issues that pertain to science, and I usually agree with the position that the magazine takes. I like to think that it's bipartisan, above the conservative/progressive political divide - but doesn't everyone like to think they're unbiased? :p
The thing that I find interesting about this viewpoint is that we usually think of science as progressive, but the process of scientific peer review, a cornerstone of science, is necessarily conservative.
I was having a discussion with someone the other day, who was telling me about a maverick scientist who had "scientifically proven" that the human mind could reorganise cell structure etc. Hijacking "science" like this bothers me. Regardless of the actual truth of those claims (which I couldn't argue specifically since I didn't know anything about them), no lone man - or team or organisation - can scientifically "prove" anything - same goes for all pseudo-scientific claims. The best one can do is present evidence and have it accepted by the scientific establishment. (Which of course doesn't make it true, but is the closest thing to "proving" it.)
So, it's a bit strange, but I, who usually have very little faith in conservatism, strongly agree with the role of the scientific establishment in scientific progress.

Disclaimer: I'm not a scientist and can't speak for anyone else. But why let a trifling detail like that get in the way of a good rant?

Tuesday, 9 January 2007

Chocolate Coated Coffee Beans

At the end of last year, on a beautiful day for a ride to Roslyn Bay, over a coffee by the water's edge, I was introduced to a most marvellous confection: a single chocolate coated coffee bean, a tiny capsule of heaven on my saucer. My travelling companion, Aiden, told me of a magical coffee store far to the south where he had seen them previously. But could I get them in Rockhampton?
[+] Read more



I spent the rest of the year (ok, so that wasn't very long) searching in vain for a source of these wonders. Darrel Lea apparently occasionally stock them, but not any more. Same for Capricorn Roast. In desperation, I widened my search to Bundaberg (and my family thought I was there to visit them, shh, don't tell them!) but still my efforts bore no fruit.
Long long ago, in a better time, there was a gourmet food store in Rockhampton. But it closed, and with its passing the land was plunged into a period of darkness. Still, some spoke in hushed whispers of another store, one that yet survived. No phonebook told of this fabled store, and for a long time I didn't believe the rumours, but with the success of my quest hanging precariously in the balance I was prepared to turn to any small glimmer of hope. So, with Sarah faithfully at my side, I set out once more.
Far away we went, following the vague second-hand directions of Sarah's mum who spoke a traveller who claimed to have stumbled upon this store by chance in her wanderings, but who had not ventured inside. Over the mighty Fitzroy river, down Denham, and across to the far side of the Bruce Highway - surely we had gone too far then? - and still there was no sign of any gourmet food store. At the foot of the mountainous Range we were forced to turn back, resigned to the bitter taste of failure. But as we wearily turned around, Sarah, with her keen eyesight, cried "Stop! Stop!" - she had found it!
I was to be forgiven for missing it as we passed it the first time; the store had the confounding name of "Tables & Tots", and only in small unassuming print did it say "Gourmet Goodies". Excitedly, we went inside. The store was a confused jumble of furniture, tableware, and bric-a-brac piled on every available surface. But along one wall were exotic foodstuffs, and at the back of the store I found at last what I had been searching for: chocolate coated coffee beans... in no less than three mouth-watering flavours!
I immediately bought a small packet of espresso flavoured beans, which I prefer to the cafe latte flavoured beans I have just returned to buy after consuming the first lot. I have learnt that approximately 5 beans equals one shot of espresso - bear in mind that not all the caffeine from grounds makes it into the espresso. It's very hard to stop at just 5 beans, but so far I've been strong.
Thus ends the tale of my quest for the chocolate coated coffee beans!

Wednesday, 3 January 2007

Microsoft Zune

(This is a follow-up on the previous post on Windows Media Player.)
Zune is Microsoft's new portable music player and software of the same name. It's analogous to iPod and iTunes. Since Windows Media Player 11 was promising but ultimately flawed, I decided to give Zune a try.
Zune is basically identical to WMP (see previous post), just with a different skin. However, it does two things WMP doesn't:
  1. Supports AAC natively
  2. Imports playlists and ratings from iTunes
These are very very good things. That leaves only two downsides to Zune compared to iTunes:
  1. As with WMP, it stubbornly resets my viewing preferences every time I switch panes
  2. As with WMP, it lacks a way to duplicate Party Shuffle's automatic song selection
Nevertheless, given that it's so much faster than iTunes and has nifty playlist management - and imported all my playlists from iTunes - I'm going to give it a try for a while.

Edit:
In iTunes, you set a checkbox called "Compilation" to indicate that an album is a compilation. In WMP/Zune, you set a separate field for each track called "Album Artist" to something like "Various Artists" to indicate a compilation. Unfortunately Zune didn't import the "Compilation" meta-data from iTunes, and this was messing up my browsing experience (in both WMP and Zune).
After setting the "Album Artist" to "Various Artists" for all compilation CDs, the browsing experience became far, far, far better, so much so that the default view for each pane works quite well, and it's no longer so annoying that it resets the view each time you change pane.

In summary, the WMP/Zune browsing interface just got a lot better in my opinion; on par or superior to iTunes' 3-pane browser. *thumbs up*

Windows Media Player 11

Thanks to a network problem I've been unable to use iTunes (no library database) so I thought I'd try out Windows Media Player 11 at Carey's suggestion. This is my experience...
[+] Read more



Behind the screens
The first technical difference between iTunes and WMP is the way the library is managed. In iTunes you drag files into the library to add them whenever you acquire new files. This is a pain because you lose all song-related data like play count and stars and playlists if you want te rearrange the files on your HDD - you have to remove them from iTunes and add them again each time. In WMP, you specify folders for WMP to monitor, and all music in those folders is automatically in your library. This actually works pretty well, and somehow it manages to keep track of files even if I move them around while WMP is closed (I know it's actually keeping track of the files and not just removing/adding the file each time, because details like the play count are kept intact and the file itself is not modified to store this information).

The second technical difference is that WMP unfortunately doesn't support the AAC music format. That sucks because I rip most of my music as AAC, since it's an MPEG standard format. I expected that any decent music player would support it, but sadly not WMP. You can use third-party tools to add AAC support to WMP (meta-data support and codecs) but it's not perfect: the progress slider doesn't work for AAC files. (these codecs might fix the problem but it's commercial software) By the way, I don't think you can simplify the comparison to WMP = MP3 + WMA formats, and iTunes = MP3 + AAC formats, since a) iTunes can import WMA files by converting them, and b) AAC is standard and WMA is proprietary.

User interface
Using iTunes as a baseline, there are some positives and negatives to WMP's user interface.
WMP doesn't have iTunes' 3-pane browser that sorts by genre, artist, and album simultaneously. That means you have to flip between different screens to browse by those different categories. That might not be such a nuisance, except that each time you change screen, it resets your location in all the others, so you have to scroll down through your entire library to get back to where you were each time. It also resets the column by which you've sorted that category, which is really annoying. As a plus, though, WMP allows you to navigate the library in many more ways than iTunes (which would be nice, if only it remembered my preferences! grrr...)

Playlist management likewise has its ups and downs. Instead of Party Shuffle, WMP has Now Playing, which works slightly differently. Everything you play automatically goes through Now Playing - generally every song that's currently showing in the pane you double-click in is added to Now Playing, as opposed to iTunes playing either the library or a playlist or Party Shuffle. That's pretty neat, because you can browse to an album, or do a text search, double click a song and all of those will go into Now Playing and be saved there, even if you then browse away or do a different text search. Another neat feature in WMP is the playlist pane, which can be set to show either a playlist or Now Playing, and sits to the right of the main view. That makes it easy to drag music over to queue it up or reorganise the play order, without leaving the main library view. The downside of WMP's playlist management is that I can't find any way to mimic iTunes' Party Shuffle ability to automatically and randomly draw a certain number of songs from a specified playlist. In WMP you have to manually make sure there's always music queued up.

Performance
Ordinarily performance in programs like these, running on modern computers, shouldn't matter. Unfortunately, the Windows port of iTunes 6 was slow, and iTunes 7 is just terrible. Browsing WMP, in comparison, feels like casting off shackles and breathing freely once more.

Overall
I'll still use iTunes, however that's mainly due to where WMP foolishly stumbles rather than to where iTunes shines. WMP's inability to remember my viewing preferences and poor handling of AAC is terrible. Maybe in the next version WMP will come out ahead.

Friday, 15 December 2006

Writing God

This is how I've been feeling lately :D
I want to use that comic strip in my thesis instead of those pretentious quotes. Hey, no-one ever accused me of being high-brow :P
I wonder if Jorge Cham would let me... can't hurt asking!

Monday, 25 September 2006

Jabber + Forums = ?

Recently a group of friends took a step backwards to IRC for group chat, since Jabber wasn't acceptable for some reason (not entirely sure why, I was away at the time. Hmm, it was sort of like a coup actually :p ). Anyway, as I was just chatting to Brett about newsgroups, it got me thinking.

Newsgroups and IRC are relics of a bygone age of the Internet. They persist by sheer weight of inertia (also largely, and interestingly, to support filesharing).

Take IRC for example. Once the technology for synchronous chat, it has been all but eclipsed by proprietary instant messaging (IM) networks such as AIM and MSN. IRC, for all its archaic shortcomings, has some advantages over IM: it's open (in the sense that no single company controls the relay servers), and it supports persistent chat rooms (that a person can actively join, rather than having to passivley be invited).
Enter Jabber. Jabber is an open protocol for instant messaging, and has all the advantages of IM (registered usernames, public profiles, contact lists, slick user-friendly interfaces) along with all the advantages of IRC (open distributed network, persistent chat rooms). By merit, it should dominate both IM and IRC. Whether it can compete with giants like AOL and Microsoft remains to be seen, though at least it has Google's weight behind it.

Now, it occurred to me that IRC and IM are roughly analogous to newsgroups and forums. Newsgroups are an open, distributed network with the same archaic shortcomings as IRC: kludgy interfaces and lack of user presence. Forums are proprietary communities with the same modern conveniences as IM: registered usernames, public profiles, slick interfaces loaded with features.
Given the similarities between IRC:IM and newsgroups:forums, why not try a Jabber-style solution to the shortcomings of newsgroups and forums?

A Jabber-style forum network would have the following properties:
  1. The protocol would be standard and the network would be open for any server to join.
  2. A user would have an account on any server, and would be identified by their username and server domain, for example nick@cqu.edu.au . Usernames are unique within a domain, but can be reused on different domains (like email and Jabber). The server would also host the user's public profile (XML of course) including global avatar and global sig.
  3. Individual forums would be hosted on specific servers. For example, bonsai-forum@geeklane.com . In general, users from any server could participate in any forum. Every forum would have its own configuration though, including moderators, banned users, posting and reading restrictions, etc. The forum server could optionally host a local profile, avatar, and sig that would replace the user's global settings, for that forum.
  4. Users would log in to their server. They could then access remote forums through a gateway web interface or a local client, or their server could authenticate them with the remote forum's server to allow the use of custom forum interfaces.
  5. I'm unsure if usenet-style flooding (propagation of messages from one server to another) could be used to increase robustness of the forum network, or if this would be incompatible with the strict post ordering expected from forums.
  6. It should also be possible to migrate existing web forums to this network; it's just that initially users would have lots of different accounts (one from each forum) to access the network through.
Imagine an open network of interoperable forums. Use one account to post to all forums. Find your friends easily on other forums. Carry over your status from one forum to another (co-operating forums only, of course). Everything would be XML, allowing the user their choice of interfaces. The network would ideally interoperate with Jabber for instant-messaging.

I reckon it's a good idea. I doubt it'll ever happen though; too much inertia in current forums. And there are probably problems with the idea I haven't thought of :)

Friday, 18 August 2006

Crouching Tiger vs. Hero vs. House of Flying Daggers

I think it's because I finally got around to copying my chinese music from home to work, and I'm sitting here late at night and my mind is starting to wander away from my work and towards the music playing in the background, that I thought of this and felt like writing it.

I think most people would agree that Crouching Tiger, Hidden Dragon, the Western success of which probably paved the way for Hero and House of Flying Daggers, is the best movie of the three. There are many reasons for this, but one in particular occurred to me as I was listening to the soundtracks just now.
Whilst all three are fantasies, Crouching Tiger's fantasies weave in and out of everyday reality, whereas Hero's and House of Flying Daggers' fantasies float in some inaccessible place above everyday reality. Crouching Tiger is more grounded, in story, sets, and music. I think that connection to the audience's experience makes its (comparatively) restrained fantasies all the more special in comparison.

Yeah, this blog post was brought to you by the power of procrastination. :) ... Hmm, I wonder what Jet Li's Fearless is going to be like.

Wednesday, 21 June 2006

Radio Paradise and Interpol

A little while back I came across a great internet radio station, called Radio Paradise. It plays a blend of classics and contemporary songs, just perfect for when I don't know what I want to listen to. It also has a discussion thread for every song that's played, which is very easy to waste time on.

Anyway, I heard Slow Hands, by Interpol, the other day, and was immediately caught by the repetitive groove. Since then I've been listening to Thomas's Interpol albums (particularly Antics), and loving the sound: the almost disdainful droning vocals over spare but unrelenting grooves. My new favourite band of the moment :)
And damn me if Carlos Dengler's image doesn't fit that coolly aloof sound. Sure, the guy looks like a poser, but he does look good doing it. Makes me wish I'd learnt to play so I could be a rock star too. Hmm, only four strings, can't be that hard... :P

Wednesday, 23 November 2005

Go Noob

Melanie and I tried playing Go again on Monday night. It's fun learning a new game - especially since both of us are noobs. It's fun trying to guess what might work and what won't.
Sure, there are lots of Go resources on the web, and one day I'll probably read them, but for now I think it's more satisfying trying to discover ideas on my own. Last game we only just began to come up with some ways of thinking about Go.
Melanie is good at multitasking. For example, picking moves that furthered multiple aims at once - killing two birds with one stone. She would place a stone that would both strengthen a structure under threat and block my expansion. She was also good at abandoning her structures when appropriate and moving her efforts elsewhere, whereas I would stubbornly pursue one objective at a time.
Melanie often surprised me by reacting agressively to threats to her stones, when I had just assumed that she would react defensively (which is what I would have done). Rather than strengthening one of her structures, she would leave it endangered and threaten my stones instead, forcing me to respond to her counter attack. Of course, what she was doing was just as certain to save her structure as trying to escape, because if I continued to pursue her structure, she would simply capture the very stones I was using to capture hers!
For myself, I realised that often you don't need to complete a structure for it to be useful. All you need is the capability to complete it regardless of what your opponent does. You gain some moves by not having to explicitly fill in the empty spaces. The caveat is that your opponent has a way of forcing you to make those moves at a time of her choosing, which she can then plan.
In the end, we discovered some "invincible structures" that can never be captured. These are single structures that enclose two or more empty spaces. The empty spaces provide liberties that can never be taken away from the invincible structure, ensuring its survival even in the face of complete encirclement. The smallest invincible structures we found were two 11-stone structures (and multiple isomorphs of those two).

It's fun being a noob. I think we forget that too often :)

Wednesday, 16 November 2005

Movies and Music

I've been making a point of watching some movies lately. Still not many, but more than usual for me :)

I picked out Dear Frankie because it sounded quaint, and Young Adam because it starred Ewan McGregor. Coincidentally both movies were set around Glasgow, and both movies also starred Emily Mortimer, an actress I hadn't heard of before but who I thought was captivatingly good. I really liked both movies.

I finally saw War of the Worlds with Sarah. For a big-budget Hollywood movie it showed remarkable restraint from heroics (except for the grenade scene, but even that was good) and I thought it was very well done. I hated the sickeningly sentimental reappearance of the presumed-dead son, Robbie, at the very end, but I just pretend that scene didn't happen :D

Eternal Sunshine of the Spotless Mind is a brilliant movie. I love it. I think Jim Carrey does great dramatic work, like this and The Majestic. But ESotSM, in particular, was excellent - great idea, great storytelling, great acting, and great music. As an aside, the main character, Joel, actually reminded me a lot of Damien.

Also loved Secretary. It's such an incongruously charming love story amongst the BDSM trappings. On the strength of the final song, Chariots Rising by Lizzie West, I've ordered the soundtrack. Apparently it's no longer actively released, and only a few copies are available second-hand from Amazon or eBay. There's nothing at all in Australia... but I found a record company specialising in rare imports and second-hand music, based in Sydney. They're bringing it in for me, from somewhere.
I'm a sucker for this sort of thing. I hate the idea that any music (well, any music that I like) could be lost, forgotten in someone's attic or broken and irrepairable. There's so much good stuff out there, I wish I could keep it safely archived for all eternity.

Gave in and bought House of Flying Daggers for the same reason :p

Thursday, 11 August 2005

Nick's Public Interface, a Service to the Community

A couple of weeks back there was a new face at Kendo. I introduced myself, and he asked "Oh, are you Brett's mate?" Afterwards, I enquired how he knew that. It turns out, by coincidence, that he was searching for "kendo" and "Rockhampton" in google, came up with my blog, saw that I played Selbunster on World of Warcraft, thought "hmm... that's familiar", and asked his friend Trevor where he knew the name from. The guy was Tony, aka Dhaosneth, a friend of Trevor who's a friend of Brett. So I thought it was pretty cool that someone had come to Kendo through my blog, and we happened to know each other online!

Now just today I've had an anonymous comment left on my blog, on a post I made earlier this year about sunglasses, saying that they'd been searching for Zenith sunglasses and came across my post, and wanted to know where one can buy Zenith sunglasses.

Now the curious thing is, I can't find my blog on google if I try to (yes, I give it a try now and then; I'm vain remember? :p ), and here are two people recently who have come across it by accident.

So, to the person who left a comment, my answer is: I can't find info online either, but they're a popular brand (in Australia), and you should be able to find them in any sunglasses store such as Bright Eyes.

And... can you tell me what search terms you used to find my blog so I can as well? :D :p

Monday, 8 August 2005

Nick is... vain? :p

From Melanie's blog:
Google "[your name] is", with quotes. Share the results!

Oooh Nick is coming to town!
Nick is one in a million!
Nick is knowledgeable and conversant.
Nick is not One Of Us. Nick is one of the Good Aliens from that planet where everybody has style and grace.
Nick is God! Nick is God!
Nick is disgusted by the moral decay that he witnesses.
Nick is a fearless and independent voice.
Nick is always calm, cool, and collected.
Nick is the greatest person I have ever met.
and finally
Nick is really stupid.
Nick is arrogant as well.
:p

Friday, 5 August 2005

Savings

I'm trying to figure out why Westpac's "Max-i Direct personal" savings account is so good. Not that I'm complaining, I just don't understand. Essentially it's a holding place for my money that attracts a high interest rate and has no fees, and the only way to interact with it is to move money to or from it using online banking. That's only a small hassle though; there's no penalty for moving money back and forth as many times as you like.

The thing is, the interest rate is really high! I can't figure out why you'd put your money anywhere else, even a long-term deposit account. Some figures: The interest rate was recently 5.5%, it's just gone down to 5.25%, but it has a guaranteed lower limit of 5.0%
Compare that to the cash management account, which tops out at 4.8% for amounts over $500,000, or term-deposit accounts, which only approach that figure for amounts over $10,000 invested for 2 years!
Interest rates are similar elsewhere, for example ANZ and Commonwealth.

I just can't figure out why even at the same bank you would use anything else, and I can't find anything like this at other banks :S

Disclaimer: No, I am not employed by Westpac :p

Thursday, 28 July 2005

Nick's Double Coconut Lamingtons!

Ok, so I didn't innovate all that much, but I'm proud of using coconut cream in the icing to make them double-coconut (and lactose-free) lamingtons! (and I wanted to name it after myself :p)
I made this batch for Tanya, but let Sarah go down in history as the first person ever to try Nick's Double Coconut Lamingtons!
I reckon they turned out pretty darn delicious for a first effort :D

So, without further ado:

Nick’s Gluten- and Lactose-free Double Coconut Lamingtons


Sponge Cake
  • 4 eggs
  • 1/2 to 3/4 cup caster sugar
  • 1 cup cornflour
  • 1 tsp baking powder
  • 2 tbsp custard powder
  1. Preheat oven to 180C.
  2. Split the egg whites and yolks. Beat whites until stiff, then add yolks and beat until thick and creamy.
  3. Beat in the caster sugar gradually.
  4. Sift the cornflour, baking powder, and custard powder three times, then sift into the egg mixture. Fold through without delay but gently.
  5. Spread the mixture into a baking tin. Pick the tin up and drop it back onto the bench from about 10-20cm a couple of times to get large air bubbles out.
  6. Bake for 30-40 minutes (until a knife comes out clean).
  7. Stand for 5-10 minutes before turning out onto a wire rack to cool.
  8. Refrigerate overnight before slicing into lamingtons.
While baking the sponge cake will rise lots, but it collapses back down afterwards. Apparently no flour is quite as good as wheat flour at making fluffy cakes. It makes a slightly denser than usual sponge cake, but still delicious and adequate for the task at hand!

Lamington Icing
  • 1/3 cup cocoa
  • 4 cups icing sugar (be careful, icing mix has wheat in it)
  • 1 tbsp butter (or margarine for non-dairy)
  • 2/3 cup coconut cream
  • 2+ cups desiccated coconut
  1. Mix cocoa and icing sugar.
  2. Melt butter in the coconut cream in a pan.
  3. Stir in the cocoa and icing sugar over a low heat.
It's much easier to coat the lamingtons when the chocolate icing is warm. I managed to do a batch before the icing cooled too much.

Lamingtons!
  1. Cut off the crusts to the sponge cake and cut it into squares.
  2. Set out the icing in one bowl, the coconut in another (wide) bowl, and a tray with baking paper to set the lamingtons on. Using two forks, dip a sponge square first in the chocolate icing and turn it to coat it evenly. Then quickly put it into the coconut and turn it over. Finally set it onto the baking paper.
  3. When all are done, refrigerate in an airtight container to set the chocolate icing.