[FEEDBACK] Specify amount of bits for our Integer parameters
Adeon Writer
128 bits is plenty but ints can be wasteful, and it's complicated to set up bitwise logic with bools.
A good compromise is letting us specify how many bits our integer parameters can use; 2 to 8 (perhaps longer?)
This would let toggles use a lower amount of bits and make it easier to squeeze more parameters into the 128 syched bits available.
It would be up to the user to make sure they stay within the range they specified.
Log In
S
Stefleff
Although I don't think there is an easy and user-friendly way to make variable-length integers, I very much would like to see the option for an 4-bit non-signed Integer (Values 0-15) called a Nibble or, probably more intuitive for non-programming users, a Short/ShortInt.
There are many reasons why someone would prefer to use Interger:
- Automatic swapping of toggles in menus
- Easy greater/less/not-equal comparisons
- Ease-of-use handling one parameter instead of multiple
(Compared to an array of bools)
But for many common situations an 8-bit Int is way too overkill, taking up unnecessary space in the memory bandwidth.
For example it's very common for an Int to be used for exclusive toggles in the Menu (meaning toggles where only one option can be active at a time), but rarely do those toggles exceed the size of a submenu, meaning 8 options (9 if you're counting 0).
Another less frequent, but important, use case is the use as an Enum (An Integer encoding different States of a certain thing). And again there are many situations where, at least I personally, didn't need the full 256 range of an Int. A good example here is the GesturesLeft and GestureRight Ints, both of them being an Enum with 8 defined states. (I know that those two don't count to the memory limit, I use it as an example)
The only problem I would see with a ShortInt is how intuitive it is for a non-programming user. Currently there is a 1-to-1 correlation between the data types used in the Parameters Object and the data types used in the Animator. Now if there is a new option, like the short, in the Parameters Object, I could see that there would be some users confused on what that correlates with in the Animator. It obviously would be stated in the documentation that it's a type of Int, but I think that there should also be an additional Info-Box on the Parameters Object that pops-up once you select a ShortInt that says something like:
"A ShortInt is an Integer limited to the values of 0-15, therefore only taking up 4 Bits of memory. It is identical to a normal Int in every other way. A ShortInt has to be defined as an Int in the Animator"
(Also, here is a link to a Canny specifically about ShortInts:
D
Docteh
Two things to note: my parameters file shows 256 bits
a nibble is 4 bits and would be a good potential variable to add, but for my own evil purposes 256 bits is seeming to be enough.
Adeon Writer
Docteh: it was 128 bit max when this canny was written
Errorvator
VRChat, please make this happen! Using parameters drivers for toggles between 4 things is a lot of manual work.