The CodeSpells Story (with Pictures!)

Fri, August 7, 2020
The CodeSpells story began more than 10 years ago. What happened? And what's coming?

Chapter 0: The Undergraduate Prototype

I was a junior at Southwestern University majoring in philosophy and computer science. One night, I was playing a meta-game called Nomic with some fellow computer scientists and philosophers.

Given that Nomic is a game about making up new rules while you play the game, it was natural for us to conjecture that it should be possible to create a computer game that you reprogram as you play. We went on to build an early prototype of this game using JMonkeyEngine -- which appealed to us because Java was the one language we all knew.

The only remnants I can find of this "game" are some screenshots I posted to my Facebook circa 2007.

A village with assets created by my girlfriend at the time, Whitney Johnson.

A fish flopping on a mountain, for no particular reason that I can recall.

A close-up of that cottage. Adorable. Brings back memories.

A magestic statue of a golden penis, sculpted lovingly in an ancient version of Blender by my girlfriend at the time.

The same statue, looking small from far away. Valley for scale.

Penis and sunrise. Need I remind you we were undergrads?

Penis and snow. *shiver*

Alas, like Icarus flying too close to the sun, we weren't able to complete the game. Our wings (our feeble undergraduate-level skills) were too weak. And the sun was too hot: Creating a game is hard, creating programming environments is hard, and creating a seamless experience between the two is hard.

I'm sad to say that we gave up shortly after enabling users to spawn penises.

Chapter 1: The Research Prototype

About 6 years later, in graduate school, I was doing my Ph.D. research at the University of California, San Diego. My labmate Sarah Esper (now Sarah Guthals) and I were discussing educational coding environments. The idea of programmable games resurfaced. We both agreed that the metaphor of magic was a compelling one. And so, CodeSpells was born.

You can still find the old source code on my github. It probably doesn't run anymore -- except maybe on an ancient version of the Unity game engine.

But it served its purpose as a research tool for investigating how novice coders learn programming in the context of immersive fantasy games. The papers we published on the topic are forever part of the scientific literature and can be found in the ACM's Digital Library.

The game contained one level -- a small village popluated by "gnomes." I couldn't find free 3D gnome models, so being a starving grad student, I opted for the most gnome-like thing I could find that happened to be free. The results were aesthetically questionable.

A creepy gnome. It cost me nothing. The nightmares came for free.

Here's one that watches you while you swim in the pond.

Here's one with bandaids on its face. Don't let it distract you from the spell inventory and minimap on the right.

Oh, and here's the gnome village. Notice the familiar cottages which I ported from my undergraduate prototype.

The coding runtime was the Java runtime, so the natural thing to do was to have player code in the Java language. We justified this in our research papers by saying that "Java is an industry standard language." But I wasn't convinced then, nor am I now.

There's just something a bit lame about booting up an immersive fantasy game and being confronted by the syntax of a well-known programming language. Why do the people of this fantasy world write their spells in Java? Did Sun Microsystems invent magic? Tolkien would not have approved of our lackluster worldbuilding.

The one thing I did like was that the in-game documentation took the form of a spellbook out of which you could copy spells and edit them in game.

(soap box)

I've always felt that too much time gets spent "making coding fun." We should be making documentation fun instead.

Not to toot my own horn, but these docs do look a lot more fun than anything I've come across in the professional world. (You agree; admit it!)

Still, I always felt the game could be better than a Java-centric tool for exploring how kids learn Java in a world full of scary gnomes who use Java magic. And one day, it happened.

Chapter 2: The Kickstarter Prototype

I contacted my long-time friend, Adrian Lopez-Mobilia, who had worked with me on the undergrad prototype (the one with the penises). In the intervening years, he had become a skilled indie game developer. He brought his long-time friend and environment artist, Jason Rosenstock.

The three of us built yet another CodeSpells prototype from the ground up -- this time in Unity3D. We decided the spells would be written not with Java, but with JavaScript, and that we would use Blockly to give the player less of a "Umm, why are spells crafted with the same language as websites?" experience. It sort of worked. Blockly does have more of a mystical "mouthfeel" than Java or JavaScript. Tolkien still would have hated it -- a thought that keeps me up at night to this day -- and which I want to fix in the next iteration of CodeSpells.

We used this prototype to create a compelling Kickstarter campaign and received $164,000 in funding. After subtracting Kickstarter's 5% fee and the 5% payment processing fee, this was sufficient to support 4 people (2 developers, 1 artist, and 1 marketing / social media person) for 2 years. (I know $164K sounds like a lot, but I'll let you do the math to figure out whether any of us were making anywhere near a living wage.)

A wizard summoning a storm.

Epic creatures. For a while I had a full-sized poster of this hanging in my bedroom.

Jason was obsessed with rocks and architecture, which shows through in-game.

This was a concept for a wizard "home base" -- a small haven where you go when you're not exploring procedurally generated worlds.

Wizards at night. The day/night cycle in the game is one of the most magical parts of the whole experience.

Three wizards crafting spells upon a cliff.

A wizard with a pet croaker.

An unimplemented concept piece for a symbiotic "creature system" that was part-wolf, part-crow.

The game had some initial success on Steam, but it was short lived.

To this day, the game is on Steam. You can manipulate the terrain heightmap, create running water, shoot colored fireballs, and apply forces to physical objects like rocks. And you can explore a procedural 3D world that is truly breathtaking.

After two years of steady but slow progress, there was no money left, and Adrian and Jason wisely found other jobs (Adrian went to Google and Jason went to Avalanche Studios).

The legacy the three of us left behind still inspires me to this day.

Wizard with a Croaker.

A wizard in front of a "Wizard Soccer" goal (part of the multiplayer experience).

A wizard traversing the procedural world and coming upon one of the many strange artifacts left over from a previous civilization.

A wizard at dawn.

A wizard at dusk.

A spell written in Blockly.

A spell being constructed in Blockly.

As for me, I run a company called ThoughtSTEM with a non-profit branch called MetaCoders. We have many other products (e.g. LearnToMod, coding after-school programs and summer camps). Of all of them, CodeSpells has paradoxically:

  1. always had the highest cool-factor,
  2. always been on the cutting edge of coding environments, coding education, and codable games, yet
  3. always generated the smallest revenue

Since circa 2018, I've had almost no resources to put into further development. I've received thousands of emails over the years, asking if there will ever be movement on the project. I've always responded with something vague, like: "Yes. I think so. Someday."

And then... there was COVID-19.

(yep, it's official)

CodeSpells is back. A project 13 years in the making.

Chapter 3: The Post-Pandemic CodeSpells

Stay tuned...

- Stephen R. Foster

P.S. Please consider supporting us on Patreon. We can't do this without you!