Are there any basic standalone Orders/Build Menu chili widgets?
Posted: 23 May 2016, 08:25
Similar to the default build menu?
Open Source Realtime Strategy Game Engine
https://springrts.com/phpbb/
They don't; that's why there is a lua tutorial, good quality documentation of the lua API, and a chili tutorial. The general feeling (as inferred from what is available) is that game devs needing to use lua and chili should learn both of them.Why does everyone here seem to think that putting basic functionality out of easy reach is a good thing?
Maybe the real problem then is that UI needs to be created entirely with code which is hard. If only we had an ingame GUI editorForboding Angel wrote:Maybe the fact that I don't know lua and therefore and trying to figure out what to use (currently the default).
Because there is no single, uniform "build menu" that will work for all games. I worked a bit on making something for MCL and it's completely different than what you'd want for ZK, Evo or BA. Essentially, it's a lot more important that you're provided with base components so you can make the UI for your game with little difficulty.Forboding Angel wrote:Why does everyone here seem to think that putting basic functionality out of easy reach is a good thing?
If that's the case, then why does the default ui exist? Your argument defeats your point.gajop wrote:Because there is no single, uniform "build menu" that will work for all games.
I think asking that anyone wanting to work on non-art aspects of Spring games should learn lua, and asking that anyone wanting to work on Chili based GUIs should learn Chili, are unavoiable and entirely reasonable expectations.That is an unreasonable expectation
It is not, but they don't and afaik no one is currently writing them - so realistically your most productive short term option is to gain a sense of altruism and start writing them.It isn't unreasonable to want all the basic UI pieces to have chili counterparts in the most basic form
You and I have different definitions of how chili should be used apparently.Silentwings wrote:I think asking that anyone wanting to work on non-art aspects of Spring games should learn lua, and asking that anyone wanting to work on Chili based GUIs should learn Chili, are unavoiable and entirely reasonable expectations.That is an unreasonable expectation
Yep, that seems to be the case, which is highly unfortunate.Silentwings wrote:It is not, but they don't and afaik no one is currently writing them.It isn't unreasonable to want all the basic UI pieces to have chili counterparts in the most basic form
You have a lot of nerve saying some shit like this to me.Silentwings wrote:...gain a sense of altruism...
The problem with providing a uniform "chili build menu" is that no serious game will use it without drastic modifications. The original will not get any fixes and improvements and will end up diverging like most things do. It's troublesome to even have game-agnostic libraries and frameworks updated (I'm seeing a small number of contributions sent upstream), so one can expect game-specific things such as GUIs to fare much worse in that regard.Forboding Angel wrote:If that's the case, then why does the default ui exist? Your argument defeats your point.gajop wrote:Because there is no single, uniform "build menu" that will work for all games.
The default UI will work (not terribly well) for at least 90% of the games built on spring currently. That's a pretty good ratio.
Moderator voice: Please stop attacking Silentwings, he's giving you decent feedback. (Also do not begin a discussion regarding that here).Forboding Angel wrote:You have a lot of nerve saying some shit like this to me.
My point was that it would make sense to bundle the latest version of chili (at the time) with the engine release in basecontent. Along with it, you could recreate all the engine ui in chili in a very basic fashion, and have it be the "default ui". It kills several birds with one stone.gajop wrote:The problem with providing a uniform "chili build menu" is that no serious game will use it without drastic modifications. The original will not get any fixes and improvements and will end up diverging like most things do. It's troublesome to even have game-agnostic libraries and frameworks updated (I'm seeing a small number of contributions sent upstream), so one can expect game-specific things such as GUIs to fare much worse in that regard.Forboding Angel wrote:If that's the case, then why does the default ui exist? Your argument defeats your point.gajop wrote:Because there is no single, uniform "build menu" that will work for all games.
The default UI will work (not terribly well) for at least 90% of the games built on spring currently. That's a pretty good ratio.
The only rational approach is to add and improve libraries and frameworks*, so creating things like GUIs from scratch doesn't take time and allows you to create some good looking stuff. These things *can* be maintained and updated from upstream which is the important difference.
*I think chili could use an improvement in support for lists and tables, the "layouthandler" and "control" do a poor job there.
Since you brought up the engine UI... that thing needs to die. An *engine* shouldn't have a UI. There's no benefit in providing it, and it certainly shouldn't be used by any game. There's a reason we have it completely disabled by default for all LD games.
This. The problem is not providing a "default UI". It's the fact it would fast become useless.Google_Frog wrote:A small default UI will get outdated if nobody uses it and probably not work, this is awful for new people.
In the case of build/order/state menu, that's exactly what already happenedA small default UI will get outdated if nobody uses it and probably not work
Comments:Silentwings wrote:https://springrts.com/wiki/Chili:Example_3
Actually, I'd give the opposite advice. In general, name controls because it makes debugging massively easier; Chili error messages identify controls by name and a non-helpful name (e.g. button483) is given if you don't specify one.1. Don't specify the name for chili controls unless you're going to search by name. It's not required, and besides taking extra time, might cause you to create name conflicts by accident.
And it says so in tutorial that I wrote https://springrts.com/wiki/Chili:Tutori ... g.2FHiding - in fact you can see both methods used in that example. Afaik they are equivalent. I tend to use AddChild for when I'm adding a temporary child, and parent= for something permanent; I am not sure if others have a convention.2. Not necessarily bad, but you can specify the parent control instead of using the :AddChild method.
Mhm, I didn't write that line... removed them.3. You don't need parentheses in Lua's if statements or for/while conditions