Under Pressure - Devlog #3: Card System


๐Ÿ“ข Go play Under Pressure for free on Itch.io and Steam! ๐Ÿ“ข

I am working on visuals improvements for next update! Check it on my socials!

In this devlog I am gonna talk about how I develop my system for Card management. In this card game I needed to have a system to handle several parameters on each card, including position, rotation, visibility, smooth animation.

There are two main objects: Card and Deck. A Card is always parented to a Deck. The deck is a container of Cards that layout them in a custom order, position and rotation.

There is an initial state in the game, always the same. That guarantee all cards have an initial parent:

  • Card #0 is already played on Board
  • Card #1 #2 #3 #42 are in Diver's hand
  • All others are in one of three Decks 4-14 / 15-28 / 29/41

There is five different Deck type in the Game. All of them implement the AbstractDeck.


An AbsractDeck has simply three methods.


When a card is added to a Deck this is executed:

  1. Parent to new Deck
  2. Update new Deck's cards positions (including new Card)
  3. Update old Deck's cards positions too

This way I had great control on all behavior custom to each Decks.

Each UpdateCardsPositions is overridden for each deck.

  • HandDeck need to display all player's cards facing in order, in a hand's way
  • PickDeck are piling up, with their back facing
  • BoardDeck display six cards per row with an offset between them
  • HideDeck hide cards when there are used as Boost

Each card animations is made with LeanTween, keeping it's animation id and stopped if a new one occur.



Support our games!

๐Ÿ™ You can help us by giving with Itch.io's Support feature! It will really help us to continue making our games. Or buy our first game "The Bastonnes" on Steam

For now, we are working on Under Pressure's updates and we start working on the next projects. If you want to get the latest news, follow us on Twitter, Instagram or join our Discord server!


Files

UnderPressure_Web.zip Play in browser
Jul 24, 2023
UnderPressure_PC.zip 104 MB
Jul 24, 2023

Get Under Pressure

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.