To me and I guess many like me, John Carmack of
Id Software
is the greatest programmer in world.
Even if you don't agree, you would have to concede that the Quake III engine is a beautiful creation.
Whilst going through entries in his old .plan files (a never ending search to tweak my Quake config) I came across the following...
01-Sep-99
In the process of chasing down the static memory hogs, I finally got around
to starting something I have needed to do for years: learn perl.
I was scanning through a linker map file looking for large gaps in addresses,
thinking to myself "this is one of those things you can probably do in three
lines of perl code". I have many and varied excuses for why I have never
gotten around to it before, mostly involving the fact that I have C parsing
code that lets me get what I need done with only minimal headache when I do
force myself to do some text file grovelling.
I decided my excuses weren't good anymore, and went out to the bookstore and
grabbed the llama book. Many of you would have been amused seeing me go
through the
print "Hello, $name!\n"
tutorial code as I did the examples in the first couple chapters. :-)
I got my task done, so now I just need to force myself to write little perl
programs whenever a need comes up, until I get fluent with it.
and a couple of days later...
06-Sep-99
The new format is bone based, but it is NOT hierarchial. Each vertex just has
an arbitrary weighted list of the bones that influence it. Bones are just 4x3
matricies of floats.
A hierarchial skeleton has some advantages (angles instead of matricies,
ability to do IK, etc), but this is a direct and simple replacement for our
existing infrastructure that doesn't require any cached state per model
instance.
A single .md4 file holds multiple level of detail surface sets, which all
share the same bone frames.
In use, it is exactly like the existing models (interpolate between two
frame numbers), it just saves a huge amount of space.
I used perl to generate my test data, and it was definately faster than having
a separate msdev open and doing it in C.
So in my book Perl gets the final seal of approval..
Not really a discussion point but I thought people might enjoy it!
"We are all prompted by the same motives, all deceived by the same fallacies, all animated by hope, obstructed by danger, entangled by desire, and seduced by pleasure."
- Samuel Johnson