Coder Social home page Coder Social logo

braindeadbzh / godot_card_engine Goto Github PK

View Code? Open in Web Editor NEW
333.0 29.0 45.0 1.29 MB

A plugin for Godot to create card based games

Home Page: https://www.braindead.bzh/

License: MIT License

GDScript 98.61% Smarty 1.39%
godot godot-engine godot-plugin godot-addon card-game

godot_card_engine's Introduction

CardEngine for Godot Engine

Currently under development, do not expect it to work.

Everything is work in progress.

Glossary

  • Card: card data with id, name, categories, values and texts
  • Database: persistent card data storage
  • Container: UI element to display cards in a given layout using a card visual
  • Store: in memory card data storage (deck, pile, hand)
  • Animation: a sequence of values linked together by transition, defined by a duration and an easing curve
  • Effect: modifiers on cards data that can be applied and cancelled at anytime

What is implemented

  • Creating, modifying and deleting databases
  • Creating, modifying and deleting cards
  • Creating, modifying and deleting containers
  • Containers layouting as a grid or along a path
  • Fine tuning containers layout with linear/symmetric interpolation or random position, scale and rotation
  • Container transition animation (layouting, card added, card removed)
  • Container event animation (idle, un/focused, de/activated)
  • Animation editor
  • Drag and drop support
  • Card effects
  • Filters on DropArea
  • Saving store interface
  • Container to container drag and drop
  • Container to card drag and drop
  • Board widget

What is not implemented

  • Manual sorting
  • Drop placeholder
  • Add animation loop when card is focused or active
  • More modifiers to come
  • Other features to be defined...

Important folders

  • _private: contains the generated code and data file, none of this file should be edited manually
  • addons/cardengine: contains the code for the in editor plugin and for the core elements
  • containers: contains the public code for your custom containers
  • cards: contains the public code for your custom cards
  • effects: contains the code for the effects

Documentation

Open page

godot_card_engine's People

Contributors

braindeadbzh avatar edoggr11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot_card_engine's Issues

So it is not possible to use the CardEngine?

So am I to understand that it is not possible to use the CardEngine to create card games? As this would save me a lot of time and coding.

Also, may I suggest 2 separate json files. 1 for all the cards and 1 for the decks. A card collection could grow very, very, very big. Seperating the 2 would make it a little faster.

Does the reworked version still contains a Demo for New Game

Thank you so much for making this engine, as a starter on Godot it really helped me a lot learning from example and some best practices. Thank you so much!

I noticed in the demo, there are three options, library and quit game work and can successfully switch scenes, but New Game does not trigger a scene switch. I am wondering if the card animation part still exist in the latest version of this engine?

Thank you in advance!

Project structure

I think would be cool if you reformatted the project a bit, making the "card engine" folder the main one, the README.md and the LICENSE are not detected by github, because they are not in the main folder, also getting the .gitignore in the main folder, just for the sake of looking more clean and having the readme and the license displayed correctly.

Offtopic; I hope you will continue this project at some point, seems like a really cool project, good job.

Directory structure way to confusing!

It is very hard to tell what files are the engine and what files are the demo. I am not sure what is the engine's directories and files, and what is the demo project's directories and files.

May I suggest creating the project file your self and then using this this structure...

Card_Engine_Demo (project directory)

Structure of "res//" (inside the project directory)
  --the directories and files for the demo (directories and files)
  --addons (directory)
      --card_engine (directory)
         --the directories and files inside of the card engine only (directories and files)

This will clearly define what is what.

Splitting demo from add-on

Can you split the game demo from the add-on using git sub-modules? I can't use your add-on as a sub-module of my game I need to download the entire repo and get the add-on source code from the demo and add on my game.

plugin_main.gd problem

I follow the setup step5 but ut said it unable to load script from path res...../card_engine/plugin_main.gd

So I open the code and change
preload("res://addons/card_engine/widgets/widget_card.gd"), to
load("res://addons/card_engine/widgets/widget_card.gd"),

It work fine only menu interfacebut gameplay is broken... anyway how to fix it thank you...

Struggling To Use CardEngine?

Hello,
I am really struggling trying to understand how to use your CardEngine. I have read, reread, and reread all the documentation for the demo and the engine its self. Everything is just way to vague and void of the needed information. It seams like all the documentation is just made as a reminder to you what you did and how you use it and not geared to any other users at all.

The Demo's and the CardEngine's documentation on the website and in the code its self, it not very well done, and it leaves way too much guessing on the user's part on what each thing does and how to use it.. If the Demo would be better documented and it's code better documented showing how each thing relates to the CardEngine its self that might help.

I also do not understand if the CardEngine adds functions for me to call and/or set, die to any good documentation.

Is there any way you can redo the documentation so it is more clear, more defined, to us users?
Also, can you make a YouTube video showing EXACTLY how to use the CardEngine and each and everyone of its features?

Do you have an email address or discord channel to where I can communicate more efficiently with you?

Thank You!!!

How "yield" should be used

I think you did a great job, I'm learning your plug-in code,but I don't understand what yield means.
func delete_effect() -> void:
if yield():
_manager.delete_effect(_fx_list.get_item_metadata(_selected_fx))

and how to use in godot4??I know yield and await basic usage,But I don't understand the method without parameters

No main.tscn in a repo

main.tscn exist in a .gitignore

It's a reason why i can't

"Create a new scene which inherit from "res://addons/card_engine/demo/main.tscn" and set it as the main scene in the project settings"

Does not support Godot 4.0 alpha 15

As Godot is moving to 4.0 in the near future they have updated the api and at this time the card engine needs to go through a refactor to update to the latest version. Are there any plans to do this?

how to play?

how to play the game?
I successfully compile the game in godot 3.2 dev
but found the game totally unplayable.
only can do pickup cards and drop cards, nothing else.

could u give a feature list or road map ?
show what is done an what is in plan.
Anyway , Thank you for sharing this code.

Bug when trying to enable the add-on

When trying to enable the plugin in the Project Settings/extensions panel I got "Impossible de charger le script de l’extension depuis le chemin : « res://addons/cardengine/card_engine.gd ». Cela peut être dû à une erreur de programmation dans ce script.
L'extension « res://addons/cardengine/plugin.cfg » a été désactivée pour prévenir de nouvelles erreures." when trying to enable it in the Project Settings/extensions panel.

This in Godot 3.3.2, Godot 3.4.0 and Godot 3.5.0.

I did put the unzipped add-on directory inside the folder of my project, and I also tried to put the full unzipped directory in the addon directory.
Both were recognized by the "extensions" panel, but both gave the same error when trying to activate them.

Starting errors

After downloading the zip file unzipping it and importing it into the godot engine you get these error messages and im wondering if any of these are relevant errors
No loader found for resource: res://addons/cardengine/card/card_preview.png.
No loader found for resource: res://addons/cardengine/card/card_preview_bg.png.
No loader found for resource: res://addons/cardengine/card/card_preview.png.
scene/resources/resource_format_text.cpp:175 - Couldn't load external resource: res://addons/cardengine/card/card_preview.png
No loader found for resource: res://addons/cardengine/card/card_preview_bg.png.
scene/resources/resource_format_text.cpp:175 - Couldn't load external resource: res://addons/cardengine/card/card_preview_bg.png
editor/editor_node.cpp:3160 - Addon 'godot-plugin-refresher' failed to load. No directory found. Removing from enabled plugins.

Looking forward!

I've been waiting for this for a long time, looking forward to it!!!! Hope to finish the first version of Godot 3.2.2 as soon as possible!

Error when trying to run demo

I have followed your demo tutorial, and it gives me an error when I try to start the project, here is the error.... Parser Error: Identifier not found: DemoGame

Android folder incompatibility

First of all, brilliant work @BraindeadBZH !

Second I saw you didn't enable Android compilation for the project so this feedback might not be useful as of now.

Anyways, from my experience Android won't allow you to read/write from folders starting with underscore "_".

If you try to compile and run your code for Android you'll get issues that are very hard to relate to that cause.

My suggestion: rename _private to just private

I have tried that and it works, best of luck!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.