A little different

Everdien Breken MaHKU essay memory gameThere was a bug in my memory-game-cum-essay that really bothered me. The counter for the number of pairs that were found counted faster – sometimes – than the real number of pairs being found. This did not happen all the time, but at unexpected and unexplainable moments.

This really bugged me. I played the game over and over and over again to try and pinpoint the moment when things would start to go wrong. Yesterday I found it: it happened when one had just found a pair and went on clicking on another card very quickly. At a sedate pace, nothing untoward happened, but very quick or impatient fingers made this happen. Which also explained why it happened more often at the end of the game than in the beginning, which I had noticed but could not make heads or tails of.

So I had to come up with a way to arrest browser activity when a third (fourth, fifth) click happened while my program was still dealing with the first two klicks. Not difficult to change the code to do something at the third click, just a question of adding a third ‘if’ in my ‘else if’ statement. Arresting browser activity was more difficult.

I checked the ‘net for bright ideas, and there happened to be one! A clever soul was using the [date, time] system variable, he or she made a snippet of code that tells the browser to do nothing for xxxx milliseconds after the time the third click happens. Voila! my solution! And many thanks to C. Peter Chen in March of DevNotes.

I was so happy to have fixed this bug  – if I hand in my essay-cum-game it needs to be bug-free.

I did a lot of writing too, last week I was in flow. Also took out the name cards of the three artists that I want to discuss (Basbaum, Holler and Zaccagnini) and replaced them with text cards. Texts that are quotes by the artists. Basbaum of course got ‘Me x You Games’, Holler is in to  ‘Spreading Doubt’ and Zaccagnini‘s work is  ‘Made for the Curious”. Very apt, no? The essay- game became just that  little more difficult to play: names are easier to remember. I noticed this from playing the game often;   Tiong signalled this also.

I like it that the game became a little more difficult. I love it’ s beeing an archipelago of thoughts and quotes that can be navigated only through play.

Now all I need do is make the thing run in Firefox. It works in Safari, IE and Chrome, so this is not a type A category problem, but I’d still want to make it run on Firefox, too. Why did these different browsers decide to handle HTML a little different? I hate a little different.