Courting danger

I was on the brink of death. I forged on despite being woefully under-equipped. Every step I took meant a chance for the enemy to finish me off.

Taking a breather, I glanced at my supplies. “Not good.” I hissed. Safety was still some distance away. Adrenaline coursed through my body. My hands were shaking. I was starting to panic. I don’t even have the energy to retrace my steps. I can’t go forward, and I can’t go back. I’m stuck in the danger zone.

No, I’m not a secret agent. Nor a spy. Nor an explorer. I was playing a role playing game.

Monster genocide

In a role playing game (RPG), when you can’t proceed any further, there are a few common reasons

  • enemies too tough to defeat
  • didn’t do key story plot event
  • failure to solve puzzle

The first one is the most common, and also the easiest to solve. Just stay around the area and kill every enemy you can reasonably defeat. If you still get beaten, backtrack to a previous area where the enemies are weaker and start the bloodshed.

The idea is that either your character is still too weak, or your equipment is still of low quality. So you stay at an area to both strengthen your character (levelling up) and earn enough gold (or whatever game currency used) to buy better weapons and armour.

The thing is, some people carry this to the extreme. They refuse to proceed until they’ve bought all the best equipment they could buy. They refuse to proceed until they could bring down a monster with a touch of their finger.

“Die, die!”

In my earlier gaming years, I shunned such tactics. I wanted to get on with the story, and no measly monster was going to stop me, no matter how many horns or fangs or massive-damage-inflicting skill they had.

So my money management skills in RPGs was this: buy what I needed, then buy what I could. If something cost too much and thus too much time needed to earn the gold, I’d skip it.

What this meant was that every time I reached a new town and a new area, I’d be broke. I tested the waters around the area, and if I could get through a few battles without getting flattened, I was good to go.

What this also meant was that I’m constantly running around with the minimum. So when a boss (an immensely powered up enemy) fight occurred, I struggled. I would throw all my best skills at the boss, cast every magic spell I could, used every damage-inflicting item I had. I also had a tough time staying alive, with the boss wiping out one of my characters every few melee turns.

After maybe 20 minutes to half an hour, I was exhausted. I couldn’t use any more power attacks. I didn’t have any more magic left to cast spells. I’ve only got a few bottles of healing potions left. I’ve got nothing else up my sleeve, and the boss didn’t seem to be dying soon. I could only do simple normal attacks, a sword thrust, a staff prod, a punch.

And you know what? After issuing a normal attack command, I’d shout “Die!”. And the boss didn’t die. And hurt me. I healed as best as I could and issued another attack.

“Die!” I mentally screamed. The boss launched another lethal attack, finishing off one of my characters. I didn’t have the means to even revive that character. I attacked again.

“Die!” I implored. “Please die!”. The boss struck with a counter attack. I was left with just one character on the screen, barely holding up. Healing didn’t mean anything, since the boss’s counter attack would negate the effect anyway. I gave it one last shot.

“Die! Die! Die!

With a flash on the screen, the boss wavered and gave a groan. Then a growl. And collapsed. And the game produced the victory song I waited for so long. It was the happiest moment in my life. For a while at least.

Now to get the rest of my characters up again and reach a safe point before an ant sneezed on me and snuffed me out…

Preparation paralysis

It’s a game. There are relatively finite limits and fixed obstacles. You can prepare until you reach a point where you’re comfortable enough to move on. You can even test your preparation. If you can get through a few battles without getting hurt, you’re probably prepared enough.

Life doesn’t happen that way. Programming requirements don’t happen that way. Sometimes, you can never be sure if you’re prepared enough. I don’t want you to go “analysis paralysis” on me, and I don’t want you to go “practically dying” mode too. Prepare to the best of your knowledge and venture forth to explore new grounds.

But please move on. And if that entails courting danger, well, life would be boring otherwise.

The heat, the other and the pens

The heat was palpable in sunny Singapore for the past few days. Waves of scorching air rose off the asphalt. The bright yellow orb in the sky was indifferent to the mere humans living on the tiny island. With nary a cloud to shield the solar rays happily streaming down, nor an itinerant breeze to eddy ground level air, people were dropping like flies. Freak rain showers also left people sick, the weak unable to hold their own against the rapidly changing temperature.

Me? I’m hot! (double entendre intentional) The days were sweaty and the nights were sweltering. The small industrious electric fan at home did a great job at providing much needed relief, though there’s much to be desired. Because I have a high metabolic rate, and I generate enough heat energy to single-handedly power an entire apartment block. What those Matrix machines wouldn’t do to get their metallic hands on me…

What with the recent energy saving measures in the office, even my cubicle didn’t offer the cooling comfort sorely missing at home. I was drooping at work while the others were just moderately suffering in discomfort. Actually, my colleagues were only just a tad bothered by the mild increase in the thermometer readings…

The whole point of this monologue is that my brain’s fried. I can barely get my head around the programming work, let alone come up with a thought provoking article. Yes, I find writing harder than programming. Sometimes.

So I’ll leave you with a few discoveries of mine. And I discovered that I’m not the first one to coin the term “polymath programmer”. *sad* Refer to this Ruby forum article by Michael Letterle, the other polymath programmer (his site listed in the article is his old site). Yay, a fellow C# programmer! Alas, I’m not familiar with both manifestations of Ruby as a precious stone and a programming language…

I also found Brent Diggs, author of the witty and stomach-holding-hilarious site The Ominous Comma. I’m still laughing over his description of hectoplasmThanks Ben!

My final discovery is Men with Pens. Now I have every respect for James and Harrison, so I hope they’ll forgive me. When I first read their site name, my first impression was that there’s a missing “i” between “n” and “s”. Allow me to explain this unexpected association with the male genitalia…

When I was younger, my friend told me this joke about a teacher in a class full of students.

The pen was rolling off the teacher’s table.
“Sir, sir, your pen is dropping!” a student exclaimed.
“What? My penis dropping?”

You’ll have to excuse the crudity of the language… and the pronunciation. Non-native English speakers sometimes just pronounce words as they are, familiar syllable by familiar syllable… To make it up to James and Harrison, please go read about the exciting new world of niebu.

Featured demo – Konami/Raze

Today’s featured demo is Konami/Raze by PlayPsyCo.

3 things about the demo download:

  • You need to work with RAR file, as opposed to a ZIP file. Try RarZilla.
  • Doesn’t work on Microsoft Vista
  • Your ATI graphics card renders only grayscale

Now that unpleasantries are out of the way, let’s get on with it. What do you mean you haven’t downloaded the demo yet? Do that now. It’s about 160 KB and 4 minutes in length.

3 points to take note while watching:

  • Constructive solid geometry or CSG
  • Cel shading or cartoon style rendering
  • Shadow rendering

At the start of the demo, there’s a note referring to CSG or constructive solid geometry. It’s a way to build 3D models. An example in the demo is the cube with a square hole in each side. Let me show you how it works. First you have a cube.

CSG cube

Then you stick in stuff, like cylinders (the demo used cuboids).

CSG cube with cylinders

Then imagine the cube having a positive trait, and the cylinders a negative trait. And the cylinders “cut” into the cube. Then you render only the positive parts (so the cylinders disappear). The result is this (I rotated the cube a little to better show off the result):

CSG cube without cylinders

Here’s one where a negative torus (that’s donut for the non-math people) cuts a positive cylinder. Can you see where the torus is?

CSG cylinder without torus

Basically you construct the 3D model by cutting basic geometric shapes such as cuboids, cylinders and spheres. You can also merge shapes together. For example, you can stick 2 half spheres to the ends of a cylinder to get a capsule.

Next up, you should have noticed the cartoony feel of the demo. This is brought to you by means of cel shading. There’s a web site dedicated to this. I’ll refer you to an article which can explain cel shading better than I do. And here’s the supporting source code.

The best use of this technique was in Okami, a Playstation 2 game. I was awed by the use in rendering brush strokes in a 3D scene. You have to check it out. That game was just beautiful, the music authentically ancient Japanese, and the dialogue funny.

Lastly, the use of shadows. You never really think about shadows until they’re not there because the sense of depth is missing. Real-time shadow calculation is very intensive. I haven’t implemented any technique before, so I can only point you to some resources. Simulation of natural phenomena doesn’t seem so easy now does it?

Have fun!

Technical courses following the dodo

They’re just not that useful anymore. Once in a while, I’m notified through the company grapevine to go look at some of the available courses. When I’m free (or bored), I’ll glance at the list of technical courses. Boring. Boring. Know that already. Boring. Hmm, interesting, but it’ll never get approved. Know that already. Ok, done, didn’t find any courses I want to attend. Delete email notification.

Dated by the time they’re born

Technology moves fast. By the time that technological knowledge is condensed into a formal course structure, it’s already old. For example, by the time I was slated to go for my ASP.NET 1.1 course, the .NET framework 3.5 was on the horizon.

The technology had to be out and be stable before the company (or department) adopts it. Then there’s budget constraints. Then there’s personnel quota. By the time I get to go for a course, it’s old news. Worse yet, I’ve already mastered practically everything I need on that topic through personal trial and error and Google.

Do you know why cutting edge technology is cutting edge? Because it’s not done before. And if it’s course material, it’s already been done.

Broad basics

They assume you’re a novice. I’m not a novice. If you’re a polymath programmer, you’re not a novice too. If you’re even just a moderately proficient programmer, you’re not a novice too.

Much of the course material can be skipped or at least covered at a quick pace. They never seem to have enough time to cover the advanced material. You don’t need the basic stuff, that’s what reference books are for.

“Oh, you want to know the advanced stuff? We have an advanced course on that.”

I went on that advanced course. And I knew everything covered in that course. Oh wait, there’s that last bit on the last day that seemed useful. On second thought, nah, I knew that too. I was bored out of my mind, crying silently in my heart about the loss of those few days.

I want it now!

As a professional programmer, you’re in a hurry. There’s a deadline. There’s no time to go for a course and then find that you’ve learned nothing that can help you in your current project.

Due to budget and time constraints, you turn to the Internet. Technical and programming forums, discussion groups and blogs. The search engine becomes your best friend. Solving your technical or programming problem becomes thinking up search phrases that gives you the answer within the first few search result pages.

Change, or fade into history

Specific problems arise because of the inability to combine several disciplines together. Suppose you need to grab some data from an HTML page using C# and you figured regular expressions would be useful. You don’t need a full course on HTML. You don’t need a full course on C#. And you certainly don’t need a full course on regular expressions.

You need to know how you can combine your knowledge of HTML, C# and regular expressions together to form a solution.

I don’t have an answer to this. It’s not cost effective for courses to pull in knowledge from other disciplines. It’s not useful for courses not to pull in knowledge. For now, I’ll still rely on programming forums such as Dream In Code and communities like stackoverflow.

Random quote – Exam behaviour

This was something my English teacher said. Or was it my math teacher? Anyway, he was talking about something and then branched off into something else. He talked about how to behave during an examination, and he said this:

You may look up for inspiration
Down in desperation
But you may not look left or right for information