Mail Time: Pokemon Coding and DRM

We’re in that odd lull between the “October Crappy Spooky Game” glut and the “End of year / Christmas” glut. (This year, that’s the week between October 31st and the release of Fallout 4.) So it’s a good time to answer some reader questions before things get crazy again.

First up… Pokemon?

I have a programming question regarding the Pokemon Spinda and how Gamefreak managed to create such an interesting thing. In case you don’t know, Spinda is a unique Pokemon in that it has different spot patterns passed on its personality variable. That variable is a 32-bit integer and there is a spot pattern for Spinda for every value possible with that variable, which as you know is 2^32. That’s a lot of possible Spindas to have.

So here’s my question: do you have any idea how the heck did Gamefreak managed to create a Pokemon like that without having 2^34 sprites in every Pokemon game since Gen 3? I don’t know too much about the coding of video games but from what little I do know, it is possible to just add and remove the spots on Spinda if it is a 3D model, but that is not something you can do with sprites.

– Daniel

Before I answer the question I’d like to point out what an amazing cultural force Pokemon is. I have never owned, played, or even held in my hands a single Pokemon game. Yet I always know when I new Pokemon game is out, and what characters everyone is talking about, and what Incredibly Stupid Thing Nintendo is doing that’s annoying everyone this time. The same isn’t true of (say) Call of Duty, Madden, or anything going on in the MOBA scene. Maybe I just connect with an unusually high number of Pokefans on social media. (Unlikely, given my age.) But I think it’s more likely that people are just more likely to have stuff to say about Pokemon.

Also, I find it amazing how distinctive the names of Pokemon are. Even though I’ve never played, I can – without further context – know that nonsense words like Snorlax, Zapdos, Spinda, Charizard, and Gengar are Pokemon while other made-up words like (say) Protoss, Vortigaunt, Sangheili, and Prothean aren’t.

But to the question:

image

Daniel is talking about a Pokemon that can have a variety of spot patterns. (Just over 4 billion different possible patterns, actually.) It seems kind of odd to do this, since it draws attention to the fact that no other species of Pokemon has varying stripes / spots / feathers / whatever. But it’s a fun idea, which I guess is the point of Pokemon anyway.

You actually can change the spot patterns on a 2D sprite! The way of doing it in 3D is probably more obvious, but it’s just a matter of using layers. The simplest example: You’d have the base sprite, which would be a plain Spinda with no spots. Then you’d have some other sprites that follow the outline of a spina, each featuring a single spot. If you make 32 of these layers, then each bit in that 32 bit Spinda number would control whether that particular spot was visible or not.

This technique would be kind of brute-force and would make a Spinda 32 times as much work and take 32 times as much memory compared to a regular Pokemon, but that’s a lot more reasonable than 4 billion. But there are even easier (for the artist) ways of doing this without needing to hand-craft all 32 layers. Maybe you could have a smaller number of spot patterns, but through flipping and rotating the patterns (and only drawing them when they land on the outline of the body) you could get the job done. There are probably many other techniques, but you get the idea.

In any case, I wonder if a no-spots Spinda is possible, in-game. If someone gets a 1-in-4-billion roll of “zero” on their Spinda personality, would they end up with a spotless (albino?) Spinda? Is there a Spinda somewhere in the possibility space that technically has spots, but they never show up because they occur outside of the silhouette of the sprite? 4 billion sprites would make for a big search. I suspect it would require ROM hacking to figure it out.

You’ve written a lot about piracy, DRM, copyrights, Lets Plays, even mods and the selling thereof and so forth.

Now that it looks like you’ll be releasing Good Robot for sale, what is your team’s policy with regards to these things for your own game? I assume you’ll allow Lets Plays. Will you allow them to monetize?

– Wide and Nerdy

(This question was edited for length.)

The Good Robot that Wide and Nerdy is referring to is the game I’ve been developing in my spare time. I’ve been writing about the process on my blog.

I can understand where this question is coming from. Sure, I’ve railed against DRM for years. Back in 2010, one of my earliest columns here on The Escapist was about how DRM is a waste of money because you can’t make perfect DRM, and in the digital age anything less than perfect is useless.

But now that the shoe is on the other foot, now that people will certainly be pirating the game I worked so hard on, maybe I’m starting to see the appeal of DRM?

No. I’ve always said that DRM was a waste of resources, and if anything game development has made this clearer than ever. When you’re on a small team and you just barely have enough time and money to get the thing done, why would you spend any of it on DRM? I would have to have hubris coming out of my pores (and be ignorant of the mechanics of the problem) to imagine that after every single other DRM system has failed, that I would be able to make one that was bulletproof.

The worst part of DRM is when something goes wrong and someone who did pay for the game ends up having a problem with the DRM. Maybe a huge corporation doesn’t care about that, but if you’re in a small group and you have to handle support yourself, that eventuality starts to look really ugly.

And just to head off the nitpickers: Yes, our game will be on Steam and yes, Steam is basically candy-coated DRM. But we’re not on Steam because we think it will help us defeat piracy. (Good luck with that.) We’re on Steam because that’s where the customers are. We’re also going to have the game for sale elsewhere, for people who don’t like DRM, or Steam. (If nothing else, I expect our game will at least appear DRM-free on GoG.)

As for letting people monetize? If someone makes a video of themselves playing my game, then any money they make in the process is theirs. I shouldn’t get a cut any more than Michael Jackson should get a cut of the money someone makes dancing on the street corner to “Beat It”. I already made my money when they bought the game from me. Please! Stream my game! Get rich doing it! I don’t want a cut. I just want people to know it exists.

Giving your audience freedom isn’t just the moral thing to do, it’s also the only sensible business decision. Anything else is a waste of resources and sabotaging your customer base. I think being an indie brings these questions into sharp focus in a way that sitting in a boardroom and viewing your audience in the abstract doesn’t.

(Have a question for the column? Ask me!.)

Shamus Young is a programmer, critic, comic, and crank.

Recommended Videos

The Escapist is supported by our audience. When you purchase through links on our site, we may earn a small affiliate commission. Learn more
related content
Read Article Stadia’s Pricing Model Will Ultimately Be Its Downfall
Google Stadia's Pricing Model Will Ultimately Be Its Downfall
Read Article The Bungie Split Could Prove Activision’s Incompetence
Read Article Marvel’s Avengers Was Missing More than Just Gameplay
Marvel's Avengers, Square Enix, Crystal Dynamics, Eidos Montreal
Related Content
Read Article Stadia’s Pricing Model Will Ultimately Be Its Downfall
Google Stadia's Pricing Model Will Ultimately Be Its Downfall
Read Article The Bungie Split Could Prove Activision’s Incompetence
Read Article Marvel’s Avengers Was Missing More than Just Gameplay
Marvel's Avengers, Square Enix, Crystal Dynamics, Eidos Montreal