Godot Card Game Framework

About

The Card Game Framework is a Godot library that one can plug into their Godot game to provide enough features to create a card game using full rules enforcement. The source code can be found on github

It has been designed from the ground up using my extensive experience designing card games and card game definitions on OCTGN. It has been built with the purpose of providing pre-built methods for handling all the functionality required by any typical card game

Since it is also Free/Libre Software licensed under the AGPL v3, it also allows anyone to modify and build upon it with no limitations. However if one follows the design approach expected, it enables anyone to create card games while allowing them to upgrade the Framework without impacting their customizations.

As I’m a big proponent of automation in computer card games, the Godot Card Game Framework comes with a powerful Scripting Engine which can enable complete rules enforcement for any game. Not only that, but the Scripting Engine has been written in such a way that it can be extended by card games, while still allowing the Framework to be upgraded to newer versions.

While a lot of effort has been put into making the usage of this framework as easy as possible, creating a game with it will still require some familiarity with coding and godot itself.

Features

Some of the features that should be of most interest to developers:

  • Extensive Documentation
  • Complete card text and rules enforcement capacity, via provided Scripting Engine!
  • Tween & GDScript-based animations that look good for card movements.
  • Customizable card highlights
  • Choice between Oval or Straight hand shape
  • Automatic focus-in on cards when moused over in-hand.
  • Drag & Drop of cards on table and between containers
  • Supports having multiple hands and piles.
  • Cards can attach to other cards and move together as a group.
  • Cards can target other cards with a draggable arrow
  • Can add tokens on cards. Tokens expand in the own drawer for more info.
  • Ability to define cards in standard json
  • Supports resizing the window, in all stretch modes (including disabled stretch)
  • Automatic and manual Grid-based, or Free-form placement on the board, or a combination of both, on a per-card-type basis.
  • Simple but powerful Deckbuilder

Check the full list of features in the readme.

Quick Start

A quickstart guide has been created which will take you step-by-step on creating a new game and creating your first custom card.

Discussion

Join our discord channel