Monday, September 26, 2005

Ooh! We are where the flies are...

Cocoa is not designed for programmatically generating dialogues. It fact it makes life really awkward. Cocoa co-ordinates are based on a bottom left origin, like a graph. This means that you have to work out how big your dialogue is in advance, so you have to work out were the first (i.e. top) control has to go.

Another example is the button, what does a OSX button look like. It that lozenge shape thing right, well no, a plain default NSButton is a bezelled rectangle like everyone else. There's an example from postGenesis, the Cancel button is a default NSButton, The OK button has had the message setBezelStyle sent to it to make it a 'proper' OSX button.

Now, I'm a bit old fashioned, I like to at least know how to build a dialogue from scratch. I never used a GUI designer in BeOS, I made sure I could do it in VB (a work thing), but with no real documentation silly little things like this just make it plain awkward.

Sunday, September 11, 2005

Do the manta ray...

My web hosting company as just moved my server to a new hosting company.
They didn't move the website though, so the weblog has been republished :-)

planetGenesis has seen some loving recently. There are three new combiners
due to hit CVS any day now, to go with a big optimisation for Worley based noises
(10% faster) and a very small Perlin optimisation (1% faster, you might notice it :-)

The new functions allow you to replace one of the noise co-ordinates with
noise, so instead of noise based on x,y,z co-ordinates, it could be based on
x, perlin(x,y,z), z. Not really useful for planets, but landscapes where the
y co-ordinate is always the same values you can start to mix things up
a bit. It you feed the same Perlin noise in both inputs you can get some
lovely height fields, here a quick example.

small heightfield image

The idea came from my top secret project postGenesis, oops.