How to handle JS for cards with different fronts *and* backs?

Game development with Board Game Arena Studio
Post Reply
User avatar
panyakali
Posts: 15
Joined: 11 May 2020, 15:59

How to handle JS for cards with different fronts *and* backs?

Post by panyakali »

Hi devs,

I'm currently working on a card game where there's important info present not only on the fronts, but also the backs of cards. Is there an easy to associate both a front *and* a back image to the same card id using the bga stock package and then be able to easily access either when passing a card_id or type_arg from the BGA Deck components on the serverside?

Thanks,
Collin
User avatar
paramesis
Posts: 398
Joined: 28 April 2020, 05:00

Re: How to handle JS for cards with different fronts *and* backs?

Post by paramesis »

If the information on the back of the card would be known by someone familiar with the game, you could maybe get away with putting the card-back image in a tooltip that you tack on to the stock item when it is created (See BGA Guidelines for Tooltips)

Otherwise, you could override the CSS on the stock item(s) to replace the background-image whenever a user would need to see the back of a card. You would need to have the same arrangement and alignment of your front and back card sprites.
Post Reply

Return to “Developers”