Hello to everyone at ICE 08!

March 26th, 2008

i’ve been asked to speak at ICE 08 as a last-minute replacement. ICE, or Interactive Content Exchange, is Interactive Ontario’s major annual event. The conference draws broadcast, mobile, online and console delegates from as far away as Sudbury.

ICE is also an acronym for the International Congress of Entomology, and a trade show for the gambling industry. So if you lose your house in a business deal or you feel something unpleasant crawling up your leg, you may still be at the right conference. *drum fill*

Bug

If this guy asks you to sign some kind of contract, just do it.

If you came to the site from the conference and clicked on the Blog Monster, you most likely want to see what we’re all about. Our Games gallery is slim pickins these days, because all the interesting development is going on behind the scenes:

We’re creating five games for a Canadian kids’ teevee production company. The site will launch this summer.

We’re building two games that will be accessible to both deaf and blind players (that is to say, players with one disability or the other … Helen Keller would have a bit of trouble).

Additionally, we have been invited by two different companies to create two massively multiplayer online game demos. One of these companies wrote the book on the genre. We are extremely excited to be working with them!

If you’re here in the midst of a boring panel (hopefully not the one i’m on), here are a few Untold Entertainment articles for your interest:

The Democratization of Game Development

voting button

This year’s trend at the Game Developer’s Conference in San Francisco was the sit back, relax, and let your players build the game for you. i approve.

Prince of Persia, Prince of Peace

Calvary Invaders

A mercifully brief jog through the history of Christian video games, and why i’m thankful that Jesus forgives.

Ryan Creighton on The Agenda with Steve Paikin

The Agenda Logo

Steve grills me on gaming for the elderly, mass market video games and how EA’s Rock Band will save the music industry.

Kids Eagerly Await Nickelodeon’s Next Shipment of Ass

ESRB Mature Tomfoolery

How a supposedly legitimate children’s broadcaster shovels schlock to its young audience, right under parents’ noses.

Canadian Game Journalism: Not Worth It

Ronald McWho?

A serious number-crunching leads to the conclusion that Canadian game journalism rivals a McJob.

Video Games Teach Kids to Gamble

video game gambling

Twenty hours into every Pokémon game, the (likely) pre-teen player walks into a full-fledged casino. At a time when bashing video games is en vogue, this topic is conspicuously missing its fair share of outrage.

AS3 Tutorial - Math.random()

March 23rd, 2008

i haven’t written many Flash tutorials because i feel like a bit of a poser. i see the brilliant codeheads posting these tutes to make Flash do incredible things and i think “man - that’s leagues ahead of where i’m at.” But i forget that with eight years’ experience using Actionscript, i do actually know a thing or two that will help someone new to Flash/Actionscript.

This article is from an email i sent to a Humber College student explaining how to pull a random number in Flash, how to make it an integer, and how to get a random number within a range.

The student, Michael, was creating a game with an asteroid belt. He wanted to randomly distribute the asteroids along the y axis, and to give them a random speed value within a range. The range would increase with each new level.

~~ BEGIN TRANSMISSION ~~

Hi Michael.

Whenever you want x amount of something, that’s obviously your cue to create a variable. So since you need x amount of asteroids, let’s make a totalAsteroids variable:

var totalAsteroids:uint = 5;  // you can tweak this value up or down, of course

The other two things you’re looking at are random numbers within ranges. You need a random number within a range to distribute the asteroids along the y axis. You need a random number within a range to determine the speed of the asteroids, which goes up (i assume?) each level.

So! Here’s the basic random code:

var someNumber:Number = Math.random();

That’ll get you a decimal number betwen 0 and 1. Try running this code a few times in Flash to prove it:

var someNum:Number = Math.random();
trace(someNum);

You just multiply that number if you need a bigger range. Look at this:

var someNum:Number = Math.random()*5;

That will give you a decimal number between 0 and 5, because everything has been multiplied by 5.

Decimal numbers might not serve your purposes well. Here are a few ways to clean up your someNum result:

var someNum:Number = Math.floor(Math.random()*5);
// gives you 0, 1, 2, 3, or 4 by "flattening" the decimal number
var someNum:Number = Math.ceil(Math.random()*5);
// gives you 1, 2, 3, 4, or 5 by raising the decimal number
var someNum:Number = Math.round(Math.random()*5);
// gives you 0, 1, 2, 3, 4, or 5
by rounding the decimal number up or down

See? You just wrap Math.roundingMethod() around your Math.random() method. You stick your Math.random() statement inside the Math.roundingMethod() brackets.

So far so good. Now what if you need a random number within a range? Say, any number between 5 and 20?

Well, 20 minus 5 is 15. That’s your range. You need a random number out of 15.

Then just add the lower limit (5) to bump the number up. Does that make sense?

var someNum:Number = Math.ceil(Math.random()*15);
// gives you 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, or 15
var someNum:Number = Math.ceil(Math.random()*15) + 5;
// gives you 5, 6, 7, 8, ,9 ,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, or 20

So really, we could knock all these numbers out and just use variables.

var minLimit:uint = 5;
var maxLimit:uint = 20;
/* These two variables change
depending on the level of the game.
To be more specific, they'll probably
be called minSpeed and maxSpeed.*/
 
var range:uint = maxLimit - minLimit;
 
var someNum:Number = Math.ceil(Math.random()*range) + minLimit;

This works for your asteroid speed. It also works for asteroid placement. Do you see how? You’re just telling Flash the minimum limit for asteroid placement (somewhere near the top of the gameplay field) and the maxiumum limit (near the bottom of the screen). Then you pull a random number within that range and bump the number up by adding the minLimit value.

To create your asteroids field, loop through your totalAsteroids value, and for each asteroid you add to the screen from the library, get a random number within range and set the asteroid’s y position to that result.

for(var i:uint = 0; i<totalAsteroids; i++)
{
   var theAsteroid:Asteroid = new Asteroid();
   // create a new instance of your Asteroid class (not shown)
   var theClip:MovieClip = theAsteroid.clip = new AsteroidClip();
   // attach a MovieClip from the library
 
   theAsteroid.clip.y =
           Math.ceil(Math.random()*screenRange) + minYLimit;
   // Pull a random screen position
 
   theAsteroid.speed =
           Math.ceil(Math.random()*speedRange) + minSpeed;
   // Pull a random speed
 
   theAsteroid.dir = Math.round(Math.random())*2-1;
   // Randomly grab 1 or -1 for the direction.
   // During the game's update loop, multiply the speed
   // by the direction to make the asteroid move left to right,
   // or right to left
 
   theAsteroid.dir == 1 ?
           theAsteroid.clip.x = 0 : theAsteroid.clip.x = maxXLimit;
   // Put the asteroid at the right or left side of the screen,
   // depending on which direction it'll be travelling
 
   addChild(theAsteroid.clip);
   // Put that puppy on the stage!
}

Obviously what’s missing here is the game’s update and draw loops which will position the asteroids and position their graphics. i’ll save that for another post.

Addendum: Props to SmilyOrg from #actionscript on EFNet for the random direction code. i use it all the time, and i always forget how it goes.

PROBLEM:

MovieClip._xscale (or MovieClip.xscale) does not light up as a recognized property in AS3. It’s not even listed as a property of the MovieClip class in the documentation. What gives?

SOLUTION:

_xscale and _yscale properties have been replaced by scaleX and scaleY, which are both properties of the DisplayObject class. MovieClip (eventually) extends DisplayObject and inherits these properties.

The second snag is that scaleX and scaleY percentages are now divided by 100. Whereas before, MovieClip._xscale = 100 displayed the clip at its native width, MovieClip.scaleX = 1.0 is the new hotness.

MovieClip._xscale = 100; // Displays an object at its full width in Actionscript 2
MovieClip.scaleX = 1.0; // Displays an object at its full width in Actionscript 3

Take care when porting AS2 files to AS3.

Kids’ entertainment juggernaut Nickelodeon announced this week that it will blow out its already 5000-strong game library by 1600 more games, including three more kid-based MMOs, according to Joystiq. Pursuant to my admittedly unprofessional rant a few weeks ago, Nicktropolis Looks Like Ass, i have to wonder whether the newest projects in development over there will follow suit, or if they’ll pay closer attention to quality.

Certainly, Viacom/Nickelodeon’s acquisition AddictingGames.com isn’t exactly a bastion of quality. i was actually astounded when a supposedly reputable corporation like Viacom, with shareholders n’ everything, and a reputation for making quality kids’ entertainment, picked up AddictingGames. Let’s take a quick tour through the library shall we?

i dip into the Action game category and come across two gems. First up, there’s Light People on Fire, where your goal is to run around setting as many people on fire as possible. Innocent bystanders include (naturally) mothers pushing baby carriages.

Light People on Fire

On teevee, Beavis and Butt-head get sued for it. Online, Addicting Games revels in it.

A few icons down i notice Cannon Crotch, by “F****N Amazing Games”. In it, you must destroy Adolph Hitler’s reanimated corpse with your crotch-mounted cannon before he uses a laser to blow up the moon.

Cannon Crotch

In what bizarre world is this an appropriate game for kids?

There’s High School Cheerleader, where your scantily-clad character pulls off dance moves in a low-cut top while pervy students watch from the background, and Blood Car 2000 Delux, which has you running down as many pedestrians as possible with your car. Blood Car 2000 Delux proudly states that it’s “Rated M for Awesome”.

No Ratings for Young Gamers

In all my time on the site, i didn’t see a single bona fide ESRB rating or content warning on any of these games.

Addicting Games is one of these online kids-only havens that adults don’t really know about. In every user-focus test i ever did with a room full of kids, we’d let them surf wherever they wanted, and inevitably they’d end up at Addicting Games. The site’s acquisition by Viacom/Nickeloden certainly ensured that adults heard about the site, but honestly: how many adults have actually played the games there? i assume most grown-ups who have visited Addicting Games have followed the link after reading about the acquisition in the trade papers and, after seeing the overwhelming array of icons, promptly left.

i worked at a teevee station that received regular viewer complaints about its programming, most of which came straight outta CrazyTown. One father was very upset that some characters in a show were pretending to be pirates, because pirates “rape and murder people.” Over-protective, i think, but somewhat fair. But imagine the gasket this guy would blow if he found his kid poking around on Addicting Games.

It’s a lot like the fact that Video Games Teach Kids to Gamble. No concerned grown-up ever bothered to drill 20 hours into a Pokémon game to find the full-fledged casino. Likewise, no adult seems to care that while teevee adheres to some pretty tight moral standards, the kid-targeted online world is packed with crap. What’s worse, the people behind this site aren’t shadowy, hard-to-find folks like pornographers - they’re bloody Nickelodeon. It boggles the mind.

Concerned Parents Gotta Step Up Their Indignation

i suppose that concerned parents can only be concerned about what they see, and they’re not bothering to see all aspects of kid culture. Maybe parents can only be so concerned?

Or maybe it’s another symptom of media dinosaur thinking, where somehow the teevee rules don’t apply to the Internetz? (see Building a Coffin for Nielsen) Who knows? You could even chalk it up to the old habit of thinking that certain kid-associated media are “safe” (cartoons, video games, etc). That mode of thinking has proven particularly tenacious.

Fed Up

Don’t get me wrong. It’s not that i think playing Light People on Fire will turn kids into raving mad pyromaniacs, or that kids can’t see that the cheap autocidal thrills in Blood Car 200 Delux aren’t a great idea in real life. i just get a little peeved that parents like the Pirate Dad get so irmy about the slightest breach of ethics on teevee, yet Viacom is hosting this overboard, lurid junk-culture free-for-all online and no one says a word.

Trash

There’s no shortage of trash in this world.

i worked for Big Media creating advergames for kids. i’ve had my fill of feeding junk to children; i feel the need to purge. The next product i create for children, if i ever hoe that row again, will uphold a solid value system. It will affirm the sanctity of childhood. And it will be a restorative, detoxifying experience for the kids fattening themselves on the trash fed to them by Nickelodeon and Viacom.

My industry pal Jim McGinley, one of the folks behind TOJam, turned me on to Google Analytics just as i was launching my site this past year. i assume that, being from Google, it’s insanely popular and everyone’s already heard of it. But in the off-chance that you haven’t, and you’re still using your website host’s tracking software like Awstats, give this post a read.

Google Analytics starts working when you throw a small piece of code on your site. They’ve also written code to track actions within your Flash files. My main site is entirely built in Flash, but i’m able to hit Google’s javascript code using fscommand to track hits on subpages like “Games” and “Services”. If you have a Flash (or otherwise) game on your site, you can track things like the number of times a player clicked the “play again” button to get a better idea of how sticky your game is.

i won’t bother outlining how to add the code to your site or your Flash file - the Google folks have done an excellent job of that on their Analytics site. In all, i remember it taking about fifteen minutes, tops, to rig up my entire site.

Hello to My Friends in Biggleswade

One of my favourite featurs of Google Analytics is the map view. This clickable diagram highlights the areas of the world where most of your traffic is being generated.

Google Analytics Map

Untold Entertainment: Big in Cambodia

The darker the area, the more traffic you’re getting from that country. Pretty neat. But i didn’t realize just how granular these data become until just this morning, when i started poking around the map a little. You can drill all the way down to the city or township that generated the hit. This is an uncommon thrill that feels a little like aiming a camera satellite into someone’s bedroom. i’m sure it’s only a matter of time, actually.

Biggleswade

Google Analytics puts Biggleswade on the map

GOOOOOOOOOOOOAALLL!!!

Google Analytics is largely a promotional tool to sell things like Google Adwords and Adsense, but you can use it for free (for now) as much as you like. i’m sure they’re using these data for their own nefarious purposes anyway. (Who actually reads those Terms of Service?)

One of the features of Analytics that’s meant to drive Adword sales is the funnelling/goals tool. You can use it to set up paths through your site to ensure people are doing what you want them to do - for example:

site membership info page > sign-up page > membership confirmation > t-shirt shopping page > checkout page > credit card entry page > thanks for your hard-earned cash page

You can assign dollar values to these goals. My site is meant to advertise my studio, so instead, i’ve just created two very simple goals to learn about the flow on my site.

One goal is from the website proper to the blog. The other goal is from the blog to the website.

Google Analytics Goal Conversions

Pro Tip: Try not to base major site strategies around one day’s worth of stats tracking.

If Google Analytics reveals that very few people are going from the blog to the website, i’ll probably have to jazz up the logo in the corner of the blog, or cook up more ways to drive to the site (getting better game content on my site is a good start ;) It will also address my suspicions that no one hits the site from search engine anyway. That’s the biggest drawback to having a Flash-only website. That’s actually what this blog hopes to remedy … but if no one is going to the site from the blog, i may be wasting my breath here.

More Bounce to the Ounce

One fun stat to try to chip away at is the Bounce Rate. This is the percentage of people who hit your site (usually from a search engine), see that it’s not what they’re looking for, and leave immediately. i relish the thought of creating a site that’s so fun and interesting that people who don’t find what they’re looking for stick around anyway. To lower your Bounce Rate is to cultivate your inner PT Barnum. As an entertainer, i see a low bounce rate as a direct reflection on my ability to entertain.

Sexy Ringmaster PT Barnum

Sexy and famous ringmaster PT Barnum, after whom the Chrysler Cruiser was named. All true. Step right up.

Presently, my bounce rate is up around 90%. Pardon me - i have some web-only circus dogs to train.

AS3 Pitfalls - Error #1009

March 18th, 2008

PROBLEM:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

SOLUTION:

i don’t know.

Error #1009 seems to be catch-all error that Flash throws whenever you reference something that doesn’t “exist”, or hasn’t been loaded into memory. A quick Google search shows that the error spans both Flash and Flex, and can crop up in a number of hair-pulling situations. Here’s the recipe i followed to produce my very own Error #1009 while building a multi-user chat application with ElectroServer 4:

1. i create a document class called Main.as and linked to it from the Flash IDE.

2. i set up my Flash swf with two frames. Frame 1 has a Login widget.

ElectroServer Simplechat Frame 1

Frame 1. Nothing fancy.

3. Frame 2 has a Chat window, a Send button, and a List component labelled “Users”. The List component’s instance name was userListClip.

ElectroServer Simplechat Frame 2

Frame 2. Note the “Users” List component on the right.

4. Once the player logs in, i tell the swf to gotoAndStop(2);

5. Now i try to populate my List component, userListClip, with the user names of the people in the chat. No good - dreaded Error #1009 rears its ugly head.

After a bit of research, i read somewhere that my code cannot manipulate objects that i’ve placed on the stage further along the timeline, because those objects have to “exist” at the moment my code is compiled. Huh. Really?

CRUMMY SOLUTION #1 - Alpha/Siberia

One solution is to have that troublesome userListClip instance exist on Frame 1, but drag it off the stage or set it to alpha 0%. This is a very clunky workaround and i don’t like it.

CRUMMY SOLUTION #2 - Clunky Listener

Someone in a Flash user group suggested i register a listener with Event.ADDED. Here’s how that goes:

addListnener(Event.ADDED, onAdded);
private function onAdded(e:Event):void
{
     var clipName:String = e.target.name;
     switch (clipName)
     {
           case "userListClip":
                    populateUserList();
                    break;
           default:
                    break;
     }
}//onAdded()

No WAY. That can’t possibly be a respectable solution. Let’s just say it’s “inelegant” and leave it at that. And for some strange reason, my userListClip instance doesn’t ever show up in this function. What gives? Do components not trigger Event.ADDED?

CRUMMY SOLUTION #3 - The Hands-Off Approach

Another solution, obviously, is to build the userListClip List component out of code. i’m resistant to that because i’m one of these hands-on designer types who likes to see what he’s building. i don’t like the fact that my whole design exists in this ethereal, unimaginable codespace that exists only in my darkest desires until compile time.

Not only that, but pure code solutions become a pain to troubleshoot months down the road. i’d much rather see something on the stage and click on it to see its instance name, than to pour through pages and pages of code trying to learn the programmer’s naming convention (even if the programmer is me. i have a lousy memory).

THE BEST SOLUTION

If you’ve generated Error #1009 and have lived to tell about it, please post your solution!

The thing that excites me most about technology is when it makes impossible things possible - like 3D baby ultrasounds or giving me sixpack ab muscles. While i’m still waiting on that one, let me share this:



It took me the whole video to figure out the voiceover guy was saying “MIDI”, and not “meaty”. Anyway, Direct Note Access is a feature of a sound software plugin called Melodyne. It takes an audio waveform and splits it up so that you’re viewing individual notes more like musical notation than technical scribbles. That’s cool enough already.

Now buckle up: the plugin takes a single chord and separates the notes inside so they can be tweaked individually. So if you have a major chord played in the standard format, you can tweak that middle note down so the chord becomes minor. This isn’t MIDI (or “meaty”) - it’s on a live recording.

Can i get a “holy crap”? If you’re not a musician or someone who works with audio, this might be lost on you. But trust me when i say this is huuuge.

What’s in it for you? Well, more money-minded fathers can buy plastic surgery for their little girls and pimp them out as recording artists, using this software to correct their music so that it sounds like they can sing and play an instrument.

Ashlee Simpson

Ashlee Simpson: “before” and … wait. They both kinda look like “before”.

That’s what i’m planning to do with the software, anyway, but my daughter’s a little green. Is 2 years old too young for a boob job?

MMO-focussed site Massively is also covering the smacktalk coming from Corey Bridges, founder of Multiverse.

A while back someone said that it would take at least a $1 billion dollar super project to take on World of Warcraft. But maybe, as it was with the Roman Empire, the wolves at Blizzard’s gate will be countless smaller tribes made up of the so-called unwashed hordes.

There’s something very appealing about talk like this. It’s the “root for the underdog” spirit in me that really yearns for this kind of turnaround. It also doesn’t hurt that i happen to be the very underdog Bridges describes - a self-funded start-up with MMO ambitions. Of course, his talk should all be taken with a grain of salt, being that Multiverse is a MMO-building platform targeted at those same small teams to whom Bridges makes these promises.

Bringing Down the Old Guard

Mine

For part of Bridges’ talk at SXSW08, he mentioned how technology is chipping away at the root of the film and music industry power structure. i’ve had that conversation many times in the past few years, and in posts like To the Victor, the Eyeballs. The trouble that many of us young bucks face is that so many Old Guard media moguls are entrenched in antiquated ways of doing business, and have been getting so fat on those tried-and-tested methods for so long. The industry can only move forward with the help of two people: Mr. Retirement and Mr. That Guy Just Got Hit by a Bus.

Keep reading »

Joystiq has a report from one of the South by Southwest sessions by Corey Bridges, one of the people behind Multiverse. Multiverse is a tool enabling small development teams to make big games. i talked about a couple of Multiverse projects in my interview on Teevee Ontario last week. LunarQuest is the University of Florida’s virtual world for astrophysics training. Another Mutliverse application enables new hires to explore a virtual office tower identical to their real-world place of employment. There, they can get the lay of the land and fill out all their paperwork before setting foot in the brick-and-mortar workplace.

alt

LunarQuest: making astrophysics instruction less boring (?)

Bridges made some bold claims about the indie developer uprising during his session:

The talk turned out to be surprisingly inflammatory as Bridges predicted the death of the traditional video game industry in favor of near-universal adoption of virtual worlds.

Click to read SXSW08: Virtual worlds and indie games to dethrone publishers.

i can totally get behind the democratization of game development that ran rampant at this year’s Game Developers Conference, and i’m very interested to see where all of these game creation tools are headed. That said, i’m not very impressed with the Multiverse demos so far. They look dated and wanting.

Multiverse's Dark Horizon

Hey Dark Horizon: 1997 called. They want their graphics back.

Habbo Hotel visionary Sulka Haro puts it best when defending his game’s retro pixellated graphics: 3D is destined to look dated in a few short years, but 2D graphics have reached the point where an attractive 2D game is always going to look like an attractive 2D game.

… and then there’s Club Penguin.

Club Penguin: When does the hurting stop?

Club Penguin: where virtual worlds go to throw up.

i’ve had a hand in over fifty Flash games to date. My best advice to someone who wants to learn the software is to get a Flash Jedi - someone you can call up at three in the morning and pester for Actionscript advice. A Bert to your Ernie, if you will.

In my early days at Corus Entertainment / YTV, my Flash Jedi was Michael Lalonde, the amazing talent behind a comic strip called Ornery Boy, and father of a large number of bastard Flash game babies himself. My memory’s a bit hazy, but i credit this tip to Michael.

A Flash Sound Class Alternative

The YTV.com developers would often help each other out with some of the more difficult Flash problems that arose. Pride being what it was, the problem would have to get pretty bad before we’d solicit each other’s advice. Most of the time, all it took was a fresh pair of eyes to get past the hurtle. Every once in a while, the problem was so inexplicable that it boiled down to a Flash bug, and a work-around was necessary. Never did i see so many such unsolvable problems than when somebody worked with (against?) the Flash Sound Class.

Flash Sound Class got you down? Here’s the low-tech workaround that will probably drive “real” programmers nuts:

Keep reading »

Proudly powered by WordPress. Theme developed with WordPress Theme Generator by Party Industries & Hogwarts Digital.
Copyright © untoldentertainment.com. All rights reserved.