having trouble creating a second deck

Game development with Board Game Arena Studio
Post Reply
emily_nicole
Posts: 8
Joined: 08 February 2022, 01:45

having trouble creating a second deck

Post by emily_nicole »

Does anyone have experience working with multiple decks for the same game?
DexterHugo
Posts: 17
Joined: 11 April 2020, 15:48

Re: having trouble creating a second deck

Post by DexterHugo »

Personally, I found easiest just to create a second deck the same way I did the first deck instead of trying to co-mingle them in one object/table. So I just repeated the process (created a second table, added the constructor in php to make it a module.common.deck and then populated it in the setup). Just give it a different name to distinguish them both - something like attackDeck for the first deck and defenseDeck for the second deck.
emily_nicole
Posts: 8
Joined: 08 February 2022, 01:45

Re: having trouble creating a second deck

Post by emily_nicole »

thank you, that was super helpful
User avatar
Galeelox
Posts: 17
Joined: 14 March 2017, 12:17

Re: having trouble creating a second deck

Post by Galeelox »

I'm use to create only one deck for all the tokens I want to track. This prevents you from creating too many tables. And it makes it easy to create generic methods for all of your decks.
User avatar
Tisaac
Posts: 2736
Joined: 26 August 2014, 21:28

Re: having trouble creating a second deck

Post by Tisaac »

Galeelox wrote: 08 February 2022, 15:12 I'm use to create only one deck for all the tokens I want to track. This prevents you from creating too many tables. And it makes it easy to create generic methods for all of your decks.
Why would you be afraid of many db tables ?
One table for each logical component is pretty neat IMO
User avatar
Galeelox
Posts: 17
Joined: 14 March 2017, 12:17

Re: having trouble creating a second deck

Post by Galeelox »

Tisaac wrote: 08 February 2022, 18:04
Galeelox wrote: 08 February 2022, 15:12 I'm use to create only one deck for all the tokens I want to track. This prevents you from creating too many tables. And it makes it easy to create generic methods for all of your decks.
Why would you be afraid of many db tables ?
One table for each logical component is pretty neat IMO
It's a part of the checklist. A reasonable database file.
But the first reason is that I didn't need to have several decks. One deck with a right usage of location is enough for all my needs.
User avatar
Victoria_La
Posts: 665
Joined: 28 December 2015, 20:55

Re: having trouble creating a second deck

Post by Victoria_La »

I also manager everything in one table (tokens), which is all decks, meeples, structures and other game components.
It makes it super easy to code and deal with (and I never write SQL queries in my games anymore)
Post Reply

Return to “Developers”