On this page, I'd like to demonstrate what making a game in Cardgine is like before you have a chance to try it yourself. It is coming to Steam this winter. As you'll see on this page, any game made in Cardgine can be played in the browser, together with your friends. Before seeing how it was made, feel free to play a round or two of Solitaire.
How was Solitaire made in Cardgine?
1 List card suits and ranks
2 Define shared properties of cards
You can also have multiple "classes" of cards. And they don't actually have to represent cards — they can be board game pieces (see chess) or other visual elements.
3 Generate all 52 cards as suits × ranks
No need to list them individually. Card designs are loaded from PNG images placed in the project's asset folder.
4 Set up the tabletop layout
5 Write the game rules in CardScript
Scripting is currently required to describe how the game flows and CardScript is a tailor-made language to describe tabletop game actions in the simplest possible way. If you aren't comfortable with scripting, no worries, any AI assistant will be able to help.
This is only the main body of the script, the rest resides in the custom functions. The entire Solitaire game takes just 127 lines of code.
Cardgine is primarily made for online multiplayer games
You can play the game you're working on with friends right from the Cardgine editor. Select "Launch online game" to get a shareable link, and your friends can join from their browser, without installing anything.
You can also playtest a multiplayer game by yourself by taking control of all players. Try it out in the next demo:
If you'd like to know how this game was made, you can watch the 20-minute-long full walkthrough I made, on YouTube.
A complete game in CardScript
The trailer shows the full script of a game I invented with the goal of making it as simple as possible while still letting players make meaningful choices. The goal of this game is to get rid of all your cards first. Players take turns and on each turn, the player discards one card (any) from their hand. But unless it matches the top card's suit or rank, they have to draw two other cards immediately. The main body of this game's script is:
all_cards -> drawing_stock
drawing_stock shuffle!
# Deal cards
foreach player p in active_players:
drawing_stock topmost 4 -> p hand
drawing_stock top -> discard_pile
# Game loop
player current_player := first_of active_players
while not any_player_won:
current_player play!
current_player := active_player_after current_player
Hover over any individual line for a full explanation.
play! is a user-defined player function, which reads:
choose Card c from hand
boolean match := (
c suit == discard_pile top suit or
c rank == discard_pile top rank
)
c -> discard_pile
if not match:
drawing_stock topmost 2 -> hand
if hand is_empty:
win!
That is all it takes to implement this fully working game. Try playing it and let me know if it's any good:
Disclaimer: Cardgine currently does not support playing versus the computer. I've just made this demo for this page.
An obvious next feature would be to draw cards through a custom draw function that also checks if the drawing stock ran out and reshuffles the discard pile into it. Do you think you could write it?
Coming soon to
Wishlist on Steam