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.
If you don't mind, I'd like to ask a question.
Are there ways to retrieve a cached image by integer?
I've already used two ways to do similar things, in the past.
Like naming the actual files as the corresponding integers, then I can convert the integer to a string and it accesses the file directly from the integer. That does make the filenames harder to understand though.
And I've also used a list of the filenames, and pass the index to it to get the actual filename. Which works, except it's additional work, and feels redundant since renpy already caches the images.
...Now that I think about it, though, I haven't seen anything to suggest that renpy even assigns an integer id to images.
Does any of you have any thoughts about this?
As far as normal use of renpy goes it really isn't worth worrying about.
But if you go and make something more intensive, it slowly adds up.
- Ren'Py Creator
- Posts: 15503
- 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
in general, this is a case of premature optimization. A VN has a lot of things that take up memory - images, music files, etc. (Images have to be stored in RAM at 4 bytes per pixel, while the buffering of a music file will take up .5 MB per track.) Unless you're doing something completely absurd involving generated code, saving a few bytes per show and hide statement won't matter.
(When was the last time you backed up your game?)
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom