Flash Toy Sync - Sync sex toys to flash games

Apologies to keep pinging you on this JSK thing, but I made an attempt at completing a full game and noted an issue, though again it could just be specific to these games. Here’s a gif of the issue I’m having.
ezgif-7-3116eb260735
I’ve placed the trackers on the couch for visibility.

If I let the animation play through unpaused, they’ll briefly disappear. If I manually step through the frames, the trackers don’t disappear. I’m unsure if this messes with the Handy’s behavior, but it seems to cause some odd jank (ie. unable to track speeds that are trackable in other faster flash animation scenes). It wouldn’t surprise me if its a hidden frame I ended up missing, but I was wondering if you had any insight.

Edit: Nevermind, it looks like all JSK games extend 1 frame past the ones noted in scenes and cause this issue.

No problem! It’s great that you bring up these various issues, it helps a lot.

In this case it’s actually intended to work that way. The reason being that the scene doesn’t end on the last frame of the “main” element in the hierarchy. Because of that, flash-toy-sync assumes that the frame at the end of the loop includes code which causes the scene to go back to the first frame. So if you could step to the last frame, then the code on that frame would be called, resulting in the animation going back to the first frame of the loop.

For the syncing being off, I have implemented so that it includes an extra delay between animation loops to account for it. However, if there’s a slight bit of lag in the animation, then it won’t always loop smoothly.

The way scripts works is that it generates script segments for each scene, where each segment is at least 3 seconds long. So if a scene is 1 seconds long, then it will repeat the script positions for that scene 3 times. So if things doesn’t line up, you should experience a slight bit of drift, with a noticeable jerk around every 3 seconds. Please let me know if that’s the case. Otherwise it’s something else that’s wrong.

Happens with any as2 swf, tested multiple different ones from the google drive. Tried running as admin and compatibility for win 7 and xp, and trying a new connection key. seems like it can never prepare the script properly, or gets stuck in doing so.

Hmm understood, I don’t seem to see any 3 second jank but that might be a good thing. The current situation I’m dealing with is that the funscript loop seems to iterate once, iterate once, then pause for the exact amount of time an iteration would be, then repeat. As far as I’m aware, this is not a maximum speed issue as other animations have even faster speeds. Here’s the video of the iteraction.

ezgif-5-08fadb8c807b

I believe tends to happen with the other JSK animations as well once they reach below 10 frames, they have this odd behavior. Unfortunately, I don’t have any other multi-swf flash games like this, so I can’t test if its a game-specific issue.

Edit: That said, Ive tried another game (all-in-one swf) and that inexplicable “one iteration” pause still happens outside of the 3 second window as well as an occasional long pause (that randomly disappears when playing other animations? inconsistent at best.), but perhaps that’s causing it on purpose.

@BVISOPGGG Ah, but it works with the AS3 ones? The only thing I could think of is that there’s a permission issue causing it to be unable to make any network requests. Since you’re able to access edit mode, try selecting a scene in the scenes panel and hit the P key. That should prepare the script segment for that one scene.

@testyman123 It reminds me of an issue I had after running a different program for theHandy, which used sync offset. They sync offset would then carry over to when I used Flash toy sync. To fix that, I just pulled out the power and plugged it in again.

If that’s not the issue, please link this animation as well.

Removed that edit, I remade parts of that animation and it seemed to disappear, it was likely just the animation being real funky at the time.

Great to hear that you were able to resolve it!!

One way minimize potential issues like that, is to let it play through the scene completely before doing something else in the animation. This is because Flash toy sync doesn’t actually know what is going on in the animation. It just knows what elements there are as well as their current frames and their total frames. It then makes assumptions based on that information for generating the different scenes.

I’m planning on adding more information like this to the github repo wiki, so it’s great knowing what kind of issues people are having.

I’m not being very clear right now, I apologize. The “inexplicable long” iteration is definitely gone, that was a few seconds, but the pause thats is seemingly the exact length of the iteration is still there with this all-in-one. If you want to see it, it can be found here.

I suspect you’re correct and it has to do with the 3-1 second adjustments. The titjob animation is fast, but has a lot of frames to adjust (70+ frames) to where as the 3rd sex animation is fast, but has few frames to use (12 frames), thus causing the iteration pause every other stroke.

I can provide a video of the issue or provide instructions on reproducing if interested, but I don’t want to take up all your time.

No worries! You’re definitely not wasting my time. Making sure that Flash toy sync is compatible with as many animations as possible is my top priority right now, so this is very important. Having as much information as possible only makes things easier, so I appreciate that you’re taking your time to provide it.

I’ll be able to investigate this further later today when I get off work.

@testyman123

I have identified what the problem is and I’m pretty close to have a fix ready.

It turns out the issue is related to the thing where the markers are not visible for a single frame. Which I thought was due to the last frame not being included. But it’s actually because the first frame was not included. This is due to the order that code is processed each frame, which is slightly different between the AS2 and AS3 version.

So the fix I’m working on will correct that so that it should always include the first frame. This fixes even more issues like:

That the markers disappear for a single frame, that it sometimes creates a scene with a single frame when pausing and that some scenes gets stuck in a state where you can’t play them in editor.

This unfortunately means that existing as3 animations will break because of that change, so I’m also working on ways to reduce the amount of work it will take to fix the existing animations. I also wouldn’t mind fixing any animations you (or other people) have been working, for that version as I really don’t want to discourage anyone from working on animations given that there will be breaking changes.

I see, I’m glad a fix is down the pipeline for the AS3 stuff. I should be fine for most of my animations as I’m getting better at making them faster, but I’m glad your looking out for us.

I have added a 2021-12-5-beta folder in the animations-as3 folder on Google Drive for fixed JSON files for the animations that broke due to this change. I will also add other animations that only works in the latest version to that folder.

Fixing AS3 animations

To fix AS3 animations for the latest version, enter edit mode and go through all the scenes in the animation, while keeping an eye on the scenes panel. If you notice that it starts jumping back and fourth between scenes, then the scene is most likely broken.

If the scene it jumps to is a new scene with a single frame, right before a looping scene, then you can merge those two scenes. To merge scenes, hold E and click one of the scenes, then hold Shift and click the other scene so that you have both scenes selected. After that, click the first icon at the bottom of the scenes panel to merge.

After having modified scenes you may get an issue where you’re not able to resume the scene. To fix that, step at least one frame after the first frame and hit Control + I (capital I). This should clear a certain state on the scene which prevents it from playing.

If the scene it jumps to is an existing scene with more than 1 frame, then it means that the scene it jumps to has 1 too many frames. To fix it, it’s recommended that you just remove both scenes and record them again. However, it can also be fixed by modifying the save data.

To modify the save data, you need to generate JSON data so that it can be modified in a text editor. Also, before attempting to modify anything, it’s recommended that you also make a copy that you can use as a backup.

To locate the scene you’re looking for, you can search for one of the frame numbers that you see in the scenes panel. You should be able to find matching frame numbers in the startFrames property. Alternatively, if the child in the hierarchy has a name, you can search for that, which should be found in the path property.

Once you find the correct scene you need to change the following 4 properties: endFrames, basePositions, stimPositions and tipPositions.

endFrames: reduce the last value between the square brackets by 1.
base/stim/tipPositions: All 3 has an identical structure, where each unique position on a frame looks like this [#, #]. Each position that isn’t recorded is marked as null and when there are multiple identical positions in a row, it’s marked with a single numerical value.

If it ends with either [#, #] or null, then remove it along with the last comma that comes before it.
If it’s a numerical value, reduce it by 1.
If it ends with 1, just remove the 1 and the comma that comes before it.

Once you have modified the JSON file, you need to remove the save data sharedObject for the animation, so that it loads the data from the JSON file instead. You can read more about it here: Editor Save Files · notSafeForDev/flash-toy-sync-v3 Wiki · GitHub

2 Likes

How can i use Flash game with intiface-bridge for vibration toys?

Right now there’s no support for it, but It’s something I would like to add.

I don’t own any vibrators, so I wouldn’t really be able to test it. So if you have any that you would recommend, please let me know!

Also, if you know of any flash animations that would work particularly well with a vibrator, feel free to link some. Animations featuring an actual vibrator seems pretty obvious, but perhaps there are other kind of animations that could be interesting to play with a vibrator.

1 Like

@notSafeForDev
image
image

Working on JSK games again. How would you advise moving about these two errors? For reference, the JSON file with the handy script is about 476kb. Edit: (looks like it doesn’t get the error if I limit it below 415kb, but it could just be a bad command.

Separately, I’m having this happen on a different one: image
No script connection is made until a scene is selected, then it acts as normal. The size of this one is only 376 kb.

The issue for intiface-bridge was that I used the default size limit for requests. I have now increased that to 10mb. Which should be more than enough. For example, the Shinobi Girl standalone animation’s JSON file is 435kb, and the request it makes when playing is 0.4mb. However, it could be far smaller than that, so I’ll probably look into optimizing that and see if it speeds things up.

As for the second issue, where the animation isn’t sized and positioned correctly: I usually only get that issue while it’s loading things. But for you, if I understood you correctly, you have to select a scene in the scene panel to get it to display correctly?

Looks like the size fix for initiface worked! As for the second issue, yes. Once I select a scene from the panel, it’ll load everything correctly. As one may expect, it doesn’t attempt to prepare the script either. I’m not sure if a bad command ended up getting left in, but I can’t seem to find it. Here’s the script if curious. It should be noted that I haven’t experienced this anywhere else so I could just be this one game.

Thanks again for linking it, it have been super helpful for tracking down these issues!

The issue was caused by the child structure of this animation, which now that I think about it, is probably only because it loads in external animations.

Random question, I’m working on a game here:

It’s technically complete, but it has this behavior. The game “speeds up” animations by just speeding up the frames, meaning that the faster animations isn’t a different set of frames, just the same set sped up. It’s difficult to explain with words, but the funscript essentially only has one set of movements for that animation since the frame set is singular regardless of speed selected. If you try to select a faster speed, it introduces some odd behavior into the script.

Do you think this issue is with the tool or the game? It should be noted that this game maker is the only game I’ve found that does this so it could just be a habit of theirs.

1 Like

Yep, that’s one of the few animations where the game changes frame rate in order to change the speed of the animations. Right now Flash-toy-sync assumes that all scenes are played at the same frame rate.

I’m finishing up an update to get buttplug.io to be able to play the script more smoothly, especially fast scenes. After that I’ll have a look at this issue.