XaiJu
vrengames
vrengames

patreon


Introducing the GroupDisplayManager Class

I have a relatively technically post for today, to detail the strides that have been made towards supporting displaying multiple characters at once.

tl;dr - Girls can now be put into a group. The whole group can be displayed, with one person as the "primary" and all other girls drawn behind and smaller than her image. 

Now for the details, which I hope will be helpful for any modders and interesting to everyone else (everyone else who is still reading this, at least). A new class has been introduced to support the easy drawing of multiple characters at once, GroupDisplayManager. At the start of an event that should include multiple girls an instance of this class can be created, handing a list of girls and, optionally, which one should start as the primary speaker.

An instance of GroupDisplayManager can be told to draw a person in a similar way to a solo Person, with the exception that the person to be updated is handed as the first parameter. When given a draw GroupDisplayManager checks to see where that person is in the group of girls as well as how far away they are from the primary speaker. The draw parameters are then updated to put the displayable into the correct position on the screen relative to all of the other characters, as well as set the zorder of the character so they appear behind the primary speaker (as well as all other characters closer to the primary speaker). Note that a single character can be drawn and redrawn without the entire character stack having to be updated. For almost all draw calls in scenes involving groups code has gone from looking like:
   $ a_person.draw_person(position = "blowjob")
to:
   $ the_group.draw_person(a_person, position = "blowjob")
which satisfies my goal of keeping the interface as identical as possible.

GroupDisplayManager has a few other functions that make it especially useful. First, it stores the last set of draw commands that were given for each character in the group. This allows for characters to be redrawn at will without compromising the character display state of the scene. This comes up often when the primary speaker in a conversation is changing often, as the primary must be redrawn at a larger scale and the old primary must be redrawn at a smaller scale. It is also possible with a single command to draw every person in the group, for quick setup at the start of an event.

I have started updating old events that contained multiple characters to use this new group display. I'm happy with how much more smoothly conversations seem to flow and how much easier it is to convey group activities. Scenes where multiple girls are stripping down at once have been particularly improved, as you no longer need to arbitrarily pick who to focus on (potentially missing out on the "interesting" clothing choices of otherwise unassuming girls.)

Performance wise the work I have done so far is working fantastically with animations disabled, and somewhere between poor and acceptable with animations enabled. With two characters on screen the game maintains an acceptable frame rate, but frame rate suffers when more than two girls are being animated or when girls are removing clothing (internally each clothing removal requires two different draws that are faded between). Some initial testing has shown that the slowdown is independent of the actual animation work and is all overhead from the Renpy displayable that enables openGL shader support. If I can find the time I am going to poke around and see if I can improve things; if not, I will likely limit animation to the primary character only.

Once all of the existing events are updated to use the new system I want to write some new ones to show off the new functionality. If you have any ideas for interesting random events that would involve multiple girls leave a comment and let me know!

Comments

Event suggestions: -If you're making out with someone in public but in a 'quiet spot' and someone with high sluttiness is in the area, they notice you and start groping themselves in a way that only you can see. -When a new serum is produced and you choose to do a final test on someone in the office, Stephanie accompanies you and adds some 'suggestions' of her own depending on her sluttiness. Could lead to masturbation/lesbian scenes or have Steph make out with you while the zoned out test-subject watches. -Nora brings a student test-subject she's been hiring on the side with her so she can compare notes. She refers to it as her 'pet project', and through your suggestion it becomes a more directly pet-owner relationship over time. (May or may not be Emily.) -Lily & Mom both under the influence of serum from a dinner you made. Could reprise a family movie-night scene from Lab Rats 1 with this event. -Gabrielle and the other workers at the strip club. -Discover the VIP room at the strip club. Paid event or High-Ob/Slut event. -Event where Lily skips class and visits you at work, meeting Alexia again. Possible modelling crossover with your adspace and her instapic account. -Event where you convince Aunt Rebecca to teach another character how to give a good BJ (which improves their oral skill by 1.)

Dreamdayer

Seems that a like or love of Lingerie drives a woman's Sluttiness through the roof. I have one woman with a Core Sluttiness almost to 500. Seems that lingerie shouldn't drive sluttiness that high. Maybe have the love/like for lingerie lower/ignore the sluttiness modifier/requirements for lingerie and/or give the woman a baseline arousal.

Robert McClenahan

Great work, as always. Also, I don't know if you intended this, but since version 0.32, the game has been much more responsive -- before, when I pressed the "Back" button or loaded game, it would take more time depending on how many girls were hired. Now? It is much faster. EDIT: There are a number of different situations in which I would be interested involving multiple girls: * Catching girls in the workplace "experimenting" with each other, perhaps as an outgrowth of the event in which they were looking at smut * Mom and Lily become more intimate, particularly during the Insta-Pics event chain * Emily and her mother having a threesome with the player * Lily and Gabrielle becoming getting frisky, perhaps while they're sharing a room * Some combination of Lily, Nora, and Emily on campus * Bystanders getting so aroused that they pass a threshold and start initiating with other bystanders * Opportunities for mom and your aunt to fool around, though I have no idea how you would arrange that -- your aunt mentions her sister being jealous, and it would be interesting how that manifested, or if the player was caught with one by the other. Perhaps this sort of thing runs in the family, and your aunt and mother have their own history? Perhaps I'm being too ambitious or single-minded. :P

Eschew Shame

Sounds great, will this require starting a new game too?

Robert McClenahan

It related to the windows UI scaling. If you set the UI scale to 100% it will fix, but it will affect other apps on your computer.

Robert McClenahan

I'm not sure if any one else noticed it but currently when I enable animations half the character picture is pushed off the side. I'm not sure if it's a general scaling issue with Renpy because when I have 4 production lines the 4th one is mostly pushed off the bottom of the screen. I do have windows scaling set to 150% because is use a 4k monitor but I've disabled that for the app and it still has the same issue.

liquidphantom


More Creators