Filmstrip at random positions going crazy (and me too)

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
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Filmstrip at random positions going crazy (and me too)

#1 Post by gas »

I've tried everything I know so far. Functions too.
But whatever I try, my anim.Filmstrip() go crazy if I try something dynamical.

It's easy. I have a filmstrip of 5 frames that cycle at 0.1 sec., defined with anim.Filmstrip(). As a single animation, it work fine.

I want for the animation to appear at a random x coordinate after y seconds, play, hide after one cycle, repeat (and could be nice to have a random amount of y delay).

Using block, contain, function, putting inside something and move that something... whatever, the animation change the x coordinate for EACH frame, that's mean flickering all around each 0.1 secs. That despite any kind of st, at or return I try.

I will not ask if I didn't tried it on my own for a day, but there's someone can address me a solution?
I can't post a code as I probably written something like 300 with no avail.

Thank you.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#2 Post by trooper6 »

anim.Filmstrip is from the old Renpy and not documented in the current documentation. I don't think you should be using it.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#3 Post by gas »

It's not what I want, it's what I had to.

Sadly.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#4 Post by trooper6 »

You can cut those frames into individual images and then use ATL.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#5 Post by indoneko »

Just curious... what's the reason of using filmstrip instead of ATL?
My avatar is courtesy of Mellanthe

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#6 Post by gas »

'cause "Mister Pablo Picasso with a broken heart and sensible artistic soul" doesn't want for me, the dirty coder, to touch his sprite sheets.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#7 Post by trooper6 »

Then tell your artist that s/he needs to turn the sprite sheets into individual images if you are not allowed to do it yourself. Let them know that renpy doesn't support sprite sheets so you need your artist to convert.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#8 Post by gas »

trooper6 wrote:Then tell your artist that s/he needs to turn the sprite sheets into individual images if you are not allowed to do it yourself. Let them know that renpy doesn't support sprite sheets so you need your artist to convert.
I'll assume you don't know the answer, but I'm really grateful to you for the very and sincere effort to help me.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

User avatar
indoneko
Miko-Class Veteran
Posts: 528
Joined: Sat Sep 03, 2016 4:00 am
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#9 Post by indoneko »

Btw, can I ask for your code?
It doesn't matter if they don't work. I might be able to learn one thing or two from them...

Edit : Have you tried to use im.crop/livecrop to the original image and use the resulting images in ATL?
Last edited by indoneko on Fri Mar 10, 2017 6:54 pm, edited 1 time in total.
My avatar is courtesy of Mellanthe

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#10 Post by trooper6 »

gas wrote:
trooper6 wrote:Then tell your artist that s/he needs to turn the sprite sheets into individual images if you are not allowed to do it yourself. Let them know that renpy doesn't support sprite sheets so you need your artist to convert.
I'll assume you don't know the answer, but I'm really grateful to you for the very and sincere effort to help me.
I don't think you can get what you want while using deprecated code. However having an ATL animated image that shows up at some location, then disappears after one cycle and then shows up somewhere else when you want it to shouldn't be hard at all.

I'd model it off of the renpy.notify screen. Put an ATL image on a screen. Have the screen take location variables. Have the screen have a timer on it so that it disappears after the amount of time it takes your image to finish one cycle. Then show the screen with whichever location variables you want. The image shows up where you want it to, does its cycle of images, then disappears again.

Using ATL I don't think it would be difficult.

But anim.Filmstrip is no longer supported so I can't really help you with that.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

User avatar
IrinaLazareva
Veteran
Posts: 399
Joined: Wed Jun 08, 2016 1:49 pm
Projects: Legacy
Organization: SunShI
Location: St.Petersburg, Russia
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#11 Post by IrinaLazareva »

may be, something crazy like this...

Code: Select all

init python:      
    def sbros():
        style.rebuild()   
image water = anim.Filmstrip('chaos.png', (90, 90), (5, 1), 0.1, loop=True)
default aga = renpy.random.randint(1, 5) # y seconds delay
transform der:
    yalign .5
    alpha 1.0 xalign renpy.random.random()
    .5 # time of one cycle of animation
    alpha 0.0 xalign renpy.random.random()
    aga
    alpha 1.0
    .5 # time of one cycle of animation
    alpha 0.0
    aga
    repeat

screen masterc():
    add "water" at der
    timer aga+1 repeat True action Function(sbros), SetVariable("aga", renpy.random.randint(1, 5))

label start:
    show screen masterc
    pause
    return

User avatar
Arowana
Miko-Class Veteran
Posts: 531
Joined: Thu May 31, 2012 11:17 pm
Completed: a2 ~a due~
Projects: AXIOM.01, The Pirate Mermaid
Organization: Variable X, Navigame
Tumblr: navigame-media
itch: navigame
Contact:

Re: Filmstrip at random positions going crazy (and me too)

#12 Post by Arowana »

gas wrote:'cause "Mister Pablo Picasso with a broken heart and sensible artistic soul" doesn't want for me, the dirty coder, to touch his sprite sheets.
You can crop the spritesheets in Ren'Py using the crop transform property, LiveCrop, or im.crop. I forget which one is best performance-wise, but I think it's discussed here.

You can use this dynamic cropping to recreate the filmstrip effect, like in nyaatrap's examples here:
viewtopic.php?f=8&t=41936#p439521

Try that and see if it helps? Hopefully the issue is due to anim.Filmstrip and not something else. :)
Complete: a2 ~a due~ (music, language, love)
In progress: The Pirate Mermaid (fairytale otome)
On hold: AXIOM.01 (girl detective game)

Image

Post Reply

Who is online

Users browsing this forum: piinkpuddiin, Semrush [Bot]