List of Possible Replacements for Lua formspecs

User avatar
ThomasMonroe
Member
 
Posts: 111
Joined: Tue Apr 04, 2017 16:21
GitHub: ThomasMonroe314
IRC: ThomasMonroe Tre
In-game: ThomasMonroe Speedstre314 treston petabyte

List of Possible Replacements for Lua formspecs

by ThomasMonroe » Fri Oct 13, 2017 13:11

Ok so i was having a discussion with rubenwardy, nerzhul, sfan5, and twoelk about possible replacements for the current lua formspec strings.

so here is a list of the ones i have found:
nuklear
Pros:
  • Focus on portability, efficiency and simplicity
  • No dependencies (not even the standard library if not wanted)
  • Low memory footprint with total memory control if needed or wanted
  • Fully skinnable and customizable
  • Lua bindings already builtin
Cons: none that i can find

clutter
Pros: i have no idea
cons: gnome-based

Rexx
pros:
  • fast, native to OS/2
cons: less themeable
My home Server: MM-Survival
My personal server: TM-World(ores galore, i know)


I don't make messes, i just, uh, make disturbances in the local entropy.

I dont think, I KNOW "God's Not Dead"
 

User avatar
v-rob
Member
 
Posts: 280
Joined: Thu Mar 24, 2016 03:19

Re: List of Possible Replacements for Lua formspecs

by v-rob » Fri Oct 13, 2017 15:21

Replacing formspecs would break every mod that uses them. Bad idea, because there are many mods people use that are not developed.
I dislike huge mods, but incomplete mods or mods that could use touching up are even worse.
I don't like playing Minetest as much as I like modding it.
The keyboard sequence to remove all bugs: Ctrl + A, Ctrl + X, Ctrl + S, Alt + F4
 

User avatar
rubenwardy
Moderator
 
Posts: 4761
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: List of Possible Replacements for Lua formspecs

by rubenwardy » Fri Oct 13, 2017 15:29

v-rob wrote:Replacing formspecs would break every mod that uses them. Bad idea, because there are many mods people use that are not developed.


No it won't, formspecs would just be deprecated but still work. Replace is probably a misleading word

Here's the issue about it: https://github.com/minetest/minetest/issues/6527
 

User avatar
TumeniNodes
Member
 
Posts: 2120
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: List of Possible Replacements for Lua formspecs

by TumeniNodes » Fri Oct 13, 2017 15:39

Then, every mod which uses them will need to be updated or replaced.
This has been a plaguing issue for a long time, and the only resolution seems to be a complete replacement, and since Minetest is heading into "breaking" development ground for the next big release, this is the time to do it.

Nuklear looks to be the better option but, that is only going by a quick glance. There are some questions

edit: heh, nvm..., Rubenwardy has explained the "replacement" concerns, above
 

celeron55
Administrator
 
Posts: 443
Joined: Tue Apr 19, 2011 10:10

Re: List of Possible Replacements for Lua formspecs

by celeron55 » Fri Oct 13, 2017 20:41

My opinion has always been that we should have our own pure Lua toolkit. Expose some 2D drawing primitives from core to client-side Lua, and let it do the rest.

It could also be published as a stand-alone library for others to use. AFAIK there is no pure Lua toolkit available at all currently.
 

User avatar
Wuzzy
Member
 
Posts: 2700
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: List of Possible Replacements for Lua formspecs

by Wuzzy » Mon Oct 16, 2017 20:10

It would have been better if MT started with using a tried and tested GUI toolkit from the start instead of using its own. But now it's too late to cry.

Now a switch WILL of course be very painful, but it would also solve many problems with the current system. But we have to throw away a ton of mods, obviously. Such a hard switch would probably not work. Not just from a technical standpoint, but also from a social one. Many modders might feel alienated.

My opinion has always been that we should have our own pure Lua toolkit. Expose some 2D drawing primitives from core to client-side Lua, and let it do the rest.

Oh god, please, no. Please don't outsource everything to Lua just because the engine is lacking features.

This would make mods even more bloated and complicated, forcing them to replicate the same core functionality over and over again. There is going to be a huge amount of reundancy if the engine does not even offer even the most basic widgets like labels, buttons, etc.

I wonder what's next? Outsourcing the rendering routines to Lua? xD This “let Lua do everything” mentality has to stop.

It would also be bad for usability because the widgets which mods come up with are doomed to be inconsistent like hell.


ACTUAL problems with formspecs:
- Coordinate systems are inconsistent and weird
- Missing documentation on coordinate systems
- Very incomplete documentation on the returned fields in the *_receive_fieds callbacks
- Not very flexible

All of these could theoretically be fixed without starting over from scratch.

What's NOT a problem with formspecs:
- That it's string-based. Don't waste your time here, we have much bigger problems



I have a compromise idea: Include a GUI toolkit as suggested, but make this only an internal change. The Lua API stays the same and the formspec strings are then just parsed and translated by the engine to the GUI toolkit calls. This would make the transition 100% backwards-compatible.

Whether to phase out the formspec strings entirely needs to be decided later. Currently, I don't think the string-based system is really a big problem. The messed-up coordinates are much worse.
I'm creating MineClone 2, a Minecraft clone for Minetest. I made the Help modpack, adding in-game help to Minetest.
 


Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 1 guest