Page 1 of 1

GuiDisplay - resizable

PostPosted: 13 Aug 2009, 21:55
by silly freak
i played around a little with MultiSplitPane, and did an update to GuiDisplay3. Now there is

  • The size of the items in GuiDisplay is now resizable, of course
  • This also prevents the left content from jumping
  • Additionally, every zone can be scrolled individally. that's more because it was easier to implement, but has convenient effects: i recently played a game with some houndreds of tokens. to activate an ability, i had to repeatedly go left to the lands and right to the enchantment
  • as an extra, i added slim buttons at the right of every component. It lets you move the component into an extra window

you're welcome :wink:

Re: GuiDisplay - resizable

PostPosted: 16 Aug 2009, 21:22
by DennisBergkamp
Silly Freak,

Having trouble with some of these changes... it doesn't like the imports:

import static org.jdesktop.swingx.MultiSplitLayout.*;

import org.jdesktop.swingx.MultiSplitPane;
import org.jdesktop.swingx.MultiSplitLayout.Node;

in fact, org.jdesktop. doesn't even exist. It seems to be some external library I have to install... Where can I get it and how do I install it?

Thanks :mrgreen:

Re: GuiDisplay - resizable

PostPosted: 16 Aug 2009, 21:45
by silly freak
oops-i thought i included it in my rar. whatever, you can get it at http://today.java.net/today/2006/03/23/MultiSplit.zip. the only thing to do is to move the packages in your source folder.

i'm not sure how useful the whole thing actually is, however. i leave the judgement up to you^^

Re: GuiDisplay - resizable

PostPosted: 17 Aug 2009, 04:20
by DennisBergkamp
Cool, thanks, I got it to work :)
And personally I like it, it's much more functional, and somehow it actually looks better too =D>
I'm not sure, but it looks like this change should also support larger, higher quality images (from say, magiccards.info). Of course, that would limit the size of the playing area...

Re: GuiDisplay - resizable

PostPosted: 01 Oct 2009, 20:39
by DennisBergkamp
By the way, are you familiar at all with JOGL? A friend of mine has been messing around with it in his spare time... he says it's very easy to mix 3D openGL with 2D swing GUI components. Something I've been thinking about, running MTGForge in openGL. Modelling the cards would be super easy, since they'd just be Quads.

Re: GuiDisplay - resizable

PostPosted: 01 Oct 2009, 20:56
by silly freak
i'm not exactly familiar with JOGL, but with Java3D. I don't know how you integrate JOGL into a Swing app. in Java3D, you have a Canvas3D component that you can add just as any other component.

a lot of code needs to be written for a decent "table", of course.
a plus is maybe, you could just zoom out if you have many tokens. i think scrolling is a pain in some cases. but we have to make sure that such navigation works user friendly.
I think there's a picking ray class that makes it fairly easy to mouse over or click cards.

The Display interface of forge seems not to hurt. I think only the game area would be 3D, so the OK and Cancel Buttons are fine. nothing else in the interface is swing related

Re: GuiDisplay - resizable

PostPosted: 01 Oct 2009, 23:40
by DennisBergkamp
Apparently it's exactly the same in JOGL, they use something called a GLCanvas.

Yeah I was thinking the same thing, zooming in and out (probably won't even be a need to tilt the camera or anything), allowing to drag cards around might even be an option.
Anyway, these are just thoughts. I might mess around with it a bit sometime in the future. And obviously this would be an optional thing, the current 2D GUI we should always keep around as our primary GUI.

Re: GuiDisplay - resizable

PostPosted: 02 Oct 2009, 16:28
by silly freak
yes, I agree. The current GUI is well known and pretty good, I think. Before you start "messing around", it might be worth to take a look at the differences between Java3D and JOGL. JOGL surely has richer features - everything from OpenGL in the end? - , but J3D might be more convenient; it might have more abstraction from the most basic OpenGL features that makes it faster to code.
for example, how does picking, dragging, changing camera, using a picture for surface, modifying a scene while running (new cards etc.) and all that work with JOGL?

I don't want to advertise; my "experience" in J3D is limited to some very simple HelloWorld-like stuff. try, and share your experiences on the results.

Re: GuiDisplay - resizable

PostPosted: 02 Oct 2009, 18:42
by Chris H.
I think that there was some recent discussion in another section of the forums about this graphics package. I think it was on MagicWars

Re: GuiDisplay - resizable

PostPosted: 02 Oct 2009, 19:26
by DennisBergkamp
It seems Java3D (and also, JME) is higher level, and more pointed towards building the generic 3D games (shooters, etc.).
JOGL seems to be better at mixing 2D and 3D, but I don't know, that's just based on first impressions. I will try to read up on this a bunch more.