Page 1 of 13

UI Improvements, Round 3: Home Screen

PostPosted: 08 Dec 2011, 12:40
by Doublestrike
Round 3 has started so there will be a few hiccups in the startup.

The new home screen at this point requires you to select the user deck and computer deck before hitting 'start', otherwise it crashes. This will be changed but for now that's what's up.

This should be the last time UI changes will drastically affect the way the game starts. However, results soon will be smooth-er and definitely faster. (I've got to commit semi-ready architecture so people who want to help are included in the mix.)

Please hold comments - except for all-out crashes - to a minimum until construction is complete, should be Sunday-ish. At that time, the old UI functionality will be returned fully and everything should be "back to normal".

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 03:50
by Rob Cashwalker
For continuity, here's the UI bounty thread where the NewHomeScreen was born.
viewtopic.php?f=26&t=5110&start=90#p71445

This is the pretty much where I last left off with fixes.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 04:07
by friarsol
Rob Cashwalker wrote:For continuity, here's the UI bounty thread where the NewHomeScreen was born.
viewtopic.php?f=26&t=5110&start=90#p71445

This is the pretty much where I last left off with fixes.
Hah. Rob just wants to see me hold me word for the bounty.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 04:31
by Doublestrike
Actually, was wondering if that's still good.

*cough* manapool *cough*

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 04:40
by friarsol
Doublestrike wrote:Actually, was wondering if that's still good.

*cough* manapool *cough*
What about the manapool?

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 05:15
by Rob Cashwalker
Hah. Rob just wants to see me hold me word for the bounty.
nothing of the sort... kinda forgot about the 'bounty'...

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 06:31
by Doublestrike
Well, if I may be so bold: :oops:

if(
they are able to actually help out and do a reasonable amount of work (or more)

) {

I shall figure out a way to code up a game mechanic, or a feature of your choosing,
I choose the mana pool being consolidated into the player Fields. Probably an easy job but for some psychological reason I've been pushing it to the end of the list, so it seems like a good bounty thing, if it's OK with you.
}
else {
No worries, you're a busy guy and this was a long time ago. I (or someone) will do it it time. :)
}

EDIT Checkstyle.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 09 Dec 2011, 13:22
by friarsol
Not sure if I'll have time to do it before someone else actually does it, but I'll see if I can squeeze an hour today to see how much work it would be.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 02:47
by Doublestrike
OK guys, just committed the new home screen. Layout is finished but it's missing a lot of functionality. Fortunately, that's probably the easy part.

For right now, only constructed mode works, for testing purposes. I'll be working over the next 10 hours or so putting in each feature, starting with Quest. That is to say, functionality will be steadily improving all day.

Pushed this commit so people could see the big picture and if you want something implemented immediately it can be done.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 05:32
by slapshot5
Here's a crasher for you:

If you start Forge witch a deck file that contains an invalid card name, you get a popup that says some of your decks were not loaded. Now, you also get a crash:

Stack Trace | Open
This is a Crash Report. An error has occurred. Please save this message to a file.
Please follow the instructions at this address to submit this Crash Report, plus what you were doing at the time:
http://tinyurl.com/3zzrnyb
Reporting bugs in Forge is very important. We thank you for your time.

0


Version:
Forge version SVN

OS: Mac OS X Version: 10.6.8 Architecture: x86_64

Java Version: 1.6.0_29 Vendor: Apple Inc.

Detailed error trace:
java.lang.ArrayIndexOutOfBoundsException: 0
at forge.control.ControlAllUI.sizeChildren(ControlAllUI.java:146)
at forge.control.ControlAllUI.access$0(ControlAllUI.java:143)
at forge.control.ControlAllUI$2.componentResized(ControlAllUI.java:94)
at java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:143)
at java.awt.Component.processComponentEvent(Component.java:6199)
at java.awt.Component.processEvent(Component.java:6153)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Window.processEvent(Window.java:1836)
at java.awt.Component.dispatchEventImpl(Component.java:4735)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:652)
at java.awt.EventQueue$2.run(EventQueue.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1096)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:853)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:650)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:621)
at forge.deck.DeckManager.readAllDecks(DeckManager.java:374)
at forge.deck.DeckManager.<init>(DeckManager.java:144)
at forge.AllZone.getDeckManager(AllZone.java:595)
at forge.view.home.ViewConstructed.<init>(ViewConstructed.java:77)
at forge.view.home.HomeTopLevel.<init>(HomeTopLevel.java:67)
at forge.control.ControlAllUI.changeState(ControlAllUI.java:101)
at forge.view.swing.ApplicationView$3.run(ApplicationView.java:170)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:677)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:647)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


-slapshot5

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 05:54
by Doublestrike
Ouch that's a rough one. That check apparently happens in gameAction...anyway OTL.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 06:06
by slapshot5
Doublestrike wrote:Ouch that's a rough one.
Yep. Otherwise I'd have fixed it myself. Not sure what the best way is. My thought was to detect where it's currently detected, but not pop the UI piece until after our main GUI is created. (I think that's the problem from the looking around I did.)

-slapshot5

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 06:29
by Doublestrike
Thanks for the look around anyway. The problem with reverting to the old method temporarily is the multiple JFrame / single JFrame thing...there's a massive convoluted mess of code for all the different windows before, and it's a nightmare (and a significant time investment) to make casts and transitions between single/double. So I'll just pound ahead as fast as I can, will put some time into that crash hopefully today.

EDIT - easy one, turns out. Fixed r12578. Can give gory details if you're curious.

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 09:12
by Sloth
Wow, the new home screen looks like having lost all the cumbersome clicking orgies. Good work Doublestrike!

Re: UI Improvements, Round 3: Home Screen

PostPosted: 11 Dec 2011, 12:34
by Doublestrike
Thanks for the thanks!

"Constructed" mode should be fully complete - I'm ready for bug reports on that one.

"Quest" mode is 95% complete, but I've been programming all day and I can't find some silly bug in the new game method. Will kill that tomorrow. If someone wants to attack it, remaining is a single bug in new game, testing the (already finished) bazaar, and implementing the begin-game summon stuff. All easy and pretty much already finished.

Those are the two hardest modes to implement; the other ones shouldn't be too bad, and then the plan is to save the settings in preferences eventually. Thanks again for your patience; there's a light at the end of the tunnel.