Archive for May, 2004

No religion

It’s tough being an atheist. You have to tip-toe around other peoples beliefs and pretend you think it’s fine for everyone to believe whatever they like, even though you privately worry that religion will bring more death and destruction to the world than all the [other] human vices combined. But no one tip-toes around an atheist’s beliefs, because of course, we have none!

I think the big monothiest religions all feature some powerful story where a prophet/messiah loses his temper and goes on an idol smashing rampage, condemning worshippers for their primitive superstitions. Unfortunately, in each case the clumsy old idols are simply replaced with smarter streamlined ones [albeit not necessarily in graven form].

Do we humans really have such a big belief hole in our brain that the moment we remove one thing from it we must replace it with another…? If you’re thinking at this point that you respect my right to an opinion but don’t see it as appropriate material for this blog, consider the following incident from my childhood:

When I was nine years old I started third grade at a new school, which was scary and intimidating as these things generally are. It was a state school. Shortly after arriving I learned that we would be having this thing called Scripture, where people would divide up and talk about the bible. To ensure that I was put into the right group, I was asked by a teacher what religion I was.

I was mortified. I had absolutely no idea. "I don’t know," I said, starting to cry. Fortunately, my older sister went to the same school, so with a little help I managed to find her and ask [hot with shame] what religion I was. She kindly informed me that we were Church of England. And although I had no idea what this meant, simply knowing it made me feel much better, because at least I knew where I belonged.

Luckily, C of E is one of the laziest of the Christian sects, so I was later able to escape its feeble clutches. Anyway, the point of that story is that until the age of nine I had not given religion a serious thought, and my tiny soul had not once been troubled by the fear of God. Then suddenly I cared, because someone acted like it was important, and suddenly I felt that if I didn’t belong to one of the accepted religions that I must be a bad, worthless person.

So why was there no one to say: "Hey, it’s OK kid, you don’t have to believe in God"? It’s not because atheists didn’t exist 20 years ago. It’s because atheists respectfully stand back and get ignored, for fear of upsetting the believers. And in return, we get no recognition, no appreciation.

So anyway, when belief is the status quo, isn’t it only fair that we should pop our heads up occasionally and say: "I am an atheist you know"

Making Retro Games

As should be obvious from Drivey, my latest pet project [currently languishing], I am fairly interested in exploring simple alternatives to the big-budget ultra-real 3D games out there at the moment, for reasons both aesthetic and pragmatic.

You can look around the net and find loads of people doing cool retro games, but I worry that an enormous amount of talent is being spent on recreating old games rather than coming up with new ones. If you brought a 1984 game designer/programmer forward in time and showed him Pacman running in Flash – on a web page, in a browser, on a 32-bit 1280 x 1024 desktop – I think that after he finished gawping and picked his jaw up off the floor, he would ask you why the hell you were playing a game like Pacman on a machine which is clearly capable of doing a thousand times more.

My feeling is that while recreating a game from 20 years ago is an interesting exercise, isn’t it perhaps more interesting to wonder what 1984 guy might come up with if presented with a P4 running at 3GHz on a 1280×1024 monitor? Even with all that pixel-pumping power I’ll bet you wouldn’t see much in the way of photorealism, since the graphics and animation we see in games today are the culmination of the evolution of a whole set of disciplines – both technical and creative – which simply weren’t around back then.

So, maybe that’s what Drivey’s really about: I’m trying to be smalltime 1984 guy with 2004 hardware, and I’m trying to pretend I’ve never heard of texture mapping. And maybe not hardware acceleration either… [showing hardware accelerated 3D to 1984 guy could make his eyeballs explode]

I want to make it clear that I am glad that people take the time to faithfully recreate classic games [some nice recreations of classics can be found here, including Flash source code if you’re keen], but there can be something of the collector’s fetish about it, such that a crappy looking 2D game where a ship slides back and forth blasting aliens out of the sky suddenly becomes worthwhile if it happens to look exactly like Space Invaders .

Slightly more interesting to me is the much more hardcore idea of creating a new game which will actually run on an old system. A challenge I definitely have not the mettle for. This article describes the activities of the Atari 2600 Homebrew community, and features an original 2600 game called Qb, written by Andrew, an old workmate of mine who I hope is still having fun with this stuff.

On a final note, something else has occurred to me as I write this overlong entry, and that is that the framing of a game experience is just as important as the game itself. Playing old games on modern computers almost always involves either running a conspicuous emulator or playing in a small window on a cutesy webpage. As a player this extra padding between the game and the rest of your computer is reminding you: "this is some cute old game, which you are playing for nostalgia or kitsch value" . If MAME would let me do drag a shortcut to the desktop and launch Elevator Action as easily as I might launch any other game, I would play it more frequently than just about anything else I’ve got installed.

So my advice to retro game programmers is: Make it easy to launch stand-alone, and make it run full screen, so at least we’ll be seeing it as originally intended.

Less whining

Since my last post was a little on the complain-y side, I figure I should balance it by writing briefly about some things that I like, in [descending] order of how much I currently like them:

  1. Eternal Sunshine of the Spotless Mind – I have seen it twice now, something I rarely do these days [what with being so incredibly busy and all], and I have decided it is the best movie I have seen for a very long time. It’s one of those rare movies that really sticks with me, so that I still find myself smiling at moments from it, even a week later. And whilst it is certainly extremely clever, it is also unbelievably full of heart. I can only hope that Michel Gondry and Charlie Kaufman will work together in the future, because they both bring such wonderful things into the world. [I recommend downloading this music video for the song Light & Day which uses spookily lip-synced scenes from the movie]
  2. Ah… there must be something else I like, besides a movie… ummm… [I should point out here that I’m only listing things outside of my personal life, so that obviously cuts out a few things]
  3. Baths! I like baths! Probably because we don’t have a bathtub and it gets very cold in my house. I like the idea of a bath, but I haven’t had one in years!
  4. Bloglines! It helps me waste time reading blogs more efficiently.

Not the best list is it…I thought I would come up with more than that. Oh hey, I forgot to add programming to the list.

Hmmm.

Pull yer socks up, Aunty!

This is probably a little provincial for a weblog, but I’d just like to bitch a little about a certain Australian TV show called The New Inventors [8PM Wednesdays on ABC] It sucks balls!

James O’Loghlin [the host] is an annoying git who spends too much time trying to come up with something funny to say, and not enough listening to nervous people attempting to describe their life’s work in a few sentences.

Not only that, but on tonight’s episode the three judges each selected a different invention as their favourite, prompting our host to embarrassingly suggest that each of the inventors have another go at selling their ideas, and thereby attempt to get one of the judges to change their mind [so as to avoid this utterly unforseeable dead-heat].

And one of them did.

So one of the inventions which had for a fleeting moment been considered equal best, suddenly became the loser. If I were that inventor, I would be mightily pissed off.

The low art of Comedy

I once read something by Douglas Adams about how he realized his attitude toward comedy had changed when he watched a standup routine based on scientists [and their wacky theories perhaps]. Douglas noticed that he had infinitely more respect for the scientist’s work than for the comedian’s wilful misunderstanding of it, and so found himself unable to apprehend what was so damn funny. I can really relate to this feeling. [if I could find the actual text/quote I would post it, but it eludes me for now]

The point I am trying to make here is not that comedy is bad, rather that humour is better when it embraces its subject, instead of simply ridiculing it.

Also on the subject of DNA, my friend Richard recently stumbled upon this forgotten page , featuring a portrait of Douglas with daughter Polly, as well as a couple of quicktime videos. It’s strangely poignant to encounter such artefacts, some three years after his unexpected death.

Blogging Tools

This site is published using my own bastard software, and sometimes I regret this fact ;) It’s buggy and crummy [the software that is], and gets less releasable everytime I add a band-aid fix. It was never intended to handle a whole site, it just ended up that way, and everytime I’ve given it to a friend to try out it has crashed immediately, much to my chagrin.

There are much better ways to publish a blog, and most people are pr0bably already aware of the two main options, Movable Type and Blogger . But last time I checked MT looked too scary for the average human to install, and Blogger was just a bit crummy, relying on updating your blog via the blogger site and interface.

Anyhow, I thought I’d just mention a third viable option, which I recently checked out and was very impressed by. It’s called WordPress, and is a host-it-yourself PHP solution. The install was pretty much as simple as the readme said, and feature-wise it seems to support all the standard bloggy functionality. A test blog took me less than an hour to setup [and most of that was spent configuring personal options]. You just need to have MySQL and PHP installed on your web server, and you’re in business.

I’ll probably stick with my own software for now, because conversion would be a major pain, and I really prefer a WYSIWYG editor, but if I was starting from scratch I wouldn’t hesitate to use WordPress.

UPDATE: Another reason you might not want to dive into Movable Type right at this moment is that it has recently pissed off a bunch of users by changing its licensing. Ben [an MT user] has some interesting thoughts on this reaction. Mark Pilgrim went so far as to convert his site from MT to WordPress, dramatically summing up his decision:

It′s not about who has a right to make a living (everyone does); it′s not about how nice Ben and Mena are (I′ve met them, they are very nice); and it′s certainly not about eating. I′ve taken the $535 that Movable Type would have cost me, and I′ve donated it to the WordPress developers.

It′s not about money; it′s about freedom.

__________

UPDATE (2005): I did eventually convert to WordPress, and have been generally very pleased with it.

Footprints in the Sand

Most people have probably heard a variant of a story by Mary Stevenson [?] that goes something like this:

One night I dreamed I was walking along the beach with the Lord.

Many scenes from my life flashed across the sky. In each scene I noticed footprints in the sand.

Sometimes there were two sets of footprints. Other times there were one set of footprints. This bothered me because I noticed that during the low periods of my life when I was suffering from anguish, sorrow, or defeat, I could see only one set of footprints,

So I said to the Lord, "You promised me, Lord, that if I followed You, You would walk with me always. But I noticed that during the most trying periods of my life there have only been one set of prints in the sand.

"Why, When I have needed You most, You have not been there for me?"

The Lord replied, "The times when you have seen only one set of footprints is when I carried you."

It’s a very nice story, and it gives me a warm fuzzy feeling at the end. It has been reproduced for decades with minor variations, on calendars and memorials, but the essence remains the same.

Here’s another story, which I hope you will also find at least a little bit inspirational:

One night I dreamed I was walking along the beach with my childhood friend.

Many scenes from my life flashed across the sky, and not all of them pleasant. I was very glad that my friend had always been there to support me during my times of sorrow, anguish and defeat.

When the last scene had flashed by, I looked back, and to my surprise I saw that there was only one set of footprints behind us.

So I said to my friend, "I thought you were always by my side, especially during the trying times. How can it be that there is only one set of prints in the sand?"

My friend replied, "The answer to that is simple: I am merely a figment in your mind, and was never really there. It was you alone who triumphed over adversity, and rose above defeat. As a child you created me, to comfort your many fears. But now that you are an adult, it is time to let go, because you no longer need me."

And then I was alone, and to my surprise I was not afraid.

Please note it is NOT my intention to mock the original. To the contrary, I am appropriating the powerful imagery of the original to communicate a different point.

My other intent is to illustrate that a story’s power should not be confused with its TRUTH. Only by careful evaluation can real truth be established, and anyone who tells you otherwise is trying to sell you something.

ClearTyping an Image

Since getting an LCD monitor and enabling ClearType in WindowsXP I find it very easy to spot the difference between "real" text [rendered by the Windows GDI] and bitmapped text [eg text photoshopped into bitmap banners]. Bitmapped text appears more pixellated now, because it does not take advantage of the resolution enhancement offered by ClearType. [to understand more about ClearType and LCD screens, read this previous entry ]

With the following images I attempt to illustrate the extra horizontal resolution available when designing images to be viewed on an LCD screen [or any flat panel that uses discrete addressible RGB sub pixels]. Both images were created from this original. If you have an LCD, look closely and you should see that near vertical lines are smoother and crisper in the second image. If you are viewing this on a regular CRT, the images will [hopefully] look very similar.

The first picture was down-sampled as normal [to 1/3 original size], whereas the second was pre-processed first. The pre-processing steps are fairly simple:

  1. Split the image into Red, Green and Blue channels
  2. Offset the Red channel one pixel to the right
  3. Offset the Blue channel one pixel to the left
  4. Recombine the channels into a single image
  5. Down-sample to 1/3 original size

Note that it is no coincidence that 1/3 is the ratio used for down-sampling… we are effectively addressing individual thirds of the final product. If 1/6 was the desired ratio, then the red and blue channels would need to be adjusted by two pixels instead of one.

Of course, at this point I should probably admit that the technique as described is just a tad simplistic and does not cover the problem of color-fringing, which occurs around fine sharp lines. Fringing can be alleviated somewhat by performing an additional filtering operation before downsampling. The image on the right has had this additional step performed. The logic behind this step is tricky to explain [and this entry is too long already, as usual] so I recommend reading more about it at Steve Gibsons’s site .

So, by now you may be asking yourself: Why go to all that trouble for a tiny improvement that will only be seen on a small percentage of screens? Luckily, I just thought of an answer: Software needs to down-sample images all the time [for viewing], why not build this technique into such software directly? That way, an image viewer/browser could check the monitor type and apply appropriate adjustments to get the sharpest possible image on screen.

Well, I think it’s worth trying anyway…

Where’s Drivey?

Same old screenshotI’ve written up a bit of background info on Drivey, in a hopeful attempt to get myself thinking about it again. It is not as though I have to be working full time on it, I just think a few hours here and there and I could create a very cute and interesting product.

Unfortunately Drivey is stalled mid-conversion to C++, which is not a very good place to be stalled. It means that every time I think of a cute idea to try, I get discouraged by the fact that the new C++ version is not up to speed yet, and I don’t want to add any more to the old [JujuScript] version.

The main reason for this stalling [in my case] is that C++ is very very boring and requires so much plumbing to be laid just to achieve a basic result. As a language it’s really beginning to show its age, and as ordinary computers get ridiculously fast its compiled speed advantage is looking less relevant, no longer making up for the lack of developer friendliness. [The other reason is that reimplementing something can be really dull when you just want to try new ideas.]

Mayhaps it’s time for me to dive into the world of C#. Mayhaps… but err yuk MS.NET and all that…

UPDATE: Drivey is already number 2 on Google! Yay!

Maybe I Shouldn’t Be a Writer…

… after reading this list of hackneyed story ideas which are too frequently received by [speculative fiction magazine] Strange Horizons. A few too many of these have appeared in my very own notebooks.

A sample of what they are not particularly impressed by:

  1. In the end, it turns out it was all in virtual reality.
  2. In the end, it turns out the protagonist is insane.
  3. In the end, it turns out the protagonist is writing a novel and the events we’ve seen are part of the novel.

Well, that’s me out!

Thirty-Something Nerd’s Delight

Is the best description I can think of for this excellent Flash animation + song, accurately described as "Cheerful Nostalgia, ZX Spectrum style"

The b3ta site also has loads of other great stuff, much of which is quite rude [but funny]. If you don’t mind being utterly grossed out by tales of scatological misadventure you might like to check out Shit Stories, which is exactly what it sounds like.

The XOR operation, and how its improper application can annoy PhotoShop users

When a graphics program needs to display a marquee [selection rectangle], it commonly does so by performing a XOR operation on the underlying pixel values, so as to ensure that the marquee is never the same color as the background it obscures. Using XOR also means that in order to erase the marquee again, you need only draw it a second time (a convenience exploited since the early days of raster graphics).

The problem is, everyone [dopey programmers like m’self] tends to assume that 255 is the best number to use when doing the XOR operation, since XORing any 8-bit number with 255 [binary 11111111] will result in every binary digit of the original being flipped. Surely you can’t get more different than that, right?

Wrong! Sure, white becomes black and black becomes white, but what about grey?

Grey becomes grey. Well, almost. 50% grey is usually represented by color levels of 128 [binary 10000000], and if you XOR 255 with 128 you get 127 [binary 01111111]. That’s only one unit of difference! [the closest two levels can get without actually being the same]

The problem is clearly illustrated by the image above, with the outer dashed line being PhotoShop’s selection marquee* and the inner solid line being IrfanView’s. Both virtually disappear in the mid grey region, making it extremely difficult to accurately select things.

The funny thing is, this problem can be very easily avoided , without having to ditch the convenience of the XOR operation. All you have to do is flip only the high bit ! [That is, instead of XORing with 255, use 128] This way, 0 becomes 128, 127 becomes 255, 64 becomes 192… etc. Every color will be transformed to a color with a brightness level exactly 128 levels apart, so a XORed marquee or brush-shape will always contrast with its background [and it’s still just as reversible].

As simple as this solution is, none of the bitmap editing programs that I know of use it. They all needlessly suffer from this strange disappearing marquee/brush shape problem. Isn’t that weird?

* UPDATE, March 2014 : Photoshop CC no longer does this, and appears to use an approach closer to the one I describe. IrfanView still has the problem though.