The demo above 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 earlier mentioned titles.

Currently, you can:

  • Draw cards
  • Drag cards 
  • Put cards back in the hand dropping onto the "Hand Zone" (green area);
  • Play/Discard cards dropping onto the "Play Card Zone" (orange area);
  • Hover/zoom in cards on the player's hand;
  • Check cards from the enemy's hand

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: space between cards;
  2. Card rotation angle: rotation relative to the index of the card in the hand (cards on the left bend to left and cards on the right bend to the right);
  3. Card height (position on Y-axis) relative to the bent angle described 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. Motions speeds: scale, movement and rotation.

Without going in details about the implementation, the repository with all the code is here , if you want to have a look.

The credits for the 4 images used in the Demo are given to Tyler Warren free pack and the font used in the demo is manaspace, also free.

License: MIT

Thank you!

Download

Download NowName your own price

Click download now to get access to the following files:

UICard_Demo_v1.unitypackage 2 MB
UiCard_v1.11.unitypackage 2 MB
UiCard_v1.2.unitypackage 2 MB

Leave a comment

Log in with itch.io to leave a comment.