It is currently 26 Apr 2024, 18:15
   
Text Size

GuiDisplay - resizable

Post MTG Forge Related Programming Questions Here

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

GuiDisplay - resizable

Postby silly freak » 13 Aug 2009, 21:55

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:
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: GuiDisplay - resizable

Postby DennisBergkamp » 16 Aug 2009, 21:22

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:
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: GuiDisplay - resizable

Postby silly freak » 16 Aug 2009, 21:45

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^^
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: GuiDisplay - resizable

Postby DennisBergkamp » 17 Aug 2009, 04:20

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...
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: GuiDisplay - resizable

Postby DennisBergkamp » 01 Oct 2009, 20:39

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: GuiDisplay - resizable

Postby silly freak » 01 Oct 2009, 20:56

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
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: GuiDisplay - resizable

Postby DennisBergkamp » 01 Oct 2009, 23:40

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: GuiDisplay - resizable

Postby silly freak » 02 Oct 2009, 16:28

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.
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: GuiDisplay - resizable

Postby Chris H. » 02 Oct 2009, 18:42

I think that there was some recent discussion in another section of the forums about this graphics package. I think it was on MagicWars
User avatar
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: GuiDisplay - resizable

Postby DennisBergkamp » 02 Oct 2009, 19:26

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.
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 102 guests


Who is online

In total there are 102 users online :: 0 registered, 0 hidden and 102 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 102 guests

Login Form