A digital collectible card game built with Unity that simulates the physical card game mechanics of Kards, a popular World-War II-style strategy card game. It is a turn-based game where players deploy units to the battlefield, use abilities, and attack opponents to win.
Kardx is a turn-based card game where players deploy units to the battlefield, use abilities, and attack opponents to win. The game features:
- A data-driven card system
- Ability-based gameplay mechanics
- Battlefield positioning strategy
- Hand and resource management
For developers who want to understand the project better:
- Architecture - Overview and design principles of the game's architecture
- Data System Design - Data structures, demonstrates how to make model-view-controller (MVC) game design
- Ability System Design - How card abilities work, demonstrates how to make data-driven system design
- Unity 6 (v6000.0.41f1) - Download from Unity Hub
- Basic understanding of C# language and Unity concepts
Install these packages to work with the project:
-
Windsurf Integration
- Install from Git URL:
https://github.com/Asuta/com.unity.ide.windsurf.git
- Windsurf offers better performance than Cursor IDE
- Install from Git URL:
-
DOTween
- This is a Unity package for animation, required in this project.
-
Unity Extension
- It is strongly recommended to install the Unity extension for VSCode in Windsurf. Since it did not release as open-vsx, you should look for this extension (and also C# and C# DevKit) in VSCode (version later than 1.96) and download it as vsx file and then manually install in Windsurf.
-
NewtonSoft JSON
- Add from Package Manager:
com.unity.nuget.newtonsoft-json
- Used for JSON serialization/deserialization
- Add from Package Manager:
C# code is formatted with the C# extension installed with Unity extension. It's recommended to enable Format On Save in the configuration.
All code and assets are organized in the Assets
folder:
-
Assets/Scripts/Core
- Core game logic- Card, Player, Board, and Ability classes
/Acting
- Ability system implementation (card effects and triggers)/Planning
- Strategy planning logic of opponent, for both AI and remote players/AI
- AI logic for the opponent (to be implemented)
-
Assets/Scripts/UI
- User interface components/Components
- connected to Unity UI elements/Scenes
- connected to Unity Scenes, the most important one isMatchView
Assets/Sprites
- Static game spritesAssets/Resources
- Dynamically loaded art (card faces, etc.)Assets/StreamingAssets
- JSON data files (CardTypes, AbilityTypes)
A utility editor tool to help locate GameObjects with missing script references in your scene.
Usage:
- Go to the Unity menu and select
Tools > Find Missing Scripts
- In the window that appears, you can:
- Click "Find Missing Scripts in Scene" to scan the entire scene
- Click "Find Missing Scripts in Selected GameObjects" to scan only selected objects
- Results will be logged to the Unity Console, showing which GameObjects have missing script references
This tool is particularly helpful when you encounter the "The referenced script (Unknown) on this Behaviour is missing!" error, which doesn't provide location information.
- Read the design documents before making changes
- The game uses a data-driven approach - many game elements are defined in JSON
- Check the
CardLoader.cs
andAbilityType.cs
files to understand how data is loaded - Use the Unity Console to debug issues during gameplay
This project is licensed under the MIT license.