killfrenzy96 / KillFrenzyVRCAvatarKeyboard

Avatar Keyboard that takes advantage of the SDK3 parameter sync
20 stars 2 forks source link

Parameter Compression? #3

Open kitlith opened 3 years ago

kitlith commented 3 years ago

I'm trying to add this keyboard to some avatars for a friend of mine. One of the avatars only has two parameter slots free, with the rest (other than VRCEmote) taken up by float parameters for various things, but this keyboard takes 5 parameters at the moment.

However, I think we can get it down to 3 parameters "easily", maybe 2 with a different way of doing keyboard sync.

Since an Int is a 8 bit value, we can fit Item, MarkerGesture, and Keyboard into a single parameter:

This means current parameters could take 6 bits, with 2 extra leftover for expansion (i.e. additional gesture combinations or something) or assistance with keyboard sync.

As for keyboard sync, i'm not quite sure i understand it yet, but is the idea to go like this?

and would a system like the following work/make sense?

tbh i think any system using a single param for the character and up to 3 bits for sync (the two leftover from other parameter + 1 in the char param itself assuming less than 128 chars) could work to get this down to two parameters, if you think there's stuff that'll work better than my off the cuff proposal, then feel free to go with that instead. or just ignore it for the moment, as that's a lotta work to try and cut off one parameter.

killfrenzy96 commented 3 years ago

The keyboard is using 2 syncing parameters because of sync issues when typing at higher speeds. However many of the other gestures can be condensed. At this time, they are not condensed for menu UI clarity purposes, but I can easily combine VRCEmote, Marker, and MarkerGesture together without any real compromise or complexity.

To combine the Keyboard param with the above params would require some workarounds to ensure late loading works correctly. It is possible, but at the compromise of the menu UI not showing if the keyboard is active or not.