Could SDT be modified to create only 1 layer with 20 strands, instead of 20 layers?
Not really. If two elements are
capable of independent movement, then Flash draws them on separate layers.
Imagine a spiderweb. It consists of many individual threads. It's possible to twist or stretch one section of the web while the rest of the web scarcely moves. Some threads could be broken, and the spider could then repair them. If an insect lands on the web, its struggles will send vibrations rippling across the web.
Now imagine a photograph of a spiderweb. You can rescale the whole picture or stretch it on a particular axis, but you can't make any internal edits. All of the details and relationships are fixed. If an insect lands on the photograph then nothing will happen.
Flash has trouble with spiderwebs. A
Bukakke.swf file is
not a spiderweb; it's a photograph. It therefore has very good runtime performance, but it won't do any cool physics stuff at runtime. We have achieved performance by eliminating interactivity.
Or alternatively 2 layers, to support the illusion of depth without the performance hit, where the strands alternate between being on layer 1 or layer 2 with each strand produced?
Not really. Reducing the thing to two layers means that you have two photographs instead of one. You can achieve slightly more impressive visuals with two layers (e.g. parallax scrolling), but it's woefully inadequate for a full-body bukkake scene.
What causes the massive bottleneck on framerate with the visual elements?
Short answer: Flash sucks. Long answer: stop derailing this thread with your perfectly reasonable questions! Go
here instead :)
How is the physics cost insignificant? If the physics is what causes the shape change, and shape change is the costly part, then if you completely disabled the physics, then in theory you should get a massive performance boost.
Yes, but then we quickly come back to the "photograph" idea.
We
could press a button and tell SDT to collapse all of the existing strand elements into a single static sprite. The performance would immediately improve.
But then 100ms later ... this static sprite would no longer be appropriate. The girl's body will have moved. We'd need to restore the strands, draw each of them in the new position, and then collapse them back into a static sprite. The complexity of this task is so high (and the expected FPS improvement is so modest) that nobody has bothered to try -- as far as I know. I considered implementing something like this (in order to improve the FPS for complex hairstyles) but quickly gave up.
I ask because it "appears" that you contradict yourself in the last paragraph with stating that the computational cost of the ear strand is minimal because it lacks physics attached to it.
@cmurder's ear-strand is an exception to the principle that
"Bukkake.swf mods are totally static and never show any physics whatsoever." That mod uses rudimentary physics. Since it's capable of independent motion, it occupies a separate layer and incurs a graphics cost. The physics cost is trivial. The graphics cost is small, because it's only one element.
If you injected
30 of those "earring" semen-strand things into your game, then your FPS would plummet.
So, when you state the physics cost is insignificant, are you referring to the mathematics used to calculate the deformation of the shape, or that the shape is deformed because of physics and thus each deformation is costly as each deformation causes a visual performance hit. Could you clarify this for me please?
Neither. The cost is incurred during each frame-draw operation. Physics isn't directly relevant.
Ask Flash to draw a chain consisting of fifty links with physics-based animation. Swing or bounce the chain around and watch the disturbance ripple across its length. Your FPS will be shitty.
Dangle one end of the chain from the ceiling of the scene, so that it forms a vertical line. Cancel out any residual momentum. We'll perform physics calculations on each frame, but they will not change the position of any link. The chain is perfectly at rest. Your FPS will
still be shitty.
Tell Flash to
stop doing physics calculations. The chain will no longer respond to any disturbances. It will remain in whichever shape it occupied when you send the "stop" command. Flash will no longer spend CPU cycles on physics math. Your FPS will improve
by less than 1%.
If you want to significantly improve FPS then you must either remove elements from the scene, or merge them together. So long as elements within the scene are visible, and are
capable of independent movement
(regardless of whether or not they're actually moving right now), those elements will incur a significant cost.
---------------
Any further discussion of Flash performance should be moved to
the other thread (note: you'll probably want to read through some of the posts in that thread before replying, because they'll help you to understand the limitations of Flash). If you want a new
Bukkake.swf mod then please look to the
second post and answer those questions - what's wrong with the existing mods, what should the new mod do differently, what should the new mod look like, etc...