Archive for the ‘Programming’ Category

A simple NSOpenGLView starting point

Thursday, September 18th, 2008

So I had this idea I wanted to try out quick today, but it involved setting up a simple 3D environment. It has been well over a year since I’ve worked with OpenGL, so naturally I had all sorts of troubles even getting started. I ended up spending most of the time I wanted to spend playing with my original idea building the simple test app to use as a base for it. Sigh. Maybe I’m just dumb - but I hate having all this boilerplate to do something that, in my mind, should be easy. :)

Anyway, after way too much messing around and guidance from Greg, I got a very simple (I think) shell of an app for using NSOpenGLView that should be easy to duplicate and then mess with whenever I get the inclination to play with 3D again. I decided to package it up and stick it online so perhaps others who just want an ultra-simple starting point can find it and use it and save themselves some time.

KVO++?

Monday, September 15th, 2008

I think it could be useful to have a shortcut added to Objective-C which combines a keyword value observer relationship with an automatic assignment on value change.

It could be noted syntactically using a new assignment operator (=> in my example below):

SomeObject *foo = [SomeObject new];
AnotherObject *bar = [AnotherObject new];
bar.property => foo.changingProperty;

The goal would be to build an automatic connection such that whenever the value of “changingProperty” is modified for object “foo”, object “bar” gets a message equivalent to: [bar setProperty:foo.changingProperty].

This is, of course, not without potential difficulties. For example, a deeper property reference would mean more cases to automatically observe:

bar.property => foo.changingProperty.anotherProperty;

In that case, there should probably be two observers - one for foo.changingProperty and another for (obj).anotherProperty. If “changingProperty” modifies it’s value, then the new resulting value object needs to be observed for changes to it’s “anotherProperty” property, and finally the original assignment to bar.property would be re-issued with the new value.

(Note: Not saying my assignment operator is awesome.. it was just something to use in an example. :))

OMFG… iPhone SDK

Thursday, March 6th, 2008

Wow. Holy cow. Best. Apple Event. Ever. :)

Welcome To The PigSocial

Monday, February 4th, 2008

PigShooter for the iPhone/iPod got some love over the weekend. It’s now semi-social! When you start playing you can enter your name. As you finish off waves of incoming ships, your time is uploaded and compared with the other people who have played recently. It’s pretty neat and largely a proof of concept of the idea of a single player social game. It’s pretty fun to know you’re not always alone - even when shooting pigs at spaceships out of a UFO in outer-space while playing a game you can’t lose…