CREATE YOUR AI CUM SLUT ON CANDY.AI TRY FOR FREE
x

Upper Limit for Folder Count?

Smegmut

Newbie
Oct 30, 2020
63
30
For those unconvinced that silly questions exist, please see below.


So...


I've been planning a folder tree for the game I wanna make, and being comprehensive with the possibilities.

Very comprehensive.

So comprehensive, in fact, that I've suddenly got over 1.25 million folders ready to fill with media to show all of the possibilities for if the main character is wearing a business suit with pants. This includes stripping what she's wearing to reveal different undergarments (bikini, lingerie, underwear), or dressing in various clothing types, taking selfies or video, masturbating in multitudinous ways, having sex, applying makeup, eating, drinking, etc., and whether these are done at dawn or dusk, at night, during the day, or if the time of day is ambiguous.

The plan has been to copy those 1.25 mil. into sixteen folders for clothing variations the character may wear, and adapt them for a further nine options for other types of dress (or undress - bikini; bathrobe; lingerie; etc.) which won't require quite as many folders, but which will still be deep in six-figure territory.

Once those 25 folders are finalised, I was going to copy them all into a 'Raining' folder (and try and find footage of women doing stuff in the rain, like, you know, using three dildos in the park during a downpour), and also have an 'Others' folder with similar possibilities for actions and attire for random encounters with other folk around the place - which is actually an important part of the plot of the game.

After getting all those in order, they were then going to be copied into my 200-or-so location folders.

At a rough estimate, and if I bravely follow through with this bold effort, this will leave me having created a little over 16 billion folders. (I've only realised this in the last few hours, by the way. It all seemed so sensible when I started.)

Now... I should, at this point, clarify that I never, at any moment, had the intention to fill all those folders with media. If the folder is empty, then the programme will simply not play anything, or be directed to select from a folder with generic media for any action the protagonist may undertake, that would fit most locations or time of day.

My question is then - is this comprehensively, or even definitively insane?

Or might organisation of this calibre actually help when it comes to coding and creating my game?

I suspect it may cause problems with loading or running the game, but I don't know enough to be sure of that, so I thought I'd seek clarification before proceeding.

Thanks in advance,

S.
 
  • Wow
Reactions: tooldev

tooldev

Active Member
Feb 9, 2018
717
647
Oh my - how does one react to this properly? Yes, you might be insane but a little crazy is always a good thing in a human being.

Let me ask something simple: Do you understand regex basics? Does your development environment support it?

Why those questions? Because at least half of all your folders are obsolete when implementing a naming convention for the actual media. And yes, you will run into problems , as your path statement will at some time probably exceed the byte-length for some stupid reason. You have found a sure-fire way to make your development life miserable and bug hunting a real pain.
 
  • Like
Reactions: Smegmut

peterppp

Active Member
Mar 5, 2020
769
1,359
there is no way you need that many unique media requiring a unique folder. whatever you're doing, you're doing it wrong

but ignoring that, you dont need to create the folders before you need them. so then maybe you end up with a few thousand folders with actual media in them
 
  • Like
Reactions: Smegmut

Smegmut

Newbie
Oct 30, 2020
63
30
Oh my - how does one react to this properly? Yes, you might be insane but a little crazy is always a good thing in a human being.

Let me ask something simple: Do you understand regex basics? Does your development environment support it?

Why those questions? Because at least half of all your folders are obsolete when implementing a naming convention for the actual media. And yes, you will run into problems , as your path statement will at some time probably exceed the byte-length for some stupid reason. You have found a sure-fire way to make your development life miserable and bug hunting a real pain.
Thanks TD.

In answer to your question; what's a regex? :D

Actually, I'm not quite that naiive, and maybe do have an idea of what that might mean, but I'm a total greenhorn when it comes to game development. I've never done it before, except that I have made a couple of attempts at turning animated games into real porn ones, and it was while collecting media for that hobby that I decided to try my hand at programming. I like the idea I have, but it sounds like my approach thus far has been quite flawed.

I don't have a development environment yet, and I wondered if there would be one which allows for such a ridiculous number of folders, which is kinda part of why I was asking this question (part of me hoped someone would say 'sure, that's fine but only if you use python' but it sounds like there's much better approaches to all this I should adopt.

As for the naming issues - no, not at all. That's why there are so many folders; the folders give you exactly what's going on for that media file. So, for example, if she decides to take video of herself flashing her tits on top of the mountain at dusk, then the folder path is /mountain/hiking/exercise gear/actions/flashing/tits/mobile/video/dawn or dusk. That's why I thought it might be a good idea, because it actually makes it really easy to organise and find all the files for all the things taking place.

But I appreciate that in doing that all kinds of other issues are waiting to be confronted.

Cheers for the reply bud.

S.
 

zonesamabaka

Member
Feb 5, 2018
134
359
i could be wrong but probably somewhere around 4 billion because of filesystem indexing limits.
MFT in windows, inodes in linux for example both rely on 32 bit integers when storing metadata about files/folders in the system
 
  • Like
Reactions: Smegmut

tooldev

Active Member
Feb 9, 2018
717
647
Thanks TD.

In answer to your question; what's a regex? :D

Actually, I'm not quite that naiive, and maybe do have an idea of what that might mean, but I'm a total greenhorn when it comes to game development. I've never done it before, except that I have made a couple of attempts at turning animated games into real porn ones, and it was while collecting media for that hobby that I decided to try my hand at programming. I like the idea I have, but it sounds like my approach thus far has been quite flawed.

I don't have a development environment yet, and I wondered if there would be one which allows for such a ridiculous number of folders, which is kinda part of why I was asking this question (part of me hoped someone would say 'sure, that's fine but only if you use python' but it sounds like there's much better approaches to all this I should adopt.

As for the naming issues - no, not at all. That's why there are so many folders; the folders give you exactly what's going on for that media file. So, for example, if she decides to take video of herself flashing her tits on top of the mountain at dusk, then the folder path is /mountain/hiking/exercise gear/actions/flashing/tits/mobile/video/dawn or dusk. That's why I thought it might be a good idea, because it actually makes it really easy to organise and find all the files for all the things taking place.

But I appreciate that in doing that all kinds of other issues are waiting to be confronted.

Cheers for the reply bud.

S.
Sorry for the abbreviation, since I usually despise doing that. Regex is short for Regular Expression and I used the short form to simply test your dev background :D
Your answer gave me the reason, how you could possibly play with the idea of using folders the way you described. Software development has some basic rules that are fundamentally different to, how you would sort and arrange things in other real life situations. Your folder structure is basically a transformation of a drawer system for your pictures in real life but no software developer would ever implement something like that in a coded environment.

Early content management systems used something like that with many many folders, but also used an abstracted version of naming and order that was more geared towards software dealing with those folders, than keeping an external observer (human being) informed about what to find where.

Regular expression is a very common way to deal with abundance of files for example that are created outside of a given system. As long as naming convention is followed, software can slice and dice the file-names into parts that the code can then sort accordingly somewhere. While the same info could be stored internally as a detail to a file, the usage of doing it via the file-name itself allows for easy changes without using special tools.
 
  • Like
Reactions: Smegmut

Smegmut

Newbie
Oct 30, 2020
63
30
i could be wrong but probably somewhere around 4 billion because of filesystem indexing limits.
MFT in windows, inodes in linux for example both rely on 32 bit integers when storing metadata about files/folders in the system
Thank you for that answer. It absolutely rules out this absurd approach I've taken, which is good. I like definites.
 

Smegmut

Newbie
Oct 30, 2020
63
30
Sorry for the abbreviation, since I usually despise doing that. Regex is short for Regular Expression and I used the short form to simply test your dev background :D
Your answer gave me the reason, how you could possibly play with the idea of using folders the way you described. Software development has some basic rules that are fundamentally different to, how you would sort and arrange things in other real life situations. Your folder structure is basically a transformation of a drawer system for your pictures in real life but no software developer would ever implement something like that in a coded environment.

Early content management systems used something like that with many many folders, but also used an abstracted version of naming and order that was more geared towards software dealing with those folders, than keeping an external observer (human being) informed about what to find where.

Regular expression is a very common way to deal with abundance of files for example that are created outside of a given system. As long as naming convention is followed, software can slice and dice the file-names into parts that the code can then sort accordingly somewhere. While the same info could be stored internally as a detail to a file, the usage of doing it via the file-name itself allows for easy changes without using special tools.
Cool, thanks again. It sounds like regex is indeed what I thought you were referring to. I did a few slave packs for Brothel King a while ago, and the file naming system there can only have been regex I'd say.

Good to know how I should proceed; it seems my question is well and truly answered.

Your time and effort is much appreciated mate.

S.
 
  • Like
Reactions: tooldev

tooldev

Active Member
Feb 9, 2018
717
647
Cool, thanks again. It sounds like regex is indeed what I thought you were referring to. I did a few slave packs for Brothel King a while ago, and the file naming system there can only have been regex I'd say.

Good to know how I should proceed; it seems my question is well and truly answered.

Your time and effort is much appreciated mate.

S.
Think of the naming convention as your folder structure now. As long as there is either some form of delimiter between the different segments or some logical pattern, that can be applied (the first x number of letters always means action for example), a regex system can be used universally to handle a job as you imagine it.
Naming conventions are a very popular way to solve 2 issues at once. Keeping things readable for a human being but also providing structured ways for a computer system to handle them as well.
 
  • Like
Reactions: Smegmut

Smegmut

Newbie
Oct 30, 2020
63
30
Think of the naming convention as your folder structure now. As long as there is either some form of delimiter between the different segments or some logical pattern, that can be applied (the first x number of letters always means action for example), a regex system can be used universally to handle a job as you imagine it.
Naming conventions are a very popular way to solve 2 issues at once. Keeping things readable for a human being but also providing structured ways for a computer system to handle them as well.
Roger that. It sounds super sensible to me, and great to get that established before I've even begun learning how to code.
 
  • Like
Reactions: tooldev

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
11,006
16,290
[...] that I've suddenly got over 1.25 million folders ready to fill with media [...]
What mean at least 1.25 million pictures, that will have an average size starting at 50KB, what mean at least 50 GB... I'll be honest with you, I'll pass your game...


[...] this will leave me having created a little over 16 billion folders. [...]
Okay, so we aren't anymore talking about a game that will need at least 50 GB of space, but one that will need at least 80 TB...
Even if you achieved to reach a really high level of compression and each one of your images would only take 1KB the game would still need 16 TB...


Now... I should, at this point, clarify that I never, at any moment, had the intention to fill all those folders with media.
This don't really reassure me. Even if only 0.1% of your 16 billions folders have an image, the game would still need 80 GB...


If the folder is empty, then the programme will simply not play anything, or be directed to select from a folder with generic media for any action the protagonist may undertake, that would fit most locations or time of day.
:WaitWhat:


My question is then - is this comprehensively, or even definitively insane?

Or might organisation of this calibre actually help when it comes to coding and creating my game?
It's definitively insane, on so many level.

Your estimated number of images is insane.
Your estimated number of customization, as it can be guessed from your numbers, is insane.
Your idea to split everything in folders with such small granularity is insane.
Your approach of the issue is insane.
The code you would need for this is insane.

What you need is to rely on sprites that you'll build on the fly depending on what (among the few) customization elements have been chosen by the player.
For this you just need to have a sprite for the body, one for the head, and one for each customization elements. Naming the files accordingly; "mcStandingStill_body.png", "mcStandingStill_pant.png", "mcStandingStill_shirt.png" and so on.
Then, you have a code building the sprite, layer by layer, depending on what elements must be present.

in pseudo code:
Code:
function buildSprite( characterObject, baseName )
    elements = Array
    ADD baseName + "_body.png" INTO elements
    IF characterObject.haveArmTatoo
        ADD baseName + "_armTatoo.png" INTO elements
    IF characterObject.wearWhiteShirt
        ADD baseName + "_whiteShirt.png" INTO elements
    ELSE IF characterObject.wearBlueShirt
        ADD baseName + "_blueShirt.png" INTO elements
    ELSE IF characterObject.wearBlackShirt
        ADD baseName + "_blackShirt.png" INTO elements
    [...]

    IF characterObject.haveGreenPant
        ADD baseName + "_GreenPant.png" INTO elements
    ELSE IF characterObject.haveBlackPant
        ADD baseName + "_blackPant.png" INTO elements
    [...]

    [...]

    IF characterObject.isHappy
        ADD baseName + "_faceHappy.png" INTO elements
    ELSE IF characterObject.isAON
        ADD baseName + "_faceGrumpy.png" INTO elements
    [...]

    sprite = new image
    FOR image in elements
        ADD image TO sprite

    DISPLAY sprite
Depending on the game engine you'll use, it can be automated or not; by example Ren'Py have a Layered Image feature that permit to highly automatize all this. Unity surely also have code for this kind of approach.

And now you just need one folder by customizable character.
 

Smegmut

Newbie
Oct 30, 2020
63
30
What mean at least 1.25 million pictures, that will have an average size starting at 50KB, what mean at least 50 GB... I'll be honest with you, I'll pass your game...




Okay, so we aren't anymore talking about a game that will need at least 50 GB of space, but one that will need at least 80 TB...
Even if you achieved to reach a really high level of compression and each one of your images would only take 1KB the game would still need 16 TB...




This don't really reassure me. Even if only 0.1% of your 16 billions folders have an image, the game would still need 80 GB...




:WaitWhat:




It's definitively insane, on so many level.

Your estimated number of images is insane.
Your estimated number of customization, as it can be guessed from your numbers, is insane.
Your idea to split everything in folders with such small granularity is insane.
Your approach of the issue is insane.
The code you would need for this is insane.

What you need is to rely on sprites that you'll build on the fly depending on what (among the few) customization elements have been chosen by the player.
For this you just need to have a sprite for the body, one for the head, and one for each customization elements. Naming the files accordingly; "mcStandingStill_body.png", "mcStandingStill_pant.png", "mcStandingStill_shirt.png" and so on.
Then, you have a code building the sprite, layer by layer, depending on what elements must be present.

in pseudo code:
Code:
function buildSprite( characterObject, baseName )
    elements = Array
    ADD baseName + "_body.png" INTO elements
    IF characterObject.haveArmTatoo
        ADD baseName + "_armTatoo.png" INTO elements
    IF characterObject.wearWhiteShirt
        ADD baseName + "_whiteShirt.png" INTO elements
    ELSE IF characterObject.wearBlueShirt
        ADD baseName + "_blueShirt.png" INTO elements
    ELSE IF characterObject.wearBlackShirt
        ADD baseName + "_blackShirt.png" INTO elements
    [...]

    IF characterObject.haveGreenPant
        ADD baseName + "_GreenPant.png" INTO elements
    ELSE IF characterObject.haveBlackPant
        ADD baseName + "_blackPant.png" INTO elements
    [...]

    [...]

    IF characterObject.isHappy
        ADD baseName + "_faceHappy.png" INTO elements
    ELSE IF characterObject.isAON
        ADD baseName + "_faceGrumpy.png" INTO elements
    [...]

    sprite = new image
    FOR image in elements
        ADD image TO sprite

    DISPLAY sprite
Depending on the game engine you'll use, it can be automated or not; by example Ren'Py have a Layered Image feature that permit to highly automatize all this. Unity surely also have code for this kind of approach.

And now you just need one folder by customizable character.
I don't think you've understood my approach at all, but perhaps I didn't do a good job of explaining myself :)

As you may have seen with the other replies I've now resolved what I'm going to do.

Thanks for your explanation of the sprites too, but I'm aiming to work with real images rather than animations. Should I decide to change from that, then thank you for the assistance.

In any case, cheers!

S.