Skip to content
/ UiCard Public

Generic UI for card games like Hearthstone, Magic Arena and Slay the Spire...

License

Notifications You must be signed in to change notification settings

ycarowr/UiCard

Repository files navigation

Unity Version version Twitter

Generic UI for card games like Hearthstone, Magic Arena and Slay the Spire, etc

Here are some images that illustrate what the repository contains and a decription of the content.

For a playable version access itch.io page.

Draw Card Hover Card
Play Card Angle Positioning
Card Spacing Hover Enemy Card

The repository has the main elements of an user interface for a card game like Magic Arena, Hearthstone, Slay the Spire etc. It's made in Unity3D and might be a good "starting point" for games such as the mentioned titles.

Currently, you can:

  1. Draw cards
  2. Drag cards
  3. Put cards back in the hand dropping onto the "Hand Zone" (green area);
  4. Play/Discard cards dropping onto the "Play Card Zone" (orange area);
  5. Hover/zoom in cards on the player's hand;
  6. Check cards from the enemy's hand
  7. As an additional content, I've added to the demo parameters to configure the layout the way you game designer want. It can be done by enabling the checkbox named "configs", on the top-left side of the screen.

The following parameters can be changed:

  1. Card spacing;
  2. Card rotation angle;
  3. Card height (position on Y-axis) relative to the bent angle on item 2;
  4. Card hovered size: how much a card shrinks or grows when hovered;
  5. Card hovered rotation: whether it changes or not;
  6. Card hovered height: how much a card moves up (Y-axis) when hovered;
  7. Card hovered speed: moving speed of the card when hovered;
  8. Position or pivot of the Hand: move it up and down;
  9. Drop Zone's positions: move them up and down;
  10. Disabled card Transparency (alpha): how much a disabled card "fades".
  11. Motion speed: scale, movement and rotation.

Limitations:

  1. The interface is using 2D colliders, that way, the objects are not fully compatible with a 3D game;
  2. Memory heavy, each card has a state machine with a few states inside, in a limited environment, or overtime it is definitely a issue;
  3. ...

Thank you, any feedback is appreciated.

Illustations by: Tyler Warren https://tylerjwarren.itch.io/free-tyler-warren-rpg-battlers-favorites-30

---------------------- MIT License ----------------------

Copyright 2019 Ycarowr

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.