#1 2016-08-18 13:31:26

RaZgRiZ
Moderator

ALUI mod [ Alternate User Interface ]

Intro & Story

So for those who remember Tesseract back when it still had support for sauerbraten, its UI was nothing sort of placeholders. An ugly assortment of placeholders. With the newfound power of nnui at my hands I set out to document its functions and create a new library of extended functions that could be customized to serve a variety of purposes or fulfill a multitude of graphical needs easily.

The result was ALUI, a complete makeover of the default UI which managed to garner enough attention to be implemented in the game as the default. The problem however was that I didn't have commit access, so any further changes I had to discuss with Nieb before he would port them over. Eventually it was clear the partnership wasn't meant to be because his vision of the UI was different and we disagreed on a lot of points about the design.
Subsequently he became too busy with life or other projects of his to dedicate time and effort to Tesseract, which meant that both map-wise and UI-wise, the game was left rather stale, and my mod remained in the game in a state that is painful to look at, considering how much more it's meant to be.

With that little wall of text out of the way, I do believe it's time to present the mod itself. But first, here's the github page for anyone interested: https://github.com/coornio/ALUI/tree/master. This will allow you to monitor any changes I've done.

The project is ongoing but slow. Feedback would be welcome, amazing UI ideas that sound possible even more so!

Features
  • Library of extended UI functions, some of which can be customized by the use of Styles!

  • Library of predefined Styles for said functions as well as default theme settings!

  • UI modularity, mix & match your UI funcs to make easy menus of your own that look just how you want them!

  • Define binds ANYWHERE! You can have binds that only exist within a certain menu! The best thing is, they won't override the defaults! Go wild!

  • Combination keys are possible! Ever wanted to press 4 different keys to call an action? Now you can!

  • If you ever hated the fact that UIs in Sauerbraten and Redeclipse have to go through dozens of menus to find what you want, then the new editing hud is gonna blow your mind! Fo Reelz!

Installation

It's rather straightforward:

./config/
__glsl/
__glsl.cfg
__server-init.cfg

Those are the files/folders that should remain, the rest can be safely deleted so the mod can be installed. Make sure you run the game without saved.cfg & restore.cfg, otherwise it's likely that something will not work correctly!

Warning

This mod is NOT complete and thus a lot of required UI functionality is either partially implemented or not at all. If, for example, you were expecting an UI that handles map vars such as colors, there's no such thing implemented yet. Additionally, the CCI is a demo and not meant to work.
As far as bindings are concerned, the Reference UI is a placeholder. It does not show any info regarding which buttons do what, so you may wish to look inside default.cfg to learn how the binds are implemented. I will be adding a little table in this thread later listing the binds for easier access.

Gallery

2016-08-18_15.35.39_complex_edit.png?raw=1
2016-08-18_15.37.05_complex_edit.png?raw=1
2016-08-18_15.37.40_complex_edit.png?raw=1
2016-08-18_15.38.38_complex_edit.png?raw=1
2016-08-18_15.40.13_complex_edit.png?raw=1
2016-08-18_15.55.10_complex_edit.png?raw=1
2016-08-18_16.01.14_complex_edit.png?raw=1
2016-10-02_03.00.00_complex_ptdm.png?raw=1
2016-08-25_18.37.22.png?raw=1
2016-08-23_22.41.20.png?raw=1
2016-10-01_14.13.37.png?raw=1

Last edited by RaZgRiZ (2016-10-02 00:18:16)

Offline

#2 2016-08-18 16:10:47

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

this is pretty interesting. Ill have to look at this.

Offline

#3 2016-08-23 00:53:20

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

chasester wrote:

this is pretty interesting. Ill have to look at this.

Let me know if something catches your eye :)
Currently working on a little revamp of the options menu. I never liked how it looked and the solution I had for it was meant to be temporary. I think i have that something better now, and all I had to do was recycle code from the server browser. The next commit is gonna be juicier than the last few, that's for sure :P

Offline

#4 2016-08-23 13:36:20

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

ya the options menu should simply be a minimum low better best Ultimate choice. Then it just sets everything for you. having all those options I always found stupid. Maybe just stick them into a "advance" submenu burred somewhere, also there are a lot of options on there that are pointless to have on there. Like v-sync and tear. You really should never turn them off :P Not unless your testing something graphically but for the regular in user its fairly pointless.

@editor

It would be nice to have sub modes (ive always thought this would be cool but nv really took the time to add it). Basically you have modes like Octaedit, texture, lighting, Entities, blendbrush (already added), etc in each mode the key combinations would change slightly and it may turn off certian fetures (like octaedit could turn off entity editing) just basic stuff to change the way things flow to help focus certain workflows. You would just toggle between these so you can have the main easy to reach keys always be the ones you want.

Also v scroll would be nice to have the various type of pasting highlited so you can cycle through them, and select which ones you want.

Lastly, it would be nice to have middle mouse button always freelook/unfreelook basically this would allow for menus to be floating on the screen as you flight through the map. So you could pull up the mapmodel menu find the one you want and then toggle and flight to the location and drop it. rather then having to open an close the menu etc

chasester

Last edited by chasester (2016-08-23 13:42:38)

Offline

#5 2016-08-23 16:49:18

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

chasester wrote:

ya the options menu should simply be a minimum low better best Ultimate choice. Then it just sets everything for you. having all those options I always found stupid. Maybe just stick them into a "advance" submenu burred somewhere, also there are a lot of options on there that are pointless to have on there. Like v-sync and tear. You really should never turn them off :P Not unless your testing something graphically but for the regular in user its fairly pointless.

To be fair, those two are not pointless. Turning vsync on and off is important. I know that for myself at least that the game actually tears if i have both vsync and tear on, but if tear is off it won't tear. Similarly if there's no vsync and tear is off, the screen will tear unless I keep tear on. It's kinda weird and behaves in different ways for different people.
It is true that there's a lot of things that make no sense for the average user, either because they'd never actually mess with them or because they have no idea what they do. I plan to fix that and implement an Advanced section as well, so look forward to that :)

EDIT: by Advanced I mean it will unlock further options to modify. Having preset overall settings like you suggest is gonna be a prick in my butt to keep track of, at least as i'm currently imagining it. We'll see how it works once I actually get to laying the settings out in the UI again.

chasester wrote:

It would be nice to have sub modes (ive always thought this would be cool but nv really took the time to add it). Basically you have modes like Octaedit, texture, lighting, Entities, blendbrush (already added), etc in each mode the key combinations would change slightly and it may turn off certian fetures (like octaedit could turn off entity editing) just basic stuff to change the way things flow to help focus certain workflows. You would just toggle between these so you can have the main easy to reach keys always be the ones you want.

It's interesting but I feel like it would both be complicated to code/keep track of/BUUUUGS and the user might feel overwhelmed dealing with so many different editing "environments" and having to switch between them.


chasester wrote:

Also v scroll would be nice to have the various type of pasting highlited so you can cycle through them, and select which ones you want.

Several vcommands are bound to the arrow keys, but it's not all of them. I want to add better control for as many as possible eventually that doesn't rely on combining 2 to 4 keys to actually use them. It doesn't help with the fact that they can't be remembered easily as such. I think that's pretty much what you're suggesting?


chasester wrote:

Lastly, it would be nice to have middle mouse button always freelook/unfreelook basically this would allow for menus to be floating on the screen as you flight through the map. So you could pull up the mapmodel menu find the one you want and then toggle and flight to the location and drop it. rather then having to open an close the menu etc

Left ALT frees up the cursor to navigate edit menus. This allows you access to both the entity editor and the editvars on the right. Besides that, i'm not sure what you're trying to describe here.

Last edited by RaZgRiZ (2016-08-23 19:29:23)

Offline

#6 2016-08-23 19:49:48

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

Progress update: now the server browser's code is approximately half its size through this next update thanks to cleanups and MOAR MODULARITY RAAAWRR. Quite a bit of cruft removed, and now working on the revamped Options menu. There's a new picture to join the rest now, stay tuned!

Offline

#7 2016-08-25 15:45:35

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

Here's a little teaser of the new face of the Options UI:

2016-08-25_18.37.22.png?raw=1

Still working on it, the tabs may change as I don't exactly feel too happy with them (they do beat using the crappy older version though) and the content is simply copy-pasted in it. Changing that to look better is gonna take some time, sadly.

Last edited by RaZgRiZ (2016-08-25 15:45:50)

Offline

#8 2016-08-25 16:26:39

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

looks so much better :P

Offline

#9 2016-08-25 20:45:46

Hypernova^
Member

Re: ALUI mod [ Alternate User Interface ]

Awesome!!!! So glad that someone is working in the UI area!

Offline

#10 2016-08-27 14:55:34

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

Smallish update out. Mostly about making the CCI usable, for now anyway :P It has no pretty "grafix effex" to speak of, barebones functionality.

Offline

#11 2016-08-28 01:31:38

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

a feature I would like to see is auto setting your graphical settings based on your graphics card. Shouldnt really be that hard to figure out. Cube knows your card at start any way :o or you can just base it on the frame rate as well.

Offline

#12 2016-08-28 17:21:35

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

chasester wrote:

a feature I would like to see is auto setting your graphical settings based on your graphics card. Shouldnt really be that hard to figure out. Cube knows your card at start any way :o or you can just base it on the frame rate as well.

There's rudimentary automation for the resolution, but there's no way to have access to the GPU info in order to do what you're suggesting :P
It would actually be better if there was a benchmark map to use. That would help users actually pick something that safely falls in the FPS range they're comfortable with.

Offline

#13 2016-08-28 20:09:12

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

your graphics card id and name is displayed at run time. Just crossreffence that with a model number chart for all major gpu brands, and you can do this farily simply. Idk if the gpu name and model are command functions though, If thats what your saying then it would be a quick source code fix to add this :P

chasester

Offline

#14 2016-08-28 22:23:30

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

chasester wrote:

your graphics card id and name is displayed at run time. Just crossreffence that with a model number chart for all major gpu brands, and you can do this farily simply. Idk if the gpu name and model are command functions though, If thats what your saying then it would be a quick source code fix to add this :P

chasester

Yes, I meant I lacked access to actually read that info. Besides, with how many different models there are out there, it's kinda too much. In this case I'd rather stick with your earlier suggestion of a quick overall pick of Low, Med, High :P

It's a lot less work too. But I'd rather work with what I have. Distributing a modified executable just for reading GPU info is not really worth the hassle.

Offline

#15 2016-08-29 06:30:42

GustavoLapasta
Member

Re: ALUI mod [ Alternate User Interface ]

Awesome job RaZgRiZ, congrats!

Offline

#16 2016-08-29 15:33:05

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

Thanks :)

I still don't really have a clue how i'm gonna end up with formatting the options that will be in the.. Options UI though. I'm not a fan of listsliders to be honest, and I'm trying to figure out if there's something I can do that would look cool and also act as a replacement. I think I may have an idea as of this very moment of writing this. I'll get to it soon.

First things first though, I'll at least fix the Map Browser UI to not look like utter crap, and filter maps properly. It's about time I got around to that :P

Offline

#17 2016-08-30 02:48:22

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

honestly,

Id like to see a few new things added to the ui class structure. Like movable windows, sizable windows, And forced positioned windows, non closable windows. A Static module window, and other stuff like this. most this is just about 2 or 3 hours of coding. All the xy coordinates are in the system you just have to allow for the user to set this based on various factors. But I feel thats not the direction of this mod :)

still be something ill probably add  to rival at some point
chasester

Offline

#18 2016-08-30 07:53:08

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

chasester wrote:

honestly,

Id like to see a few new things added to the ui class structure. Like movable windows, sizable windows, And forced positioned windows, non closable windows. A Static module window, and other stuff like this. most this is just about 2 or 3 hours of coding. All the xy coordinates are in the system you just have to allow for the user to set this based on various factors. But I feel thats not the direction of this mod :)

still be something ill probably add  to rival at some point
chasester

Sadly they are things I cannot implement. There's no such pieces of code exposed to cubescript to allow this. There's no way to implement drag'n'drop, no way to read mouse coords on screen, no way to completely prevent an UI from closing (esc always will). Force positioned windows? Eh, if you call aligning it on some side of the screen forced, but that's about it.

If you look carefully in the code, you'll see some mentions of a taskbar. Currently there's not really code in place for it but the basic functionality is there. The idea behind it was to either re-open UIs that you wanted to look at again later or to pin them in a sense, with quick access keys. Pressing ~ for example would then allow you to select up to 5 (or 10?) pinned UIs by use of number. The only reason I haven't implemented that yet is because of screen sizes. I don't know how well text tabs will play with variable widths and I would need special icons for every applicable UI otherwise :/

Offline

#19 2016-08-30 15:27:11

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

I was saying a source mod 0.0 I know that stuff is not in cube script I Wrote a short mod that could move the window around (back and forth, up and down) based on cube script commands (it wouldnt be that hard to change it to drag rather than just move uniformally).

@screen sizes

Every thing in cube is based on a screen size algorithm. You Just have to use percentages, or a -1 to 1 where 0 is the middle. This is standard 3d design, and similar coding in java script (html5 etc). You just have to get the cordents then divide them by the width and height then subtract the width/2 and height/2. Cuz the renderer always starts with the upper left corner (in like 99% of 3d, 2d programs). So you can place things on the screen by just using a simple algorithm that takes all these elements into account. Cube 2 has a lot of examples of this (all the ui hud elements).

As for Icons generally you do a 5:4 and a 16:9 version, then all other screen sizes 16:10 4:3 6:4 etc they all will just be a little stretched, but for the most part it shouldn't honestly matter cuz these are hardly used as formats for monitors.

chasester

Offline

#20 2016-08-30 20:04:29

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

chasester wrote:

I was saying a source mod 0.0 I know that stuff is not in cube script I Wrote a short mod that could move the window around (back and forth, up and down) based on cube script commands (it wouldnt be that hard to change it to drag rather than just move uniformally).

As nice as it would be in some cases, unless you can convince eihrul add such an ability there's not much I can do :(

chasester wrote:

As for Icons generally you do a 5:4 and a 16:9 version, then all other screen sizes 16:10 4:3 6:4 etc they all will just be a little stretched, but for the most part it shouldn't honestly matter cuz these are hardly used as formats for monitors.

I think you misunderstood me here. My concern was that H is always 0..1 but W is 0..?
If someone decides to use a weird ass ratio such as 3:4 (vertical monitor) then what happens? How much is the UI gonna be squished to fit the ratio due to percentage scaling? Scary, scary thoughts.
As a rule of thumb I design my UIs around a 4:3 screen ratio but I prefer not to go beyond 5:4 if possible. I don't want them to shrink to fit, it just looks bad.

Last edited by RaZgRiZ (2016-08-30 23:25:34)

Offline

#21 2016-08-31 08:49:59

catalinux
Member

Re: ALUI mod [ Alternate User Interface ]

If you are interested of a mod in moving windows, input support for the world and windows in the same time, window resizing, multitouch support (android, winrt), password field, color chooser plus palette, scroll by dragging the scroller control plus animated scroll and particle preview take a look here:

http://catalinux.eu/code/ui.cpp

This is how it looks:
http://catalinux.eu/img/edit/desktop1.png
http://catalinux.eu/img/edit/desktop2.png
http://catalinux.eu/img/edit/desktop3.png
http://catalinux.eu/img/edit/tex_utilized.png
http://catalinux.eu/img/edit/wp_ss_20160518_0003.png
http://catalinux.eu/img/edit/wp_ss_20160518_0004.png
http://catalinux.eu/img/edit/wp_ss_20160518_0005.png
http://catalinux.eu/img/edit/wp_ss_20160518_0006.png
http://catalinux.eu/img/edit/wp_ss_20160519_0001.png

Last edited by catalinux (2016-08-31 08:54:07)

Offline

#22 2016-08-31 12:32:36

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

So far i've based my design on the idea that movable windows will not be a thing, so i've tried to keep the important controls that require you seeing what you're doing out of the way as much as possible. Resizing won't be a thing because the UIs are also designed to be a fixed size, and there are shortcomings to the UI internals that prevent me from effectively designing something that relies completely on arbitrary percentages without any hint of magic numbers.

Multi-touch support.. I doubt we need that. Password fields, that COULD be done. It's not terribly hard to modify the existing uifield which, as is currently, cannot even have a fixed size ffs. Color chooser/palette : not in a rush for the former, the latter can be pseudo-made with existing code.
Scrolling is already present and works as intended. Not sure what animated scroll is about. Particle preview could be handy, except we can already just sorta mess with them on the fly, so no rush there either.

Seeing the screenshots, I can tell that some of the UI code you're using is based on my own, but it's also pretty old. Those color sliders you're using are the precursor of the color sliders now used for particles, as showcased on the start of the thread.

Unless you mentioned all that in a sense of having me help you with developing the interface for the catalinux mod? I'd be happy to lend my aid if it's still cubescript, otherwise I'm afraid i'll fall a little short of your expectations :P

Last edited by RaZgRiZ (2016-08-31 12:35:42)

Offline

#23 2016-09-26 07:56:42

RaXaR
Member

Re: ALUI mod [ Alternate User Interface ]

I like this UI mod. I especially like the modular direction you're taking it.
However cube script is one ugly mother and hard to read. :)

Some notes on the F2 and F4 menus:
F2 - I'm not sure if this will work well with a huge number of textures. For instance if you wanted to tag/group the texture by some means.
F4 - If a few more glass/water shaders were added then I think this UI wouldn't work so well.
That's my 2 cents.

Keep it up :)

Offline

#24 2016-09-27 04:35:06

chasester
Member

Re: ALUI mod [ Alternate User Interface ]

@f2
valves engine (source) has a tag system this would be super easy to impliment into cube basically just do a textag "str" "str" "str" "str" (or just seperate by space like default). This could be defined in the *.tex files along with using the textures file name and file path you could easily set up and indexing system, with limited memory use :) In theory you would attatch this data to a proxy texture so you can link to vtexures and not load if the game mode isnt gonna need editmode.

Materiales should be bases and then allow new class times from them. So you could basically create new watter by going. newwatermaterail() then basically use inheridence to change aspect of how it works. This is what I plan to do in my rival mod. So water will be a inheritable class and you will tell it how to render and update. So you can do what ever you want with every material. Then you just have a name tag link between the *.as class file and the material tag. So they can be changed and replaced with ease

Offline

#25 2016-09-28 16:57:12

RaZgRiZ
Moderator

Re: ALUI mod [ Alternate User Interface ]

RaXaR wrote:

I like this UI mod. I especially like the modular direction you're taking it.
However cube script is one ugly mother and hard to read. :)

Some notes on the F2 and F4 menus:
F2 - I'm not sure if this will work well with a huge number of textures. For instance if you wanted to tag/group the texture by some means.
F4 - If a few more glass/water shaders were added then I think this UI wouldn't work so well.
That's my 2 cents.

Keep it up :)

@F2 I do have planned to introduce "at some point" a system that allows you to define tags for textures, as well as categories/artists. It's pretty low on the TO-DO list though considering the work that needs to go into it and the fact that there's hardly any influx of media happening these past months.

@F4 I'm not sure why you'd think that. Currently additional water/glass/lava material definitions extend to 'matnameN' where matname is the material and N the index starting from 1. It's hardcoded to 4 variations for each aforementioned material but you can easily switch between them by pressing the same button while the UI is still on.

On another note, I recently found a nice job so i've been missing most of my waking hours.. well, working. Putting effort into this mod is drastically delayed while I still get my bearings so uhm, bear with me for that map browser update? I swear I have something cool in the works :P

Offline

Board footer