After struggling a lot with Nifty, I started thinking about maybe switching to Lemur.
I find Nifty very powerful, but there’s missing documentation, it has no new updates, it’s very precise with syntax (XML), and in general, it is hard to use.
However, I feel like people Can easily make Lemur GUIs in mere minutes.
On the other hand, Nifty is very dynamic (I can add my own controls, styles). Is Lemur also that dynamic? (I don’t think “dynamic” is the correct word).
On the yet other hand, Lemur is open-source AND maintained, and I can ask questions on this forum.
And on the yet other other hand (don’t worry - it’s the last hand), Nifty has a great effect system, where you could quickly make tooltips, backgrounds, colours, pulsing colours, pulsing tooltips, images, different styles when hovering, etc.
To finish the post: what do you recommend? Use old Nifty or new Lemur?
Lemur also allows you to write own controls and style and actually you have to write own controls, since it only comes with a basic set of controls currently (though there are some premade ones in pauls’ other software/lemur-proto)
I think Lemur also plans to implement animations but things like tooltips might be up to the user.
In the end the only thing that really matters is what you feel more comfortable with.
I decided to go the Lemur route myself. The main reason I picked that over Nifty or say ToneGodGui was the following:
Many people that start off with Nifty seem to either decide to roll their own UI or go with either Tone or Lemur. I found that a bit… unnerving.
Lemur (to me anyways) is more under active development than ToneGodGui recently (not sure what happened since it was all the rage like a year or so ago).
Starting off with Lemur is silly simple. The quick start guide isn’t too bad (I got hung up at one part but it was easily solved by just downloading another jar).
Cons I’ve found so far with Lemur would be that the documentation and examples are incomplete, and that it is missing some features like radio buttons (but I rolled my own just using checkboxes in Lemur).
For me though I prefer building things in code and that is how you add and make things in Lemur.
If you find section of the docs that are particularly lacking then you can post a problem report to the Lemur project. It bumps it up in my priority that a) it’s still not good enough, and more importantly b) someone actually cares about it.
You just throwing that one out there to see if it sticks, or have you read something here I’ve yet to find?
(Also, can’t you use it now the same way you can semi-use Swing? i.e cautiously with a little pain and some hacks…)
Working with JavaFX professionally now, so that’s interesting.
It does not support this yet. I do have plans for some kind of GUI definition language but it will probably not be XML… as that’s literally the worst way to hand write anything. <sentence><word>I</word><word>have</word><word>do</word><word>it</word><word>at</word><word>work</word><word>and</word><word>I</word><word>hate</word><word>it</word></sentence>
Though I will say that Lemur is one of the few GUI libraries where the code is actually (usually) smaller and more concise than an XML definition would be.
And the problem with the XML is that it becomes very hard to include the fidelity you get with the Java code in the sense of being easily able to specify layout constraints, etc… It’s one of the reasons I haven’t come up with a good DSL yet as I can’t figure out a nice syntax for constraints that isn’t worse than just writing code.
One argument for a separate definition language is “But designers can tweak it and the code doesn’t care.” I’ve never found that true in reality. Designers constantly run into XML problems unless there is an editor. (And an editor doesn’t care about the format.) And no matter what you now have problems on how to hook up those GUI elements to their models. 99% of our Nifty questions here are people struggling with the XML or struggling to hook that up to their code.
What I’d really like is some Photoshop/GIMP export plugins.
My recommendation is to make your game code GUI agnostic, and then make the choice.
Nifty has the advantage of letting you have a UI design via xml and leaving the code just handling controls. The other advantage is that Nifty is engine agnostic that connects to JME with a few lines of code and it works on all platforms (mobile, desktop and android consoles) with little issues. However, besides the very steep learning curve and “figure it out yourself” design, Nifty is not as flexible as you would like and doing it with Java code can be confusing, so clean, simple code philosophy is key here (but a P.I.T.A. when you are prototyping).
Lemur offers a much more friendly alternative, giving you at least the same amount of control like in Nifty but with much less hassle and easier to understand. Makes thigs easier when you want to focus more on the game code than making the UI work through fights. Since it’s JME oriented, your way of thinking does not change and “keeps the flow”. It also supports 3D UI (something that Nifty needs a LOT of unnecessary tricks to do IMO). The disadvantage is that the UI currently is not programmer free and not out-of-the-box solution but requires an initial setup (which is simple, but not as simple as using the jar directly).
Nifty requires a handful of jars other than the engine binaries. Last I used it, I think it was like 4-5 jars… about the same number that Lemur requires. (Basic lemur only requires 2 jars other than Lemur itself.)
Anyway, hand-building jar lists is kind of 1990s technology. As IDE support for modern build tools improves then you won’t have to worry about that.
…which is another Lemur benefit: it and its dependencies are in public maven repos. So use in gradle or maven is really easy.
Note: based on feedback, I’ve recently updated Lemur’s getting started page and also added a section for gradle configuration. Thanks to @thecyberbob for the nudge.
I suppose using a GUI toolkit written by one of the core JME developers (and used by two others), where the developer is actually on the forum 16+ hours every day is probably a distinct advantage also.
She had various life issues going on that caused her to drop out from time to time. My guess is that some life reprioritization occurred. She may pop in again someday, I guess. It’s happened before but not for this long.