Toying With This Week (Dec 20 - Dec 26)
Added 2020-12-20 14:39:29 +0000 UTCWell it turns out I spent this past week working on the one thing I didn't want to. π
This week might be slow. I'm off work but Christmas is such a busy time even with the pandemic preventing family gatherings.
I think I want to just spend the week working on the whole 'Teases' thing I had mentioned in a past post. I can't see it being finished any time soon so there might be no major updates this week. I might also add the ability for scripts to show a dynamic line of text while running. So scripts can show a bit of output without needing to resort to using the Text to Speech block or something just to get some feedback.
I may also work on Erostek serial support, but again it might take more than a week even if I do work on it.
New stuff from last week:
Alternate Pattern Creation Types
I wanted to work on adding support for Erostek serial connections...but I realized there's no way of porting how pattern scripts work to work with Erostek. I'll need a limited feature set specifically for Erostek patterns because I need to let the device run the pattern itself for the most part instead of XToys sending continual requests.
I didn't want to be solving both serial connections, a complicated new pattern creation method and how to support multiple types of patterns at the same time. So I decided to start with the much easier to implement alternate pattern type of drawing a pattern.

It's now possible to draw a pattern with your finger and save and publish it like with regular scripted patterns. This wasn't too bad to implement, the most complicated bit was figuring out how to store the data and how to handle drawing a two channel pattern with a mouse where multi-touch isn't an option.
I ended up storing the data in funscripts format (array of value/timestamp pairs) which has the added benefit of being able to directly use any existing funscript scripts from Eroscripts and such. I decided to just expose the raw funscripts data in a separate tab while creating the pattern just to make it as simple as possible to use a funscript.
...of course there's the fact that XToys currently supports 0 toys that have positional controls like most funscripts are designed for...but that's a different issue.
Script Control of Patterns
Since I was stuck working this week on improving patterns anyway I decided to finally tackle the last major outstanding XToys issue of scripts being unable to change patterns.
Of course pattern control wasn't going to work with how scripts are set up to only connect to single channels so that had to be fixed. Scripts can now be configured to connect to multi-channel toys but you have to pick what parts the toy has instead of selecting a specific toy like how things worked a month ago.

After that adding support wasn't too bad. Pattern code is just directly embedded in the Script so it doesn't matter if the user has saved a pattern to their patterns or not.
Real-time Drawing of a Pattern
It would've been odd to release support for drawing a pattern without letting users draw a pattern while playing with a toy. Especially since that is one of the last major functionality things that's missing from XToys that every other vendor created app supports.
Local support was easy enough...figuring out all the little nuances of online support was terrible. But it works now and XToys is way more useful now for just impromptu controlling a toy.
