Create account / Log in

Questions about ModuleManager

Discussion area for the development team.

Moderators: uckelman, Tim M

Re: Questions about ModuleManager

Postby uckelman » July 17th, 2020, 7:32 pm

Thus spake Cattlesquat:
> New Swing Wizard! Go! Go! Go!

Honestly, the two reasons I've always hated the Welcome Wizard are:

1) The code is a tangly mess, because the wizard library it uses is a
tangly mess.

2) The UI is ugly as sin.

It doesn't need to be tangly like it is, and it would look like everything
else in VASSAL if it didn't use wizard.jar...

--
J.
User avatar
uckelman
Site Admin
 
Posts: 8980
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: Questions about ModuleManager

Postby Flint1b » July 17th, 2020, 9:16 pm

With the ugly UI, I only ever looked on the right side where the "new game" "load game" options are and the buttons at the bottom, but yes the part on the left is ugly, writing black text on top of the board game's cover art can obviously end up in black text being written on dark background and becoming unreadable.

But the UI inside Vassal is ugly AF too, dialogs and menus without borders and alignment so the options and fields are 1px away from the border, every module having different icons for the same buttons. Yes of course, every module designer knows what is best, sure.. who had the glorious idea of allowing _that_ level of customization :D

The wizard is actually the most consistent UI in all of Vassal.

And to Swing, no. Last time I had to use Swing was in Java 1.5 times for education projects at the uni. And Swing was already not cool back then. Today, it's JavaFX for new code. It can be embedded into Swing applications, a Swing JComponent can be a container for FX contents.
Last edited by Flint1b on July 17th, 2020, 9:19 pm, edited 1 time in total.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Questions about ModuleManager

Postby JoelCFC25 » July 17th, 2020, 9:16 pm

Cattlesquat wrote:Well one does want players "new to vassal" to be able to come in and figure out how to get a game going reasonably easily. Minimizing friction to new adopters is definitely a thing. So if e.g. you didn't have your name and password set and you picked "New Game" and it just rejected you telling you to go off to the right place and set your name and password first, that's a lot of friction. Maybe you're allowed to fall through as "Newbie".


As long as you're noodling over the wizard, perhaps (if it's retained) this is a good opportunity to head off an extremely common user misunderstanding and frustration point. Add some instructional text to the name/password selection dialog stressing the actual usage of this information and informing people how they'd subsequently review it or change it (especially since this is a one-time prompt). Combo this with a button in Preferences to actually see your current password so you don't have to go digging in text files in obscure locations in your filesystem.

Having done the explanation many times, it really does take quite a lengthy script to get users to understand why they suddenly can't get into their ongoing game and how to recover from it.
JoelCFC25
 
Posts: 748
Joined: October 12th, 2010, 5:15 pm
Location: Minnetrista, MN

Re: Questions about ModuleManager

Postby Flint1b » July 17th, 2020, 9:22 pm

JoelCFC25 wrote:Add some instructional text to the name/password selection dialog stressing the actual usage of this information and informing people how they'd subsequently review it or change it (especially since this is a one-time prompt).


Very good idea, and we should get rid of asking for "real name", what are we, the police or the border patrol? :D
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Questions about ModuleManager

Postby Cattlesquat » July 17th, 2020, 9:39 pm

In case this is useful in planning, here is a current visualization of the UI flow. If I've left something out let me know.

Vassal Wizard Flow.jpg
Vassal Wizard Flow.jpg (74.77 KiB) Viewed 4760 times
User avatar
Cattlesquat
 
Posts: 941
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Questions about ModuleManager

Postby Cattlesquat » July 17th, 2020, 9:53 pm

I think we could genuinely improve this flow by:
* Completely eliminating the "Welcome Screen" not-actually-the-main-screen step
* Boot up with "Blank Main Screen" PLUS game's About graphics and simple buttons for Start New Game, Load Game, and maybe Online (something analogous to my earlier mockup, but maybe not list every predefined setup, put that into wizard flow)
* "Start New Game" button (or any New Game / Predefined Setup choice) jumps straight into that "wizard flow" at appropriate point.
* "Load Game" button (or from File Menu) picks a game to load and jumps straight into that flow.
* "Play Online" button opens the Server Controls (so not requiring ONLY the weird toolbar button to find)

So then the wizard flow becomes much simpler and relegated to after player has picked New / Load / Online.
User avatar
Cattlesquat
 
Posts: 941
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Questions about ModuleManager

Postby Cattlesquat » July 17th, 2020, 10:15 pm

Like look how much simpler this flow just "looks". And almost certainly easier to implement & maintain.

This is just one of several possible approaches, but I just wanted to illustrate how a huge amount of extra nodes & steps & complexity could all be eliminated and actually keep a very good (probably better actually) "new user experience".

Vassal Wizard NEW Flow.jpg
Vassal Wizard NEW Flow.jpg (58.81 KiB) Viewed 4700 times
User avatar
Cattlesquat
 
Posts: 941
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Questions about ModuleManager

Postby Cattlesquat » July 17th, 2020, 10:58 pm

(But don't let my random brainstorming scare you away, go make the one you want!!!)
User avatar
Cattlesquat
 
Posts: 941
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Questions about ModuleManager

Postby Brent Easton » July 18th, 2020, 1:08 am

So, what exactly is the problem with the current wizard? I used it for another project and I didn't find it that bad once I understood how it works (which was not easy). I looked around for something comparable, but couldn't find anything. The actual page content of each page of the wizard, what buttons , fields are on it, the look and layout, is completely under our control.That's our problem, not the library.

The is another version of the library I found that had some later work done and fixes some of the bugs in the ancient version. I also had to add a few missing Constructors to make it do what I wanted to do.

I think the wizard is important for absolutely new players, but if we want to design a new flow, I am happy to work on implementing that. I'll see if I can drag out the updated library source as well.
User avatar
Brent Easton
 
Posts: 3225
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Questions about ModuleManager

Postby Flint1b » July 18th, 2020, 1:42 am

Brent Easton wrote:So, what exactly is the problem with the current wizard?


It's an obscure library which unlike regular libraries has only a single version in the maven repositories, has not been maintained and will never again be maintained, and part of it sits in our codebase under org.netbeans making US the maintainers.

And the fact that it will never again be maintained means it will never be adjusted to the jigsaw project (java module system) and there will come a time when the compiler will not accept such libraries anymore, at least not without walking on additional crutches.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Questions about ModuleManager

Postby Flint1b » July 18th, 2020, 2:26 am

.. just spent a couple hours implementing a kind of wizard panel inside the PlayerWindow.

There were some real hardcore specialists at work there, highly professional Java, Swing and OOP developers/maintainers.

PlayerWindow.controlPanel is exposed to the GameModule (which in itself is global, glorious idea there). And from there on the controlPanel gets passed around like .. I better don't use the appropriate expression.

public static VASSAL.tools.ComponentSplitter#splitAncestorOf, really??! A public static method? That comes from the side and messes with the PlayerWindow's internals, changing internal components just like that?

I think we have to start from lesson one. OOP is not just "hey I have a C-struct and I can put some code there that is roughly related to the contents of the struct". Writing code like this is object-BASED programming and has nothing to do with object-ORIENTED programming.

Why do I keep hearing Linus in the distance, and his famous citation from a time before he got sick with the "political correctness" and "code of conduct" disease...

C++ is a horrible language. It's made more horrible by the fact that a lot
of substandard programmers use it, to the point where it's much much
easier to generate total and utter crap with it. Quite frankly, even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles
Bader jokingly said "to piss you off", but it's actually true. I've come
to the conclusion that any programmer that would prefer the project to be
in C++ over C is likely a programmer that I really *would* prefer to piss
off, so that he doesn't come and screw up any project I'm involved with.


Glorious future awaits Vassal NG in C++. Glorious.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Questions about ModuleManager

Postby Flint1b » July 18th, 2020, 2:56 am

Brian, love your idea with this new user experience.

Here is what I got so far:

playerwizard-alpha.png
playerwizard-alpha.png (168.66 KiB) Viewed 4253 times


Yes, this is JavaFX worming its way into the swing application. Look at the clean design, the View is in xml, the Controller is a Java class, the style can be set in CSS later on.

We don't need a special wizard library for 1-2 dialogs with 3 buttons each. We just need a good UI toolkit which enforces clean design.

If there is interest in this, I can proceed.
User avatar
Flint1b
 
Posts: 461
Joined: May 19th, 2020, 12:27 am
Location: Colonia Agrippina

Re: Questions about ModuleManager

Postby Cattlesquat » July 18th, 2020, 3:12 am

I wouldn't know JavaFX from a hole in the ground so I certainly have nothing to say about that but I'm very interested in forward progress on a new wizard flow!

I will admit I just like to prototype things and try them out. Busy tonight trying to put a search function in the editor.
User avatar
Cattlesquat
 
Posts: 941
Joined: December 2nd, 2019, 4:57 pm
Location: Baltimore, Maryland, USA

Re: Questions about ModuleManager

Postby Brent Easton » July 18th, 2020, 4:13 am

Glorious future awaits Vassal NG in C++. Glorious.


Tiresome and unnecessary Yan. Please.
User avatar
Brent Easton
 
Posts: 3225
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

Re: Questions about ModuleManager

Postby Brent Easton » July 18th, 2020, 4:37 am

yes the part on the left is ugly, writing black text on top of the board game's cover art can obviously end up in black text being written on dark background and becoming unreadable.


Again, that is because Rodney chose to use the Wizard classes that way, not anything that is imposed by Wizard, or could easily be changed by us without too much effort.

It's an obscure library which unlike regular libraries has only a single version in the maven repositories, has not been maintained and will never again be maintained, and part of it sits in our codebase under org.netbeans making US the maintainers.

And the fact that it will never again be maintained means it will never be adjusted to the jigsaw project (java module system) and there will come a time when the compiler will not accept such libraries anymore, at least not without walking on additional crutches.


I'm afraid I don't understand why this is a problem. We take the source inside Vassal and maintain it ourselves. There is in fact an update to this package, but no one has the access to update the original anymore, so it live in a different place. No big deal, it is not a very complex library, it is stable, and that would resolve any module issues. We can move it to a different package if necessary.

I'm not saying don't replace it, knock yourself out if you have nothing better to do, but the two reasons given so far are

a) The way Vassal has used the library is ugly and not well thought out (which we can easily fix)
b) No-one is maintaining the code, and it may stop working if it remains external to Vassal (which we can easily fix).

Neither seems a particularly good reason to re-write the functionality from scratch.
User avatar
Brent Easton
 
Posts: 3225
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

PreviousNext

Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests