This framework is meant to provide well designed, statically typed, and fully commented classes and scenes which you can plug into any potential card game to handle typical behaviour expected from cards in a game in a polished manner.
Pull requests are more than welcome ;)
All of the above while being very easily extensible to your own game's special requirements through simple dictionaries.
The classes provide some easy customization options, such as the card size, how the card move, where they appear etc.
Check the Behaviour Constants of CFConst.gd
for detailed information on what each does.
For more fine-tuned customization than that, you'll need to modify the code manually
This Framework has been designed with the idea that it can easily be upgraded to receive new features. Look at the Upgrade section within the Install guide for more info.
Most of the card manipulation functionalities work without any extra work, as long as the relevant scenes have been setup correctly (see Installation). For example, the code which handles moving cards around or focusing on them etc should work out of the box.
However some effects require some trigger, such as targeting of cards etc. The method calls to perform these are available to use and some demo functions have been provided to understand how it works, but it is expected that each game will provide their own logic in their own scripts to call the relevant methods.
You can find documentation about all the provided methods in the wiki
Hover over the card to reveal its manipulation buttons.
Right-click and hold on a a card to begin dragging a targeting arrow. Release right-click on top of a card to target it.
Click on the "Enable Attachment" toggle to make all cards act as attachments and therefore allow them to attach to others.
Click on either the 'T' or '@' buttons. Click again the same button to revert to 0 degrees.
Click on the 'O' Button, to start adding one of four random tokens to the card.
Click on the +/- buttons next to each Token to add/remove that token specifically
Click on the 'F' button to exchange between these two states
The demonstration board has been setup with two different grid placements you can use. Try drag & dropping a card to either "PlacementGridDemo" or "This Grid has a modified label".
The first four cards you will draw from your deck each have different prepared automations. Their text explains these effects.
You can double click any of them in the hand or board to see their scripts in action.
Some of them have also effects that trigger off of other effects.
Mind that their script effect change, depending on whether they're in the hand or board, so make sure you move them to the board first if you want to see those scripts in action.
Please see the Install Guide
One of the most powerful features of this framework, is the possibility to easily script each individual card's abilities from start to finish, so that a player only needs to double-click on a card and your code will handle the proper execution. This allows games to very easily create complete rules enforcement of all card abilities, from the simplest to the most tricky ones.
Please see the [ScriptingEngine](SCRIPTING_ENGINE] and ScriptDefinitions documentation for more details.
The game comes with some sample scripted cards which can be found under res://src/custom/cards/sets
.
You can join us on Matrix (https://matrix.to/#/!UdtRNwYEDJcLdQigxS:matrix.org) or Discord (https://discord.gg/AjZMFY7jD4)
Please see the Contribution Guide
If you wish to support the development of the Card Game Framework, consider becoming a patron via liberapay
Some initial ideas were taken from this excellent Godot Card Game Tutorial video series. This framework uses some of the concepts but also attempts to create better quality code in the process.
This software is licensed undel AGPL3. However an addendum has been added to allow distribution via Steam and integration with Steamworks SDK.