It is currently 13 Sep 2025, 12:05
   
Text Size

Deck Generation Code

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Deck Generation Code

Postby Accountancy » 29 Aug 2011, 15:35

This sounds awesome, I'm glad to see that the decks will be getting better again soon!
@jendave: I didn't realise the old deck generators used old code, keep up the good work
Accountancy
 
Posts: 230
Joined: 14 Aug 2009, 12:39
Has thanked: 22 times
Been thanked: 2 times

Re: Deck Generation Code

Postby Doublestrike » 31 Aug 2011, 15:07

Attached is a picture for a possible layout of the deck option selectors for the quick start game option. Instead of clicking through dialog after dialog, it could (should) be easily accomplished in one place (see pic) for any color, any combination, any number of opponents.

This leads to two questions:
1 - Any problems with this idea? I'll do it myself eventually if there are no objections. If no problems, then

2 - Can the refactoring of the deck generation take this flexibility into account? That is, decks of any count and combination of colors. From a quick skim of the code it looks like most of the groundwork is in place. Once again, I'd be happy to eventually do myself if it's too much work now.

------------

As a side note, this layout could be easily extended to add a preferences area which balances the breakdown of each deck, addressing @Accountancy's post on the first page.
Attachments
Deck selector GUI mock.png
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Deck Generation Code

Postby Sloth » 31 Aug 2011, 15:33

Doublestrike wrote:Attached is a picture for a possible layout of the deck option selectors for the quick start game option. Instead of clicking through dialog after dialog, it could (should) be easily accomplished in one place (see pic) for any color, any combination, any number of opponents.

This leads to two questions:
1 - Any problems with this idea? I'll do it myself eventually if there are no objections. If no problems, then

2 - Can the refactoring of the deck generation take this flexibility into account? That is, decks of any count and combination of colors. From a quick skim of the code it looks like most of the groundwork is in place. Once again, I'd be happy to eventually do myself if it's too much work now.

------------

As a side note, this layout could be easily extended to add a preferences area which balances the breakdown of each deck, addressing @Accountancy's post on the first page.
Something like this would be a good start. To keep the features we have, a button for adding 1-4 random colors would be nice.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Deck Generation Code

Postby Doublestrike » 31 Aug 2011, 15:49

Sloth wrote:To keep the features we have, a button for adding 1-4 random colors would be nice.
Nice! Easy, I'll just throw in a "randomize" button for each player that randomly checks a selection of boxes. Could even be a dropdown with "1 random color", "2 random colors", etc.
---
A joke is a very serious thing.
User avatar
Doublestrike
UI Programmer
 
Posts: 715
Joined: 08 Aug 2011, 09:07
Location: Bali
Has thanked: 183 times
Been thanked: 161 times

Re: Deck Generation Code

Postby jendave » 31 Aug 2011, 15:57

Doublestrike wrote:
Sloth wrote:To keep the features we have, a button for adding 1-4 random colors would be nice.
Nice! Easy, I'll just throw in a "randomize" button for each player that randomly checks a selection of boxes. Could even be a dropdown with "1 random color", "2 random colors", etc.
Sounds good. I like the drop down idea. I have not had time to work on the deck generator, so feel free hack away.

Dave
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

Re: Deck Generation Code

Postby Rob Cashwalker » 31 Aug 2011, 18:26

I would've done selection lists if I knew how back then... I'd request that you still keep the Human and AI selections as separate dialogs, because both players may not be doing generated decks, or even the same kind of generator.

Design challenge - make all the available choices dynamic.. The dialog stays up as you select the choice for "2 color deck", then the other deck choices slide down, with the color choices appearing in-between.
Easy Way Out - Put the deck formats on top and the choices on the bottom.
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 20 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 20 users online :: 0 registered, 0 hidden and 20 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 20 guests

Login Form