JavaFX Contributing

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
Post Reply
aryll28
Kobold
Posts: 10
Joined: Sun Mar 29, 2015 5:05 pm

JavaFX Contributing

Post by aryll28 »

Hello,

Hopefully, this is the right place to post.

I was looking through some of the developer ideas for Maptool and saw that adding JavaFX was one of the things. I have some more free time now and wanted to help with the coding. I forked the maptool branch and I can open it up in Eclipse and whatnot. I also installed the plugins for Gradle and JavaFX.

But after that, I wasn't sure where to get started. I wasn't sure how much work was done on this part of development or if any help is even needed on this front. Are there any resources I can look at to get started?

Thanks,
Aryll

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: JavaFX Contributing

Post by Azhrei »

Hey aryll.

So far we're just looking at what JFX offers and where we might want to start.

I started building a "wizard" scheme so that some of the dialogs in MT could be reimplemented as wizards. I was not very happy with the solution I ended up with for Start A Server, though. I sat down to do a redesign of my working solution with an eye towards a more flexible design as well as better readability. If you'd like to look at the wizard design and offer suggestions, I'm all ears. I'll come back this afternoon and add the first draft of the design that I have so far (I don't seem to have it on my iPad).

Obviously, that's not going to involve a lot of JFX eye candy. But it would help the core team see how things are supposed to be put together (or at least, it would help me!).

The most significant pieces for MT will be replacing the map rendering, but I won't go there because I know Craig has plans for a line of sight implementation and I don't know if/how it will be affected by JFX.

Maybe some other dialog would also be a good starting point? Maybe the token editor? Or the panel that comes up when selecting the Background button in the New Map dialog. Basically, any dialog that is standalone...

Thanks for offering to contribute!

aryll28
Kobold
Posts: 10
Joined: Sun Mar 29, 2015 5:05 pm

Re: JavaFX Contributing

Post by aryll28 »

Yeah, that would be great. Looking at some examples would definitely help with getting started. I'm not all that familiar with JFX, but I've been looking at some basic 'Hello World' type applications.

I did notice that once when I tried importing the JFX libraries, Eclipse doesn't recognize them. Am I missing something in the build.gradle? Or do I need to modify the build file so that the right libraries are imported?

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: JavaFX Contributing

Post by Jagged »

The Eclipse setup needs a review since we have had a couple of client upgrades since it was written. It may be as simple as the JavaFX stuff being integrated into the core now.

I will try and look at it soon. Unfortunately RL has not provided me with much spare time recently :mrgreen:

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: JavaFX Contributing

Post by JamzTheMan »

For FX & Eclipse, it depends on your version. For Mars, I had to set it as an FX project and it was more tricky.

For Neon + Java 1.8, IIRC, it's more out of the box. I don't believe I had to do anything more than the normal gradle setup. I also HIGHLY recommend you install SceneBuilder and integrate it (in eclipse, you just have to add it's path).


With that said, JavaFX is a shift from Abelie Forms to fxml. As a group, we may want to discuss project setup and if we want to enforce a more MVC approach? SInce you can have Swing components in a JavaFX frame and JavaFX components in a Swing frame, we can attack it two ways. My thought was to attack the main frame/menu first, and include the map and other frames into the JavaFX frame, pulling them in one at a time if needed, tackling the map last. The caveat is you will be running on two main threads, one for JavaFX and one for Swing. So it has to be managed.

Personally, to get a feel for JavaFX, I tackled TokenTool first. You can see my progress so far in the latest build. It's in git hub but I don't include it in my builds yet, so I currently have TokenTool and TokenToolFX. (TokenToolFX was a clone of TokenTool for easy reference so I haven't removed the bulk of the old classes yet, and in fact, that project can run both versions.) I'm sort of excited to try some of the new effects and add expose them to the user (blur's, shading, etc). Again, total WIP. I eventually plan to integrate it more with MapTool as well, so it packages with MT, can run as it's own app, but can also launch from "edit token" to create/edit said token. So it needs access to the maptool project...

https://github.com/JamzTheMan/maptool/tree/1.4.3.13
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: JavaFX Contributing

Post by JamzTheMan »

Jagged wrote:The Eclipse setup needs a review since we have had a couple of client upgrades since it was written. It may be as simple as the JavaFX stuff being integrated into the core now.

I will try and look at it soon. Unfortunately RL has not provided me with much spare time recently :mrgreen:
@Jagged, since you are sort of heading this up in your free time... Have you looked at Oomph? It seems like it would help (but haven't played with it myself). Right now, Gradle gets us I think 90% there (I've added a few gradle enhancements to handle some eclipse specific warnings/errors) but gradle build should still be system agnostic (eg work on other OS's & IDE's like netbeans).

It would seem Gradle + Oomph should allow a new developer to get up and running (or current developers to create new workspaces) with ease?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Post Reply

Return to “MapTool 1.4”