Posted March 06, 2025 by Josephkhland
#devlog #deckbuilding #image-recognition #doodle-card-game #drawing #tactical #multiplayer #early progress report #party-game
Hello everyone,
It's nice to meet you and welcome to my new Devlog. Through this post and the ones to follow, I am planning to record my process in implementing a multiplayer party game that blends doodling, deckbuilding and tactical combat. This idea draws inspiration from games like: Cardhunter, Drawful, Slay the Spire and Jackbox. For now, let's calle this project Doodle Card Game
What I want to achieve with this game is a fun activity where players can draw their cards on the spot and then face-off against one another. I remember during my childhood at school, there was this game that we played sometimes. Each of us would draw a stickman figure on a paper and then we would take turns adding stuff on the paper, describing our stickmans moves and how they are fighting each other. You'd say, no way that's any fun. In the end, whoever plays gets the upper hand by introducing something that beats up everything else... or at least that's how most of these games ended up. It's hard to make sure that games like these remain fair, the power balance is abstract and usually it's only fun because the process itself is fun.
So how will Doodle Card Game work?
The idea for Doodle Card Game is that players will be able to create their own cards. Drawing whatever they can imagine upon their canvas, the game then reads the image and defines the card's stats and effects. Then you add these cards to your deck and you have to fight with them.
So you want an explosive build where you can burn down your enemies? Perhaps you can try drawing flames and explosions. You notice everyone else relying on speed and mobility? Time to draw some shackles or some ice to help you slow them down.
As I am writing this Devlog, I have already started working on this for a few days. As part of the progress I've made, I have made a draft of the main game loop for a player match.
(1) Preparation Phase: As a game begins, all participating players are given a blank canvas and they are required to draw 6 doodles. To create each doodle, they are given 30 seconds (or more if tweaked through the game's settings). From each doodle, a card is generated, using the doodle itself as card art. The card's effects and parameters are automatically defined based on what is depicted on the doodle. The cards generated remain hidden until the next phase.
(2) Review Phase: Each player gets to see the results of his doodling. Not all the effects are revealed, but for each card an element is revealed. At this phase, the player has to give names to each of his cards and select an energy cost. After doing so, the full card details are revealed. A card's power scales according to the energy cost.
(3) Battle Phase I: This phase is played in rounds. Each player is placed upon a tactical grid and a player is randomly selected to go first. During their turn, a player draws cards and plays cards. Everything they need to do must be done through their cards. This includes moving around the grid, attacking, casting spells, blocking damage, applying buffs/debuffs, healing, summoning combatants to assist them and applying terrain effects. The Battle Phase ends when the winner(s) is decided. The rules for that vary depending on the Battle Phase Mode.
Battle Phase Modes:
(a) Free-for-all: The Winner is the last man standing.
(b) Team Battle: The Winners are all the players of the last team standing.
(c) Victory Points: Ending your turn on specific highlighted areas grants you a victory point. Killing another player grants you Victory Points. The first player to reach a specified threshold is named the Winner.
(d) Team Victory Points: Similar to Victory Points but with Teams.
(f) Survival: The ones remaining alive after X rounds are named Winners. Potentially waves of computer controlled combatants spawn each round. (g) Boss Challenge: All players are considered Winners when the boss is defeated. Mode also ends if all players are defeated.
And potentially more...
(4) Progression Phase I: Wrapping up the Battle Phase the Winners are awarded with points and each player gets to make a choice for their progression. The choices are usually restricted to 3 each time and they might include any of the following:
(5) Battle Phase II: Following the progression phase, a new Battle phase begins. This time a new mode is selected and the players get to battle once more. The winners of this battle phase earn double the points than the winners of the previous one.
(6) Progression Phase II: Similar to Progression Phase I, but more options might be available like:
(7) Battle Phase III: For the last time, the players get to battle. A new mode is selected once again. The winners of this battle earn triple the points in the first round.
(8) Wrap-up Phase: The player with the most points is crowned as the winner. In case of a draw, a Sudden-Death Phase is optionally available. If sudden death is not selected (or it is deactivated from the game's settings), then the game ends. The deck of the winner is stored at the Hall of Fame. Then everyone votes for their top 3 favorite cards across all decks. The cards with the most votes are saved in the Hall of Fame as "Notable Contributions"
(9) Sudden-Death Phase: All players that weren't in the top spot are eliminated and their cards are drafted by the remaining players. Then a free-for-all battle phase begins.
(10) Wrap-up Phase. The winner of the Sudden-death phase is crowned the winner and the Wrap-up Phase continues as mentioned.
The number of Battle-Phases can be configured from the game settings to allow for longer or shorter games. Potentially cards in the Hall of Fame could be reused in later games and that's pretty much the game loop.
Sounds spectacular so far, but how does this really work?
For a prototype of this concept I am Godot in order to implement the gameplay and all the user interfacing. Additionally, I am using CLIP model from Hugging Face transformers hooked upon a Python Flask server for image recognition.
(1) Image Creation: The player can just create an image by applying colours to a specific node in a Canvas Layer. They can pick their colours and choose their brush size. Upon completing their art they can click on a done button.
(2) Image Recognition: As the art for a card is created in Godot, it gets saved as a file and then the image data is sent over to the Python Server for Image Recognition. The python server tries to define 10 keywords that are related to what it recognises on the image and scores them accordingly before sending the reply back to the game (client).
(3) Keywords Processing: From this point on, the game uses the received dictionary in order to generate cards. The words received have their scores normalized and then they are separated to a list of strong words and weak words by using a threshold. Then each list is once again normalized and some of the strong words might be reassigned as weak words, while some weak words might be removed entirely.
(4) Card Generation: They keywords remaining provide their votes towards some card generation parameters such as Element, Card Action Type (Attack, Block, Move, Spell, Curse etc) , Target Type (Self, Single, N_Selection, Area), Move Type (Normal, Unhindered, Teleport) etc. Strong Keywords have more votes towards the identity of the card like Element and Card Action Type. Weak keywords have more votes towards other parameters. Depending on the voted Element and Card Action Type, we pick a Card Effect Template and then apply the remaining voted parameters (at least those that still apply - some of the parameters might go unused). The player will still have to give the card a name and they can also choose its Energy cost (from 0 to 4). Each card effect scales in some way according to the Energy cost.
(5) The game stores the generated cards and the player can use them during the game. Each Card Effect Template has its own preprogrammed behaviour which is tuned further by the several variables inside it.
I am in the process of designing and generating the Card Generation algorithms but once I am done with that I will move towards creating the player controls and the tactical combat aspect of the game. Then I should be moving to try out the game in single-player using some simple dummy targets, before proceeding to the Multiplayer aspect.
I definitely have a lot to consider regarding the deployment of such a game. The image recognition itself is pretty lightweight so if I could integrate it within Godot it would be great and it would make the game easier to deploy. If that proves too hard, it will just stay as a service alongside the server that I will set up to handle online multiplayer.
Thank you for reading!
If you are interested to find out more feel free to contact me or just leave a comment. I am still undecided on whether I should make the source code public or not, but I will decide upon that at some point.
Josephkhland