Forge version 1.5.12
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Forge version 1.5.12
by Chris H. » 31 Jan 2014, 17:34
Tentative target release date: Friday February 14 2014.
Now planning to release on the 7th.
Now planning to release on the 7th.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Forge version 1.5.12
by drdev » 01 Feb 2014, 01:27
The recent initiative to improve card art support motivated me to finally implement an image view for ItemManagers. Although I wasn't able to finish in time for 1.5.11, I just committed the first version of it. Right now, all ItemManagers display card images in a "spreadsheet" view sorted alphabetically. I still plan to add support for pile views in CardManagers displaying deck lists, with cards grouped by card type (Creatures/Spells/Lands), arranged within each group in piles by CMC for Creatures/Spells and card name for Lands, and sorted within each pile alphabettically by default. The good news is I was able to come up with an implementation that performs well enough even when displaying all 20K+ cards in the Catalog.
Here's a taste of what it looks like on the Draft screen, where it's now the default view. Note that I replaced the "List View" combo box with two toggle buttons to make switching between views easier.
Let me know what you think and if you have any requests or suggestions for this feature.
Thanks.
-Dan
Here's a taste of what it looks like on the Draft screen, where it's now the default view. Note that I replaced the "List View" combo box with two toggle buttons to make switching between views easier.
Let me know what you think and if you have any requests or suggestions for this feature.
Thanks.
-Dan
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.12
by friarsol » 01 Feb 2014, 02:22
Image View is good if you actually have Images. If the image doesn't exist is there a way to draw the card Overlays? (Name, Cost, P/T?) Do we happen to know if the Image fails to draw?
Edit: In Image View, since hovering a card doesn't show it in the DetailPanel, we pretty much need to allow the arrows to move from card to card. And Booster Draft should be sorted by default by Rarity then by Alpha. Not Alpha only.
Edit: In Image View, since hovering a card doesn't show it in the DetailPanel, we pretty much need to allow the arrows to move from card to card. And Booster Draft should be sorted by default by Rarity then by Alpha. Not Alpha only.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.5.12
by drdev » 01 Feb 2014, 02:58
I'm planning to work on creating a hover tooltip that will display Card Details both for this new Image View and existing CardPanelContainers. That should help some, though I was already planning to add arrow selection support as well.
As for sorting, would it work to just tie sorting into the sort columns of the List View? That way the card order would be consistent between the two views.
We know if a CardImage fails completely, but I'm not sure how to detect when we end up using the placeholder. Does anybody else know what I should check for that?
As for sorting, would it work to just tie sorting into the sort columns of the List View? That way the card order would be consistent between the two views.
We know if a CardImage fails completely, but I'm not sure how to detect when we end up using the placeholder. Does anybody else know what I should check for that?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.12
by friarsol » 01 Feb 2014, 03:17
Hmm maybe. Although those columns are hidden when we switch to Image View, so it'd be kinda awkward to switch to list view, sort, then switch back. I'd imagine Image View is primarily going to be used for Draft, and there's really only a few configurations that would be useful to sort by (Rarity, Color, Name)drdev wrote:As for sorting, would it work to just tie sorting into the sort columns of the List View? That way the card order would be consistent between the two views.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.5.12
by Agetian » 01 Feb 2014, 05:40
@ drdev: This view is really awesome! Thanks for implementing it! I'll report if I have any issues with it.
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Forge version 1.5.12
by Max mtg » 01 Feb 2014, 22:02
@drdev, Great job! That's definitelly a new chapter for our gui client.
I am looking forward to see same cards merged into stacks and then groupped into columns by color, rarity, cmc - just like in drafts of magic online.
@All, I've changed how unsupported cards are handled. Forge will no longer crash at startup loading decks containing those cards. Instead it will start without complaints, let you start a game with any decks, but unimplemented cards will appear with as many information as is known about them: no type, cost, color or abilities, but with rules text reading that card is not supported.
I am looking forward to see same cards merged into stacks and then groupped into columns by color, rarity, cmc - just like in drafts of magic online.
@All, I've changed how unsupported cards are handled. Forge will no longer crash at startup loading decks containing those cards. Instead it will start without complaints, let you start a game with any decks, but unimplemented cards will appear with as many information as is known about them: no type, cost, color or abilities, but with rules text reading that card is not supported.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Forge version 1.5.12
by drdev » 02 Feb 2014, 00:20
Quick question. Why does MagicColor skip the first bit? I'm looking for a way to loop through all possible colors, but looping from COLORLESS to ALL_COLORS is resulting in hitting each color twice.
public static final byte COLORLESS = 0;
public static final byte WHITE = 1 << 1; //2
public static final byte BLUE = 1 << 2; //4
public static final byte BLACK = 1 << 3; //8
public static final byte RED = 1 << 4; //16
public static final byte GREEN = 1 << 5; //32
public static final byte COLORLESS = 0;
public static final byte WHITE = 1 << 1; //2
public static final byte BLUE = 1 << 2; //4
public static final byte BLACK = 1 << 3; //8
public static final byte RED = 1 << 4; //16
public static final byte GREEN = 1 << 5; //32
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.12
by Xitax » 02 Feb 2014, 00:24
I'm loading Forge and I refreshed all the constructed decks from Gos' archives. Some deck might have a bad card because it hangs on loading. Is there a way to figure out which of ~9000 decks has a bad card so I can fix it?
Re: Forge version 1.5.12
by drdev » 02 Feb 2014, 00:31
Could we maybe track which decks fail on load (and which cards caused the deck to fail) and display a popup listing them all once loading is finished? That would make it more obvious to end users that something went wrong and help them rectify the situation. We could also give them an option on that popup to auto-fix the decks by just removing any invalid cards.Xitax wrote:I'm loading Forge and I refreshed all the constructed decks from Gos' archives. Some deck might have a bad card because it hangs on loading. Is there a way to figure out which of ~9000 decks has a bad card so I can fix it?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.12
by Max mtg » 02 Feb 2014, 01:04
That was introduced in r9987, 2.5 years ago...drdev wrote:Quick question. Why does MagicColor skip the first bit? I'm looking for a way to loop through all possible colors, but looping from COLORLESS to ALL_COLORS is resulting in hitting each color twice.
public static final byte COLORLESS = 0;
public static final byte WHITE = 1 << 1; //2
public static final byte BLUE = 1 << 2; //4
public static final byte BLACK = 1 << 3; //8
public static final byte RED = 1 << 4; //16
public static final byte GREEN = 1 << 5; //32
Don't remember the real reason, probably wanted to reserve that bit for something.
I think we can change that behaviour now and shift all bits one position to the right. - r24602
Forge used to display a message before separation has started, because gui was close.drdev wrote:Could we maybe track which decks fail on load (and which cards caused the deck to fail) and display a popup listing them all once loading is finished? That would make it more obvious to end users that something went wrong and help them rectify the situation. We could also give them an option on that popup to auto-fix the decks by just removing any invalid cards.
Not it is far... what can be done now? Probably remember in storagebase decks that had invalid cards? It's also a too long chain...
CardPool's "add" method is the point where wrong card is detected. How to report that back to caller? Throw an exception? Possibly, but then the remainder of deck won't be loaded. Deck will be added to 'wrongly loaded' list, user will have to open folder with decks and edit it manually.
Without throwing an exception, which options are there? A list to add wrong cards... What? Seriously? To add an extra field with bad cards in each pool? No, thanks.
Then as another option, some globally visible method a CardPool may call when it finds a bad card... could make it. But did we want to link that with a deck being loaded?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Forge version 1.5.12
by drdev » 02 Feb 2014, 02:56
Max, I'm not attached to any particular implementation, nor did I intend to do it myself. I was just throwing out an idea.
Last edited by drdev on 02 Feb 2014, 08:09, edited 2 times in total.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.12
by Xitax » 02 Feb 2014, 04:19
Nothing so complicated is needed. A simple text file output with deck filenames would work just fine.
Re: Forge version 1.5.12
by Agetian » 02 Feb 2014, 05:09
My $0.02 regarding decks with faulty cards: I think any solution that will allow Forge not to crash and that is elegant and transparent code-wise will do here - what's important on the end user's (read: ordinary player's) side is that he gets a list of decks [or at least a list of faulty cards] that had issues when loading in at least some form (window popup with a list, .txt file with a list, even console output with a list even though that might be just a tiny bit more advanced for a completely unprepared player). I haven't looked at the code that loads decks in Forge on startup, so I'm not sure how viable it is to add any of those lists, so if the way the code is organized does not allow for an easy enough implementation to signal the user that a certain particular deck had issues when loading, maybe at least send the names of cards that were impossible to process to the console output so that it's possible for a (relatively advanced) user to grep the contents of deck files for that card and find the offending deck files?
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Forge version 1.5.12
by Agetian » 02 Feb 2014, 09:14
By the way, how viable is this for a simple solution to list unsupported cards (in CardPool.java:80)?
- Agetian
- Code: Select all
else {
System.err.println(String.format("An unsupported card was found when loading Forge decks: %s", cardName));
cp = PaperCard.createUnsuportedCard(cardName);
}
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
54 posts
• Page 1 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 89 guests