Exams over, for now

24 05 2007

Yippee, that’s the 3rd year exams out of the way. I think I did okay, so hopefully I won’t have to resit anything later on this year.

For some reason, the uni decided to cram two semesters worth of revision and exams inside a few weeks. What an ordeal it’s been. I had a couple of nasty weeks with several exams in consecutive days. Some of my uni buds had it even worse, with more than one exam per day.

With the System Design Project being such an overambitious nightmare this time round, getting revision in early hasn’t been an option.

Why did I go back to uni again? Oh yes, for that bit of paper that qualifies me less than the experience I already have…

We’re getting taught so many disparate topics that a decent grounding in any of them is impossible. More importantly for the games industry though, is that we don’t get taught C++ at all. Additionally, any whiff of C has just been in passing at the arse end of a module.

Seriously, if you’re a boss, you need to set up a graduate training programme if you expect your grads to be up to the task.





Convention conundra

24 05 2007

It’s funny that not too long after my boss posted on the company development blog about the whole annoying left/right handedness issue (perhaps after wrestling with some inherited tools which likely flip-flop between handedness and contain lots of kludges to convert between them), we run into another pesky set of competing maths conventions while converting some “optimised” (i.e., obfuscated) swept sphere to plane collision detection code from PS2 Vector Unit assembly language to more portable C++.

I should add that we don’t have any PS2 VU documentation and that the VU docs available freely on the web are somewhat thin on the ground.

Anyway, all the hassle was about plane representation. Firstly, there are two competing canonical plane representations:

  • Ax + By + Cz + D = 0
  • Ax + By + Cz = D

Where (A, B, C) is the vector normal to the plane, and D is the signed distance from the origin to the plane along the plane’s normal. Of course the only real difference between the two is that the constant D is either negated or not, depending on which form you like best.

So, no big deal. For example, when you want to calculate the distance from a point to the plane, you either (depending on your convention) add or subtract D from the dot product of the normal and the point.

The second competing convention is to do with the plane’s normal. It’s easy to imagine that if you have a normal vector pointing out of a plane, that side can be called either the “front” or the “back” of the plane. Thankfully my boss and I are on the same page on this one. We reckon the normal points out of the front of the plane. So if we have some collision geometry, say a ground plane, the normal will be pointing upwards.

Now if I can only convince the world that +Z=up (a la Quake) and I’ll be set!