Distributed JS Testing and RPG NPCs…

TestSwarm is a new idea by John Resiq for helping test Javascript. That sounds boring right, here is where it gets interesting…

It’s a distributed computing platform for testing Javascript code in various browsers. So say I have an old PC in the corner with IE 6, I could fire that up and point it to TestSwarm and occasionally pieces of Javascript code will be sent to that browser, processed, and sent back to the central TestSwarm servers, allowing the owner of that code to see what, if anything, has failed in my environment. Now have many different users/environments/browsers pointed to TestSwarm and you start to see how this could be an incredibly powerful way to test Javascript.

Sounds like a great idea to me.

Actually, TestSwarm has brought back an old idea I had, and I’m wondering what else could be used in this way…. ponder this:

Non-Player Characters (NPCs) in role playing games are generally dumb. Let’s take a shop owner, for instance. The process of interacting with him never changes – you always know what will happen. Sure, there may be some logic in the process (you have good karma, so your costs are lower), but it’s generally a very mundane experience.

Now imagine that when you walk up to Swarm Powered NPC and begin interacting with him, data about your character is fired off to a connected “NPC Handler”. This is a real person sitting behind a computer with a few spare moments.

They see some information about you:

  • How much you’ve spent with this shop owner in the past
  • Recent good (or bad) things you’ve done
  • What other NPC Handlers have said about you (word gets around in small fishing villages)
  • etc.

So as you decide to purchase that “Fishing Pole of Master Hooking” for some 10,000 gold pieces, the shop owner puts the breaks on….

“Whoa, whoa whoa. Last time you where here you insulted my toothless wife. I don’t think I want to do business with you… unless you’re willing to pay double.”

Or, if you’ve done a lot of business with that shop owner in the past, and he likes you, maybe he has some special inventory that just came in… and you get first pick.

You get the point. There are all kinds of technical issues to solve with this, such as:

  • Keeping the shop owner “in character” (so perhaps freeform communication isn’t allowed, but the Handler can select from positive/negative/neutral response types)
  • Keeping it fair (I’m going to sign up as a Handler and give everyone from the Clan X a discount and gouge everyone from Clan Y.
  • etc.

But hey, we’re programmers, we like challenges like that.

Anyway. I think TestSwarm is a fantastic idea and would love to see more lively NPCs. Kind of a strange connection the two, right?

Advertisements