Formspec Discussion

Post Reply
User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Formspec Discussion

by LMD » Post

In my opinion, it's getting clear that we are in need for a formspec replacement, or should at least consider adding various styling and alignment features.
First question : Should we have an image-based GUI ? Things look much better then, but we need (a) SVG-Renderer or (b) the GUI is non-scalable. Here's an example(mine, java, unfortunately :/ ) :
Image
Or rather a nice-scalable, hardcoded, GUI...
And how many parametres should the user be able to control ?
At least :
text size, color, font, decoration, bg color, fg color.
Furthermore, please remove this : _ cursor in text field, maybe replace by this | one ?
My stuff: Projects - Mods - Website

User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Formspec Discussion

by v-rob » Post

Pros and cons of each type of GUI type for formspecs:

Hard Coded GUI:

Pros:
  1. This is probably easier to code than image-based GUIs.
  2. Pressure about scaling images properly is much lower.
Cons:
  1. This will ultimately end up with an ugly grey GUI or something similar with little to no customization similar to what we have now.
  2. Images will not stay consistent between screen resolutions. Images that match up in 1920 by 1080 might not in 1600 by 900.
  3. This is totally not ideal for texture packs because hard-coded grey boxes cannot be customized through texture packs.

Image Based Scaleable GUI:

Pros:
  1. Highly customization in themes.
  2. All elements have default images that can be changed with texture packs.
Cons:
  1. Images will not stay consistent between screen resolutions. Images that match up in 1920 by 1080 might not in 1600 by 900.
  2. Scaling images properly will be hard without losing image quality.

Image Based Non-Scaleable GUI:

Pros:
  1. Highly customization in themes.
  2. All elements have default images that can be changed with texture packs.
  3. Image quality is not lost between resolutions because the number of pixels in the formspec are always the same.
  4. Elements always match up because the number of pixels between them is always the same.
Cons:
  1. Formspecs may be very small in large screen resolutions or cut off in small screen resolutions.
Last edited by v-rob on Mon Mar 12, 2018 23:31, edited 1 time in total.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Formspec Discussion

by Linuxdirk » Post

v-rob wrote:Hard Coded GUI
No. Just no. This will end up in a lame compromise like we have right now and in addition to that it won't look good outside the responsible dev's system.
v-rob wrote:Non-Scaleable GUI
It has to work from tiny 4.5" 1280x800 smartphones up to 30" 4K high-end displays. A non-scalable GUI is simply not an option.

User avatar
v-rob
Developer
Posts: 971
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: Formspec Discussion

by v-rob » Post

Linuxdirk wrote:
v-rob wrote:Hard Coded GUI
No. Just no. This will end up in a lame compromise like we have right now and in addition to that it won't look good outside the responsible dev's system.
I didn't say that I was advocating a hard coded GUI. In fact, that's my least favorite option.
Linuxdirk wrote:
v-rob wrote:Non-Scaleable GUI
It has to work from tiny 4.5" 1280x800 smartphones up to 30" 4K high-end displays. A non-scalable GUI is simply not an option.
That leaves an image based GUI as the only option left, unless someone can think of some other option.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: Formspec Discussion

by Sires » Post

I don't have anything important to say.

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Formspec Discussion

by Linuxdirk » Post

v-rob wrote:
Linuxdirk wrote:It has to work from tiny 4.5" 1280x800 smartphones up to 30" 4K high-end displays. A non-scalable GUI is simply not an option.
That leaves an image based GUI as the only option left, [...]
.. left out, yes. Images are horribly scalable. You need to add images for all common resolution to make it look somewhat okay on most clients.

For being properly scalable absolutely NO images should be used for the interface. SVG images with relative/percentual positioning and sizes at least.

User avatar
LMD
Member
Posts: 1397
Joined: Sat Apr 08, 2017 08:16
GitHub: appgurueu
IRC: appguru[eu]
In-game: LMD
Location: Germany
Contact:

Re: Formspec Discussion

by LMD » Post

It would be great if we could support html + css for formspecs....
My stuff: Projects - Mods - Website

Astrobe
Member
Posts: 577
Joined: Sun Apr 01, 2018 10:46

Re: Formspec Discussion

by Astrobe » Post

I would recommend not to go for more complex GUIs but more simple ones. Complex GUIs full of buttons, checkboxes etc. will be bad on small screens no matter what. Text input on Android is never pleasant. Formspecs break the flow of the game.

You don't need scalable GUIs and what not. You shouldn't need more that 1280x800 for your UI. Desktop users don't fully benefit from their 4K screens, so what?
Minetest is not a spreadsheet or a text processor. It's a fraking 3D game.

Don't add more complex GUI features that let people build more complex GUIs that are only worse. Complexity is what happens when you don't know better. Some limitations are features.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests