Forge version 1.5.9
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
-
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.9
by Max mtg » 31 Dec 2013, 10:43
I'm converting cost payment code for human into decisions mechanism, so that resources to pay the part are chosen in an outer class (accessed by visitor), and then (with the decision ready) payment is performed by a single method suitable for any type of player.
This will allow to set CostPart descendant classes free of UI dependencies and player-specific code.
On the other hand, this change is expected to break a few cards ("Back from the brink" for sure) and plant some bugs. I'll fix these at the first opportunity, but I don't know yet when there'll be one - before January 3rd, or after 13th.
This will allow to set CostPart descendant classes free of UI dependencies and player-specific code.
On the other hand, this change is expected to break a few cards ("Back from the brink" for sure) and plant some bugs. I'll fix these at the first opportunity, but I don't know yet when there'll be one - before January 3rd, or after 13th.
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.9
by Agetian » 31 Dec 2013, 13:59
If this is likely to break a lot of things relatively long-term (for a couple of weeks), maybe it's better to postpone these changes until after January 13th? (just my $0.02)
- 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.9
by moomarc » 31 Dec 2013, 14:15
It sounds like it also has potential to enable some of the cards that let you spend one type of mana as another. But I have to agree with Agetian that it should rather be left until you're back from your holiday, Max, unless you want to start a branch for it ( which I know you're not a fan of).
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Forge version 1.5.9
by Max mtg » 31 Dec 2013, 18:57
Agetian, I am not sure if it would break that many things. There could be a regression in the cost payment, but it's going to be relativelly easy to trace the source of such problem.
Back from the Brink used an exotic cost (not exile and then pay remembered card's manacost, but some hybrid of those), that I cannot support yet... so that's why it's expected to be broken.
Marc, I never thought of that, because mana payment is the biggest problem for me now. The decision is not about selecting a number of a number of cards, but it's about mana abilities player activates or mana used from pool. It's a bit more complicated than just getting a card list.
Give me please an example of such cards, that allow mana color substitution, just to think about their implementation.
I'll check if the code is stable enough to commit before or after my vacation.
Back from the Brink used an exotic cost (not exile and then pay remembered card's manacost, but some hybrid of those), that I cannot support yet... so that's why it's expected to be broken.
Marc, I never thought of that, because mana payment is the biggest problem for me now. The decision is not about selecting a number of a number of cards, but it's about mana abilities player activates or mana used from pool. It's a bit more complicated than just getting a card list.
Give me please an example of such cards, that allow mana color substitution, just to think about their implementation.
I'll check if the code is stable enough to commit before or after my vacation.
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.9
by friarsol » 31 Dec 2013, 20:15
Marek started a short conversation about this a little while back. viewtopic.php?f=52&t=3760&p=129528&hilit=celestial+dawn#p129528Max mtg wrote:Give me please an example of such cards, that allow mana color substitution, just to think about their implementation.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.5.9
by squee1968 » 31 Dec 2013, 20:34
From the Google Document, under the heading "Spend As Other Mana":Max mtg wrote:Give me please an example of such cards, that allow mana color substitution, just to think about their implementation.
Celestial Dawn
Daxos of Meletis
False Dawn
Mycosynth Lattice
North Star
Psychic Intrusion
Quicksilver Elemental
Sunglasses of Urza
Re: Forge version 1.5.9
by Chris H. » 02 Jan 2014, 16:50
I plan to update my iMac to Mavericks in the next couple of days.
-
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.9
by Mithrandir » 02 Jan 2014, 21:09
Please for the mac os. I really want to use this Forge. Thank you
- Mithrandir
- Posts: 1
- Joined: 02 Jan 2014, 21:07
- Has thanked: 0 time
- Been thanked: 0 time
Re: Forge version 1.5.9
by Max mtg » 03 Jan 2014, 15:28
That's exactly how it has turned out. Mana part of the cost needs a lot of attention, so it won't be commited before 13th.Agetian wrote:If this is likely to break a lot of things relatively long-term (for a couple of weeks), maybe it's better to postpone these changes until after January 13th? (just my $0.02)
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.9
by drdev » 04 Jan 2014, 06:01
I've finally finished transitioning most dialogs to the new skinned look, including most recently ListChooser dialogs. The only non-skinned dialogs remaining at this point are the Exception dialog (which I think is better to leave unskinned) and the file open/save dialogs (which might be tricky to skin).
I've also added back anti-aliasing for the dialog rounded border on Windows using an OS check to avoid causing the glitchy display on Linux.
Here's what the new ListChooser dialog looks like:
I've also been adding more Deck Editor improvements, such as a File menu with keyboard shortcuts like Ctrl+S for saving the current deck, and menu items under the Filters button to hide and reset the filters.
Next I plan to work on adding a DeckManager using the ItemManager class so as to support easily searching and filtering decks. I also plan to add support for saving and loading filters, as well as a card view at some point.
And don't worry. I haven't forgotten about working on starting up the Android version. There's just some loose ends I want to tie up with the desktop version while Max and others finish up the modularization.
Thanks.
-Dan
I've also added back anti-aliasing for the dialog rounded border on Windows using an OS check to avoid causing the glitchy display on Linux.
Here's what the new ListChooser dialog looks like:
I've also been adding more Deck Editor improvements, such as a File menu with keyboard shortcuts like Ctrl+S for saving the current deck, and menu items under the Filters button to hide and reset the filters.
Next I plan to work on adding a DeckManager using the ItemManager class so as to support easily searching and filtering decks. I also plan to add support for saving and loading filters, as well as a card view at some point.
And don't worry. I haven't forgotten about working on starting up the Android version. There's just some loose ends I want to tie up with the desktop version while Max and others finish up the modularization.
Thanks.
-Dan
Last edited by drdev on 04 Jan 2014, 15:09, edited 1 time 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.9
by Agetian » 04 Jan 2014, 14:27
Both regressions are rather recent (Jan 1 builds seem to behave well) and are likely introduced with some of the UI changes recently...
r24136,r24138: The above-mentioned regressions appear to be fixed (some extra testing is needed for sideboarding, though).
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Forge version 1.5.9
by drdev » 05 Jan 2014, 06:13
I just committed a fix in r24141 that I hope will greatly reduce memory usage. The fix makes it so CardPanels are disposed of at the end of each game, meaning they are detached from the BufferedImage and removed from the FSkin cache. I also made it so ImageCache.clear() is called when switching screens and between games.
From my testing, this seems to prevent memory usage from growing unbounded as you play games and otherwise navigate the application, with overall memory usage more or less capping around 1GB on my machine even when doing stress testing, well short of what it would take to receive an Out of Memory exception.
I hope this fix will prevent people having to restart Forge every couple games or encounter Out of Memory exceptions. Please let me know if you still see memory concerns, in case I missed any other places with significant memory leaks.
Thanks.
-Dan
EDIT: Refactored things a bit in r24144 so that ComponentSkins are disposed of for all components on closed screens and dialogs, which includes CardPanels on game screens after each game ends. I also fixed it so CardPanels are disposed of when they are removed during game play.
From my testing, this seems to prevent memory usage from growing unbounded as you play games and otherwise navigate the application, with overall memory usage more or less capping around 1GB on my machine even when doing stress testing, well short of what it would take to receive an Out of Memory exception.
I hope this fix will prevent people having to restart Forge every couple games or encounter Out of Memory exceptions. Please let me know if you still see memory concerns, in case I missed any other places with significant memory leaks.
Thanks.
-Dan
EDIT: Refactored things a bit in r24144 so that ComponentSkins are disposed of for all components on closed screens and dialogs, which includes CardPanels on game screens after each game ends. I also fixed it so CardPanels are disposed of when they are removed during game play.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.9
by Chris H. » 05 Jan 2014, 15:22
Chris H. wrote:I plan to update my iMac to Mavericks in the next couple of days.
I have decided to release Forge version 1.5.9 on Friday Jan 10 2014.
I will update to Mavericks following this release. There have been several reports from people that they can no longer run Forge successfully after updating to Mavericks. Not sure if I will see the same problem or not.
-
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.9
by seangcxq » 05 Jan 2014, 15:38
I can confirm Forge works without issue on OSX 10.9.1 (Mavericks).
17 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 106 guests