Fantasy CardGame using AI imagery

I have been totally amazed by the development of AI image generation systems like Stable diffusion and Dall-e, so naturally I was looking for some fun project where I could leverage this new technology. Being a nerd I thought of making a fantasy card-game, something that needs lots of various images.

In my prevoius post I described the practicalities of installing stable diffusion and using it. This post will be more about how to apply it in a practical application.

I settled on the idea of making a casual, fantasy game on a standard 55-card deck. I had to make the ruleset fairly simplistic to make it work with only a single deck. To make the game interesting and engaging, I focused on creating synergies between the cards aswell as many tradeoffs in their abilities. image-1


I made most artworks using text2img in Stable diffusion. For some more complex compositions I had to resort to photo-bashing and img2img. For instance, getting stable diffusion to draw a bow and arrow seems like an impossibility. But img2img is an extremly powerful tool. If text2img does not give you the result you're looking for it can certainly be found using some a few iterations with img2img. I used DALL-e and midjourney for some images but their free tier is limited.


For upscaling i used mostly BSRGAN. It is a bit smoothing but produces overall nice results. I also used ESRGAN that can produce a nice β€œpainted”-look, but it can be a bit too much sometimes.


Frame generationπŸ”—

I wanted to make the frame of each card both interesting and unique but still with minimal manual work. To get the layout just right I drew a rough sketch on my tablet. To get some nice variation I ran it through stablediffusion img2img with a relatively high denoising strength and just bumped up batch size and count to max and let it run for a while. I then just cherry-picked the ones I found interesting.


Histogram MatchingπŸ”—

Finally I wanted the frame to complement the artwork making the whole card blend together. The generated frames are nice and all but the colors and contrasts to match. For this process i also wanted to avoid tedious manual work, so I used a script to make the frame match the color histogram of the artwork. This is script for imagemagick found here.



To make the actual cards I used cardmaker I found it really useful. You can easily create a layout and generate multiple cards and separate the text data into a spreadsheet for an efficient workflow. Creating a new card will be as simple as adding another line to the spreadsheet. There are also some nice features with inline images and text formatting.



Finally, to print the cards I used The leadtime was short, quality good, and they don't have any minimum order quantity. Ideal for prototyping. They have several options for packaging but as these tend to be expensive for low volumes I opted for having the cards shrinkwrapped.

Card BackπŸ”—

To make a reference to Stable diffusion I called the game "World of diffusion". I struggled a lot to come up with a cardback that I liked. Since this artwork is printed 55 times the pressure is equally multiplied. The outcome ended up looking a bit grim and is something a might revisit if I make another iteration.


Demo PageπŸ”—

The final result can be seen here. I have put up a galley page with most of the card-game deck.