Developer Menu: Textures

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
TomDowd
Newbie
Posts: 21
Joined: Sun Oct 15, 2017 1:21 pm
Completed: Historically, lead designer on MechAssault (Xbox), Duel Masters (PS2), and others. Co-creator of Shadowrun TTRPG and contributor to BattleTech, Earthdawn, Vampire: The Masquerade, and others.
Projects: Currently working on VN Crush Depth
Location: Chicago, IL
Contact:

Developer Menu: Textures

#1 Post by TomDowd »

Questions! With apologies as the forum search isn't working at the moment.

Under the Developer menu, Show Image Load Log, two values display (in addition to the image load list), one for Textures and one for Image Cache.

Textures lists two numbers, what I presume is a count of textures and then their MB load. Is this a current count and load, or cumulative since application start? As part of my troubleshooting for my CRASH: Memory Error posting viewtopic.php?f=32&t=60622 I was monitoring it and it never goes down, only climbs. What exactly are these numbers communicating?

For Image Cache, my game uses a lot of movies and movie-sprites, but that number seems to not be impacted by them. Is it accurate to say that the Image Cache only tracks 2D images even though movies and movie-sprites are set up as Image types? Throughout my game, the Image Cache numbers go up and down as (presumably) images are loaded and unloaded from the cache, unlike the Textures value which only goes up.

Thanks!

TomD

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Developer Menu: Textures

#2 Post by PyTom »

Textures should be the amount of video memory in use, and should go up and down as Ren'Py loads and unloas textures. It will include movie sprites, while the Image Cache only includes 2d images. If you're using too many movie sprites at once, or not hiding them properly, you could see what Ren'Py is showing here.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
TomDowd
Newbie
Posts: 21
Joined: Sun Oct 15, 2017 1:21 pm
Completed: Historically, lead designer on MechAssault (Xbox), Duel Masters (PS2), and others. Co-creator of Shadowrun TTRPG and contributor to BattleTech, Earthdawn, Vampire: The Masquerade, and others.
Projects: Currently working on VN Crush Depth
Location: Chicago, IL
Contact:

Re: Developer Menu: Textures

#3 Post by TomDowd »

This could easily be my problem. There should only be one in use at a time, but it's being used for the side image. Is there something that I should be doing to hide side images? As I indicated in my other thread, my scene backgrounds are nearly always movies (not movie sprites) of about 6 seconds in length (looping).

Thanks!

TomD

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Developer Menu: Textures

#4 Post by PyTom »

Used correctly, side images should hide automatically. (Technically, side images are part of the screen, and the screen goes away.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
TomDowd
Newbie
Posts: 21
Joined: Sun Oct 15, 2017 1:21 pm
Completed: Historically, lead designer on MechAssault (Xbox), Duel Masters (PS2), and others. Co-creator of Shadowrun TTRPG and contributor to BattleTech, Earthdawn, Vampire: The Masquerade, and others.
Projects: Currently working on VN Crush Depth
Location: Chicago, IL
Contact:

Re: Developer Menu: Textures

#5 Post by TomDowd »

I'm creating the side normally (as far as I know) and then just referring to it:

Code: Select all

image side NIXON_Vest angry = Movie(play="video/Portraits/SAY_NIXON_Vest_Angry.webm", mask="video/Portraits/SAY_NIXON_Vest_Angry_MASK.webm")
NIXON_Vest angry "Always best to leave it to the professionals, sir. I get plenty of practice in the dock pool. "
Is there anything else I should be doing? The side, though, is large including an animated element that runs across the top and bottom of the dialogue box as well as animated expressions for the character. Each character has six "expressions". I tried to do it with two different movie sprites but had a performance issue. (Just reading back in the movie-sprite documentation, it may have been a framerate mismatch, but I'm not sure since I made the change a few months ago.)

Thanks!

TomD

User avatar
TomDowd
Newbie
Posts: 21
Joined: Sun Oct 15, 2017 1:21 pm
Completed: Historically, lead designer on MechAssault (Xbox), Duel Masters (PS2), and others. Co-creator of Shadowrun TTRPG and contributor to BattleTech, Earthdawn, Vampire: The Masquerade, and others.
Projects: Currently working on VN Crush Depth
Location: Chicago, IL
Contact:

Re: Developer Menu: Textures

#6 Post by TomDowd »

If I comment out the side display code in the say screen the behavior goes away and the values rise and fall normally.

Also, if I force a script reload during play, the values go down and then start creeping back up. I'm guessing that on a reload the current label is scanned and the necessary textures quickly loaded. Could it be that on a label jump some of the older textures - maybe the one(s) in use at the time of the jump - aren't being unloaded? I know I can see during normal play with the image cache loads prior to a label jump the texture values go up as well, but they don't seem to go down (or go down as much) after the jump.

Thoughts? And thanks!

TomD
(As a caveat, I was in mainstream game development for close to fifteen years, so I know enough to be dangerous and horribly wrong.)

User avatar
TomDowd
Newbie
Posts: 21
Joined: Sun Oct 15, 2017 1:21 pm
Completed: Historically, lead designer on MechAssault (Xbox), Duel Masters (PS2), and others. Co-creator of Shadowrun TTRPG and contributor to BattleTech, Earthdawn, Vampire: The Masquerade, and others.
Projects: Currently working on VN Crush Depth
Location: Chicago, IL
Contact:

Re: Developer Menu: Textures

#7 Post by TomDowd »

More testing needs to be done, but judicious use of renpy.free_memory() seems to be keeping things stable.

EDIT: Spoke too soon. :(

TomD

Post Reply

Who is online

Users browsing this forum: No registered users