Coder Social home page Coder Social logo

ycarowr / uicard Goto Github PK

View Code? Open in Web Editor NEW
418.0 15.0 99.0 42.76 MB

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

Home Page: https://ycarowr.itch.io/cardgameui

License: MIT License

C# 81.74% ShaderLab 15.95% HLSL 2.31%
card-games unity csharp card hearthstone magic-the-gathering slaythespire unity3d unity2d tool

uicard's Introduction

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.

uicard's People

Contributors

ycarowr 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

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.