Open-sourced Single-player Deck-builder

MaaackMaaack Posts: 2Member
edited October 16 in Resources

Hello Godot community,

I’m releasing my first (non-prototype) game to the public today! Battle Deck Energy: Premature Release is a single-player deck-builder about battling waves of bullies and recovering your self-confidence.

The code is all free and I want to highlight parts of it.

MVC Pattern
For the Model, I extend Resource as CharacterData (for example), and export most of the variables. For the Control, I make a CharacterManager (or other Manager) extending from either a Node or Node2D, depending on whether I need 2D position data. The CharacterManager usually has a reference to the CharacterData. My rule of dividing functionality was: “Data can relate to other Datas; Managers can relate to other Datas or Managers, and send signals.”

The View is accomplished through the BattleInterface and CharacterInterface layers extending Control and Node2D nodes. Managers send signals that add to the animation queue in the PlayerInterface. Character status updates are sent as snapshots of the Data, with accompanying delta. Parser
The Credits scene automatically updates from the file. It parses the Markdown format for headers and links, and converts it to bbcode.

In order to work with builds, will have to be included with packaged versions. Alternatively, adding the tool keyword to the top of will cause it to reload the text in the editor, and then you can save the new text in the scene. However, this will cause the text to scroll as well, and you might not want to save that update to the scene :-P.

Hand Manager
It fans out the cards with some math. Sends a signal when a card’s position needs updating. Should be pretty easy to tweak and reuse for other card games.

Feel free to reach out to me with any questions, comments, or suggestions.

Tags :
Sign In or Register to comment.