Make your own magic in wizard sim CodeSpell

Special report 1

In their formative years, Stephen Foster, Adrian Lopez-Mobilia, and Jason Rosenstock were archetypal fantasy enthusiasts, with a penchant for wizardry. Yet the portrayal of spellcasting in videogames fell short of their expectations. It was, and still is, too restrictive in their eyes. Too many practical considerations block player creativity. CodeSpells, the trio’s debut project, aims to change this by letting you code your own infinite number of spells within the game’s openworld sandbox.

“When it comes to spells, most RPGs nowadays either give you something that shields you in a radius, or a projectile,” says Lopez-Mobilia. “It doesn’t really feel like you’re gaining anything particularly creative with it. Our main goal is to create a world that incorporates systems that you want to play with, that are not static, and contain all of this stuff that feels like it exists without you.”

In 2012, Foster co-founded ThoughtSTEM—a tutoring service that aimed to teach kids about computer science. CodeSpells, the team’s debut venture, formed part of Foster’s doctorate research which was eventually showcased to local elementary schools, demonstrating the virtues and basic principles of coding to eager and impressionable audiences. While it worked well in this capacity, Foster had grander plans.

Fast forward three years and CodeSpells has evolved into a much larger beast. It’s been re-written from scratch by Lopez-Mobilia and Rosenstock—both former university peers of Foster—and aims to capture a far wider audience. By teaching players how to code their own spells, by giving them the means to manipulate their world around them, Foster and co aim to revolutionise videogame spellcasting entirely.

Special report 2

“Wizards tend to just have this list of spells,” says Rosenstock. “My reaction to this has always been: man, I want to make up my own fireball spell, I don’t want to use the generic fireball anymore, you know? ...we want the wizard to feel like more of an artist, not just someone who memorises spells. There’s this idea of seeing a wizard as a scientist—as someone who learns about the world in order to influence it, instead of someone who can make something—like a fireball, for example—out of his hands.”

Using a piece of software called Blockly, CodeSpells invites you to create code by dropping and dragging little tiles. The software can generate JavaScript, Python, PHP or Dart code and includes step-by-step execution for tracing and debugging. Using it, players can craft an effectively infinite number of possible spells.

In its current state, CodeSpells offers players Creative Mode—an expansive space wherein you can juggle the elements of earth, air, fire and water in pursuit of compiling the perfect personal spellbook. Earth spells, for example, enable you to adjust the world as you see fit, growing mountains and valleys at will, sculpting the landscape to suit your imagination.

Water spells enable you to submerge entire plains or shift otherwise unmovable objects such as rocks or fallen trees. To break from the ‘generic fireball’, as Rosenstock suggests, you may wish to use fire spells to rain an inferno over an area you wish cleared, or, even better, run a river of molten lava through it. Trial and error via the coding interface is the best way to discover just how much you can do.

Next May will bring cooperative and competitive game modes, as well as wildlife, to the sandbox. By then, text-based input via JavaScript will also be offered to prospective programmers, adding an extra educational layer.

What sets CodeSpells apart from other games that allow players to implement their own code is choice and scale. It’s not a directed experience, thus trial and error plays a key part in understanding how it all works. With multiplayer implementation around the corner, one development which has surprised and pleased the team in equal measure is the growing number of players who have begun to shoehorn sports into the open world.

“We want to spark the players’ imagination by placing things that mess with the preconceived systems a little bit,” says Foster. “Enough to get you thinking within the world. I spend hours just trying to make the perfect thing to pick up and throw exactly where I want it, because I’m trying to play golf in the game.”

He adds, “we don’t necessarily want to make CodeSpells a game where people are constantly throwing fireballs at each other, we want people to actually have fun. I think sports will be a part of that. ...that’s part of the beauty of the idea, that it’s impossible to think of all the possibilities.” The latter is something that has adversely affected CodeSpells’ development behind the scenes, yet it’s still a welcomed phenomenon. In a world of indefinite properties, it seems fitting that the entire process—for both players and the development team—is foreign ground.

“There’s been a few times where we’ve had to rethink things within the world,” says Foster. “The hope has always been that this would happen but it’s surprising that it’s happening so early.”

“Anything that feels like it breaks the systems of the world doesn’t feel like a bug, but like a natural occurrence,” adds Lopez-Mobilia. “The ideal scenario is that it gets to the point where anything you can do to break the game becomes a part of the game.”