(Technical, Code architecture) How are large sandbox games with lots of customizability designed? (Strive4Power, COC)

fassass

Newbie
Nov 12, 2017
19
8
I've got over 5 years making games & doing software, and for my next project, I want to make a porn sandbox with a lot of character customization. I have the combat, character stats, and some basic UI done, however I struggle a lot with the procedural elements/sandbox elements.

This game will be very similar to TITS, COC and Liliths throne with its character customizaiblity. It will have a lot of menuing, and be fully 2d with lots of text.

I'm making this game in Godot, although I'm open to general advice on this topic. My questions are as follows:

1. How is the architecture of sandbox interactivity -> custom event scenes -> back to sandbox interactivity usually handled? As in, if I have a character exploring, then I have them do something, how do we go back to the exploring section? Is it like a separate layer that's overlaid on top of the overworld logic? Or is it more like there's an overworld loop, and we break out of it for a scene, then go back to the loop? If this question sounds stupid, then I understand. Im not really explaining it that well.

2. How is saving state between scenes & save files usually handled? Is it all serialized in a huge JSON, or is there a more elegant solution?

3. Does anyone actually care about the performance of text-based games (liliths throne, No Haven)? Both these games are quite laggy, but I don't see many references to that fact during discussion.

4. How are things like appearance/race actually handled in code? TITS has over 20 values with unique identifiers ( ) - and making a dedicated class for this aint to difficult for someone of my skill. Still, I was wondering if theres a blogpost/devlog on this or something similar.

5. How are procedural sex events usually scripted (like in liliths throne and strive4power). Do these games have source code I can analyze?

That's most of the questions I can think of currently. I'll ask more later.

Overall, the hardest part is DEFINETLY the procedural generation in these games.
 

Satori6

Game Developer
Aug 29, 2023
440
840
I've got over 5 years making games & doing software, and for my next project, I want to make a porn sandbox with a lot of character customization. I have the combat, character stats, and some basic UI done, however I struggle a lot with the procedural elements/sandbox elements.

This game will be very similar to TITS, COC and Liliths throne with its character customizaiblity. It will have a lot of menuing, and be fully 2d with lots of text.

I'm making this game in Godot, although I'm open to general advice on this topic. My questions are as follows:

1. How is the architecture of sandbox interactivity -> custom event scenes -> back to sandbox interactivity usually handled? As in, if I have a character exploring, then I have them do something, how do we go back to the exploring section? Is it like a separate layer that's overlaid on top of the overworld logic? Or is it more like there's an overworld loop, and we break out of it for a scene, then go back to the loop? If this question sounds stupid, then I understand. Im not really explaining it that well.

2. How is saving state between scenes & save files usually handled? Is it all serialized in a huge JSON, or is there a more elegant solution?

3. Does anyone actually care about the performance of text-based games (liliths throne, No Haven)? Both these games are quite laggy, but I don't see many references to that fact during discussion.

4. How are things like appearance/race actually handled in code? TITS has over 20 values with unique identifiers ( ) - and making a dedicated class for this aint to difficult for someone of my skill. Still, I was wondering if theres a blogpost/devlog on this or something similar.

5. How are procedural sex events usually scripted (like in liliths throne and strive4power). Do these games have source code I can analyze?

That's most of the questions I can think of currently. I'll ask more later.

Overall, the hardest part is DEFINETLY the procedural generation in these games.
1: Overworld
> Visit Area
> Check flags & variables for pre scripted scenes (plot) and trigger the special scene instead of loading the area (or redirect before rendering the area).
> If that didn't trigger, check for random events and trigger them if the conditions are met, instead of loading the area (or redirect).
> If no special/random events were triggered, load the area as usual.
> Otherwise save the area and when appropriate (ie; the event doesn't move you to a different place) load it once the current plot or random scene is over.
> Add flags as needed to avoid random events from chaining or repeating right after they're over.

2: Most sandbox games use Twine with SugarCube, which automatically handles saves. For other cases, JSON seems like the simplest approach. Just make sure not to save any images on b64 or other stuff that bloats the size of a save file.

3: Lilith's Throne had awful performance. It wasn't the only reason why I stopped playing it (I disliked the game in general), but it was one of them. There's no reason for a text-based game to be laggy on 2024 hardware.

4: Not sure, but maybe the could be used to get an idea.

5: You can analyze DoL's code, which is probably the best modern example of a sandbox with random event/sex generation.
 

fassass

Newbie
Nov 12, 2017
19
8
Holy shit, thank you so much.

I considered using Twine (and honestly I might make a simple game to get my name out there), but for a more complex game like the one I want to make, Godot is the best choice for me. I'll post something soon...