Question about Anim.Filmstrip and requesting working example

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
mugenjohncel
Hentai Poofter
Posts: 2121
Joined: Sat Feb 04, 2006 11:13 pm
Organization: Studio Mugenjohncel
Location: Philippines
Contact:

Question about Anim.Filmstrip and requesting working example

#1 Post by mugenjohncel »

Spent 6 hours figuring out one... very specific thing and how does it work... with no success.

Code: Select all

image film = anim.Filmstrip("klank_01.png", (Uh... I am clueless what to put in here)
where "blank" by "blank" is the frame size of the animation, blank is the number of columns of frames, "blank" is the number of rows of animation, and "blank" is how long we loop between frames.
Uh... Still clueless... I don't get it... HELP!...


OK... Once again I am stuck and I am going to need all the help I could get.

This time my question is all about Anim.Filmstrip and as of writting I still don't get it.

Well... I do have a partial idea how it works but I don't have a clue how to implement it in ren'py.

Attached here is a preview of an image I am going to use on My Dear teacher - Mr.K project. (please see attachement)

So far, this is what I understand about anim.filmstrip...
I am aware of the fact that anim.filmstrip is very similar to im.crops.

It is more efficient than regular animation since only one image is loaded
What I'm requesting here is for someone to show me a working example for the image I am currently working (See Attachement).

There will be 10 frames of animation involved here all neatly arranged side by side in a single image and each single frame is 800 pixels by 600 pixels. The whole image itself will measure 8000 pixels by 600 pixels and each individual frame will be showed for about half a second starting from frame 01 up to frame 10.

Thanks in advance.

(...goes back to work)

User avatar
DaFool
Lemma-Class Veteran
Posts: 4171
Joined: Tue Aug 01, 2006 12:39 pm
Contact:

#2 Post by DaFool »

anim.Filmstrip (image, framesize, gridsize, delay, frames=None, loop=True, **properties):

Code: Select all

    $ wowanimation = anim.Filmstrip(
             "problem.jpg",
             (800,600),
             (10,1),
             .5, 10, False, )
Note: Not tested, just hacked from something else I had already.

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:

#3 Post by PyTom »

Ren'Py can't deal with an 8000x600 image. It's too large, the image cache will start thrashing around and make a mess, especially since anim.Filmstrip uses twice the memory of a normal Animation. Use a normal Animation with multiple images, and you probably want to bump up config.image_cache_size. (Going from memory here, check the docs for the right name of the variable.)
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

derik
Regular
Posts: 57
Joined: Wed Oct 18, 2006 4:56 am
Contact:

Re: Question about Anim.Filmstrip and requesting working exa

#4 Post by derik »

mugenjohncel wrote:There will be 10 frames of animation involved here all neatly arranged side by side in a single image and each single frame is 800 pixels by 600 pixels. The whole image itself will measure 8000 pixels by 600 pixels and each individual frame will be showed for about half a second starting from frame 01 up to frame 10.
If it's full-frame, you shouldn't be usign a filmstrip for it, you want a normal animation.

IIRC, the demo uses the filmstrip for the cherry blossom animation. You could use it for other things (like an explicitly positioned background element) but the point is-- it's meant for SMALL things.

Post Reply

Who is online

Users browsing this forum: No registered users