DoLoop refactor #22

Open
opened 2026-10-03 01:32:27 +00:00 by tidgp · 1 comment
Collaborator

tldr: @BorderOfExtacy what do you think of me doing this (based on settingsRefactor ig):

  1. refactor DoLoop (& maybe SwitchToPeener GetNaked etc) for legibility and simplicity while preserving existing behavior exactly
  2. incrementally fix issues with that as a starting point

also are any of the learnings below false as far as you know


i keep flipflopping between

  • upstreaming my logger (need to add couple examples & docs)
  • upstreaming baby-steps fixes to NRE in DoLoop
  • rewriting DoLoop

i may eventually do some of these in some order
like, is it worth spending more time learning the insane details of how its currently working over just making it sane according to my current incomplete understanding:

  • everything's anchored on the Part
  • everything's concurrent aka everybody's on their own DoLoop
    • but i'm fairly sure any given player's code only yields at PassionCommon.Wait calls, never in between them
  • Players can have Partners which matter probably for pregnancy and maybe also other things. not sure how smart it is about assigning them, since in theory it should respect both player attraction stuff and also position actor action stuff, and i kind of doubt that's being respected
  • one of the players is the Initiator and the current code probably maybe always ensures there's an initiator (but maybe race conditions during start/stop)
    • most of the code sanely understands (a) what is the job of all players for themselves and (b) what is the job of the initiator to do for all the players, except that every actor also messes with the outfits of his partner when stopping (=> NREs)
  • pretty sure the code doesn't have a sensible idea about minSims and just pretends it's equal to maxSims; fair enough, that's less of a bug and more of a missing feature

some existing problems in severity order

  • sometimes one player starts the main loop before the other is ready (=> NRE). really hard to reproduce, no pun intended
  • sometimes players are assigned to wrong-sex actor-slot
  • sometimes one (all?) players get into a state where they ignore what the positions say about undressing parts until the whole interaction is done. i think Ask To Join makes this path more likely
  • commonly during "start" sims t-pose on top of each other for an unreasonably long time (maybe, the length of an animation which is playing and not playing at the same time)
  • sometimes when one sim stops, the other keeps the previous animation going till its done
  • if one player fires change-position interaction, his animation freezes till animation is done or something
  • sometimes during "start" one player starts position early

some other problems which are less directly related

  • you can fire interactions which are guaranteed to fail due to no compatible position (e.g. Move Group To part)
  • you can fire interactions which don't make sense (Switch Position when incompatible)
**tldr:** @BorderOfExtacy what do you think of me doing this (based on settingsRefactor ig): 1. refactor DoLoop (& maybe SwitchToPeener GetNaked etc) for legibility and simplicity while preserving existing behavior exactly 2. incrementally fix issues with that as a starting point also are any of the learnings below false as far as you know <hr> i keep flipflopping between - upstreaming my logger (need to add couple examples & docs) - upstreaming baby-steps fixes to NRE in DoLoop - rewriting DoLoop i may eventually do some of these in some order like, is it worth spending more time learning the insane details of how its currently working over just making it sane according to my current incomplete understanding: - everything's anchored on the Part - everything's concurrent aka everybody's on their own DoLoop - but i'm _fairly sure_ any given player's code only yields at PassionCommon.Wait calls, never in between them - Players can have Partners which matter probably for pregnancy and maybe also other things. not sure how smart it is about assigning them, since in theory it should respect both player attraction stuff and also position actor action stuff, and i kind of doubt that's being respected - one of the players is the Initiator and the current code _probably maybe_ always ensures there's an initiator (but maybe race conditions during start/stop) - most of the code sanely understands (a) what is the job of all players for themselves and (b) what is the job of the initiator to do for all the players, except that every actor also messes with the outfits of his partner when stopping (=> NREs) - pretty sure the code doesn't have a sensible idea about `minSims` and just pretends it's equal to `maxSims`; fair enough, that's less of a bug and more of a missing feature some existing problems in severity order - sometimes one player starts the main loop before the other is `ready` (=> NRE). really hard to reproduce, no pun intended - sometimes players are assigned to wrong-sex actor-slot - sometimes one (all?) players get into a state where they ignore what the positions say about undressing parts until the whole interaction is done. i think Ask To Join makes this path more likely - commonly during "start" sims t-pose on top of each other for an unreasonably long time (maybe, the length of an animation which is playing and not playing at the same time) - sometimes when one sim stops, the other keeps the previous animation going till its done - if one player fires change-position interaction, his animation freezes till animation is done or something - sometimes during "start" one player starts position early some other problems which are less directly related - you can fire interactions which are guaranteed to fail due to no compatible position (e.g. Move Group To part) - you can fire interactions which don't make sense (Switch Position when incompatible)
tidgp self-assigned this 2026-10-03 02:24:45 +00:00

GO AHEAD BOSS!! DoLoop has been a terrifying elephant in the room as i work on other things so if you wanna wrangle a refactor to make it suck less i give you all the psychic power i have

GO AHEAD BOSS!! DoLoop has been a terrifying elephant in the room as i work on other things so if you wanna wrangle a refactor to make it suck less i give you all the psychic power i have
Sign in to join this conversation.
No description provided.