Category Archives: Blog

Words We Have Invented

We invent words. It’s important to me that we get credit once these words become commonly used. That’s why i’m keeping this list of words that we’ve coined, so that any etymological research turns up our names, and maybe there will be some kind of word royalty cheque mailed out to us.

Words that Ryan Henson Creighton Has Invented

gothtivist – This is someone who wears black clothes, metal studs, has died black (or red/green/blue hair), and Frankenstein platform shoes – generally, borrowing liberally from the goth and punk scenes of yesteryear – who is also a vegan, an environmentalist, a political activist, or is engaged in some other form of niche organized protest.

Jen Krebsz of Sick on Sin

Our friend Jen Krebsz makes t-shirts for the gothtivist crowd at Sick on Sin

nerdiquette – Nerd ediquette. Usage: Spoiling the finale of Battlestar Galactica just to make a point about the anthropolocial audacity in the last episode is bad nerdiquette.

Words that Cheryl Creighton Has Invented

copsicle – a police officer on a bike.

Words that Mark Duiker Has Invented

plumber’s chin – a dramatically cleft chin.
svest – a sweater vest

Flash CS4 3D – Depth Management

i’ve been playing around with the 3D tools in Flash 10/CS4, with half a mind to completely redo our cube-mapped memory game Two By Two with an actual 3D cube. (Currently, the game uses a series of skewed planes to fake the 3D effect.)

The good news is that CS4 does support 3D, although some people on the web are calling it 2.5D for one particular reason: the DisplayObjects that you transform and translate are unaware of each other, and do not exist in the same 3D space.

Here’s what that means: you can have two planes sitting next to each other. Depth-wise, PlaneA is in front of PlaneB. You move PlaneA backwards along the z axis, and it never swaps depths behind PlaneB. It’s as if the two clips are entirely autonomous and exist in their own little 3D worlds. Which they do.

note: you’ll need to be running the Flash Player 10 plugin to view these examples. Get it HERE.

 
[SWF]http://www.untoldentertainment.com/blog/labs/3d/depthProblem/depthProblem.swf, 550, 400[/SWF]
 

This becomes a big problem when you need things to look natural. Check out this Flash coder’s experiment with a 3D world and a camera:

Flash 3D World with Messed Up Depth

This is fine if all of your game characters have X-Ray vision, i suppose.

The floors and the walls are placed correctly, but they all show through each other. i had the exact same problem when i tried building a cube from MovieClips. Placing the clips was very easy, but the depth problem baffled me. i knew that i had to loop through all the cube faces and re-order them based on their z properties, but i didn’t know how to do that, since localToGlobal only supports x/y coordinates.

It turns out you have to actually write your own depth manager if you want to build any kind of 3D object and have it display correctly. i found just the code i needed here on Drew Cummins’s blog:

http://blog.generalrelativity.org/?p=28

i’m a big enough man to admit that at one o’clock in the morning last night, i didn’t fully grasp how this code did what it did. Happily, it worked. You can see the difference in cube rendering below. The cube on the left applies Drew’s depth management routine.

Thanks, Drew!

 
[SWF]http://www.untoldentertainment.com/blog/labs/3d/cube_depthManagement/cube_comparison.swf, 550, 400[/SWF]
 

Additional notes: there is a (possibly deliberate?) type-o in Drew’s code. One of the loops is missing a minus operator on its iteration decrementor (i-), so watch out for that.

You may also have to rely on the ADDED_TO_STAGE event, as Drew’s code threw me an error when doc.stage was null. This can happen when you try to fire code before an object actually exists on the stage.

AS3 Tutorials – Instantiate Using a Dynamic Class Name

You likely know how to instantiate a class in Actionscript 3 using the new keyword:

var someClassInstance:SomeClass = new SomeClass();

But what if you want to instantiate a class where the class name is dynamic?

For example, we’re working on a project that has a Character class. We pass it a character name (“Fred”, “Joe”, “Tom”, etc), and among other things, it goes into the library and instantiates a linked MovieClip based on the character name.

In Actionscript 2, you would do this:

this.attachMovie(dynamicLinkageName, "instanceName", depth);
// Where dynamicLinkageName is "Fred", "Joe", "Tom", etc

So in Actionscript 3, you’re tempted to say something like this:

public class Character
{
	public function Character("charName")
	{
		var charClip:[charName] = new [charName]();
	}
}

But that’s not going to work at all. Here’s how to do it:

import flash.utils.getDefinitionByName;

public class Character
{
	public var charClip:MovieClip();

	public function Character("charName")
	{
		var ClassReference:Class =
			getDefinitionByName(charName) as Class;
		charClip = new ClassReference();
	}
}

Voila!

Lest We Reset

Joystiq posted a timely opinion piece today (Remembrance Day for the Commonwealth) by a writer of Japanese descent can’t bring himself to play Call of Duty: World At War because of the portayal of the game’s Japanese villains (or “virrans”).

Call of Duty: World At War

i’m glad it was only the opposing side that committed wartime atrocities. Phew!

Opinion: Why I Can’t Go Beyond the First Five Minutes of Call of Duty: World at War

The comment thread that follows is surprisingly civil (perhaps due to the author’s threat of banning racist participants.) It’s really interesting that some readers refuse to play the game because it contains footage of actual WWII executions, while titles like Gears of War 2 are okay because the carnage is fictional. i was very surprised to see some folks suggesting that excessive violence is, by definition, excessive, real or otherwise.

Not long ago, i anointed myself the game industry’s lone Jiminy Cricket. But the comment discussion following this article gives me hope that the game industry’s insiders – players, critics and commentators – aren’t afraid to call foul when the medium they love lets them down.