Sunday, July 3, 2011

Funny Programming Story

Found this while stumbling and found it rather funny.
"Mutant Marsupials Take Up Arms Against Australian Air Force

The reuse of some object-oriented code has caused tactical headaches for Australia's armed forces. As virtual reality simulators assume larger roles in helicopter combat training, programmers have gone to great lengths to increase the realism of their scenarios, including detailed landscapes and in the case of the Northern Territory's Operation Phoenix herds of kangaroos (since disturbed animals might well give away a helicopter's position).

The head of the Defense Science & Technology Organization's Land Operations/Simulation division reportedly instructed developers to model the local marsupials' movements and reactions to helicopters. Being efficient programmers, they just re-appropriated some code originally used to model infantry detachment reactions under the same stimuli, changed the mapped icon from a soldier to a kangaroo, and increased the figures' speed of movement.

Eager to demonstrate their flying skills for some visiting American pilots, the hotshot Aussies "buzzed" the virtual kangaroos in low flight during a simulation. The kangaroos scattered, as predicted, and the visiting Americans nodded appreciatively... then did a double-take as the kangaroos reappeared from behind a hill and launched a barrage of Stinger missiles at the hapless helicopter. (Apparently the programmers had forgotten to remove that part of the infantry coding.)

The lesson?

Objects are defined with certain attributes, and any new object defined in terms of an old one inherits all the attributes. The embarrassed programmers had learned to be careful when reusing object-oriented code, and the Yanks left with a newfound respect for Australian wildlife. Simulator supervisors report that pilots from that point onward have strictly avoided kangaroos, just as they were meant to."

So please, remember to define parents and inheritance?

Friday, July 1, 2011


So lately I have been working on learning how to make 3d video games in c++ as I spent the previous year supposedly becoming proficient in c++ at Clarkson. I was skeptical at first when I took the classes but now that im activly using c++ to try irrlicht(German for will o' the wisp or mad lights) I am surprised to discover how much I did learn these last few semesters. The last time I tried it I had no idea what all the * or -> were for and now I read it naturally and smoothly. As a result I feel confident enough to storyboard out a free to play FPS for Windows and Linux(hopefully). It wont look that stellar as I'm not that great with 3d modelers or animators, but with luck it will be a nice start to what I hope will be a large portfolio in 3 years. And I'll need that portfolio in order to get a good job once im in the "real world". Well no spoilers of the game for you yet; I want to make sure I have it all planned out before I actually start coding anything so that I dont just wing it as I write.
     As for the actual engine(irrlicht; remember?) I have found it pretty straight forward. There's the scene, the gui, etc. Level of Detail is built in, (just tell it how far away to clip and culling is done automatically in most render formats offered; I'm going with Direct3D) it supports any file format I could care to use or name and the methods are pretty obviously located. I'm quite pleased with the way it is set up and will likely use its companion(IrrKlang) for the audio engine. Well off to story boarding, ill give you an update soon.
     Heres a picture of a wall rendered with the Direct3D engine. The FPS is wicked high because its pretty much just a flat texture.