A while ago (in January 2019, yikes), I completed the first version of Magistan, a card game I came up with for a seminar in game design back in my university days. At that point, it was little more than a prototype, really, but it was fun to play with a bunch of friends.
Unfortunately, the pandemic hit a year after and there wasn’t much room to play in person with friends any more, so I couldn’t really improve the game much. Besides, I had other things on my mind, like earning my second Bachelor’s degree.
Still, I kept at it every once in a while and completely overhauled the rules and premise of the game and even found a way to make it playable remotely, or at least without having to touch the same cards as the other players. I even got as far as implementing all the different card designs in a way that would make it possible to use them in a digital version, but still exportable for print if I ever wanted to create another analogue version.

Dormancy
Long story short, life happened and Magistan retreated to the back of my mind for a while until Pokémon TCG Pocket released late last year and rekindled my interest in (digital) card games. Using that inspiration, I set a goal to get the game playable over the holidays, but unfortunately life got in the way again, and I spent them building a website for my late uncle instead.
Fast-forward to another eight months later, and during a board game night with a couple of friends, I busted out the old analogue version, and we gave it a shot with the updated rules. Some things didn’t quite work right, because the old cards can’t accurately map to the new gameplay. On top of that, especially the rewritten rules still need a lot of testing and balancing for everything to truly be fun. Despite that, the round was enough to bring the game back to the forefront of my mind and inspire me to work on it again.
Generating Creatures
When I worked on the first version of the game, I was under pretty tight time constraints and only had the chance to manually piece together the monsters of the game, but I had always thought it would be neat if they could somehow be procedurally generated. So that’s what I started working on.
To warm up, I wrote a little name generator which would combine random syllables to create foreign-sounding, but pronounceable names. With that in place, I could tackle the generation of the creatures themselves.
Monsters in Magistan have an element (fire, earth, air, water) and a level (1 through 9) which determines what traits they can have (for example, some earth monsters can heal others, while some fire monsters are scorching and do damage when they’re hit) and how strong they are.
Assembling Shapes
Each creature consists of a head (or body) shape and a set of eyes at its base, and a number of decorations to make their illustrations more menacing the higher their level is. These decorations are picked at random and then distributed on the body, keeping things somewhat symmetrical for better aesthetics.
To know where along the head decorations can be placed, I prepared each head in Figma and added markers in valid positions. The size of those markers determines the size of decoration, the angle the angle, and so on. All of this is combined into a single SVG for easy recolouring and perhaps even animation in the future.
The system is far from perfect, but it works surprisingly well. In the process, I discovered that SVGs can be nested inside each other, allowing for much easier loading, positioning and transformation. Safari struggles a bit with transform
attributes on nested SVGs (of course), but wrapping them in a group and setting the attribute on that proved a viable workaround.
Queue the Magistani
With everything in place, I can now generate many, many different variations of creatures—no “AI” needed. The only issue I have, really, is that most of them just are too cute to be called monsters. 😅
That’s why henceforth they shall be known as Magistani, the (mostly) innocent dwellers of Magistan, which are only responding violently because they are being forced to by a greater evil.
They’ve brought me so much childish joy over the past week, it almost seems wasteful to just use them for my card game. Perhaps they’re the mascot I never thought I needed.

Further Evolution
With this generation system in place, I now want to introduce a concept of growth and evolution into the Magistani. They can have a “splitting” trait that causes them to split into weaker versions of themselves upon defeat, and it would be nice if the generator could create the matching lower level Magistani. Also, I think it could be a lot of fun to have a unique Magistani for each player which is generated based on their name and could grow alongside their character…there are so many possibilities.
For now, it was just fun building this generator and seeing it work—and I’m fully aware that all this is just procrastination, because I still need to come up with a good code architecture to map arbitrary card effects into something the digital version of the game can understand.
Perhaps eventually I’ll have a playable version for all of you…until then, have some more Magistani. 😉

As always, thank you for reading! Feel free to reach out on Mastodon if you have questions about or ideas for the Magistani.