animation in main menu

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
Poldy

animation in main menu

#1 Post by Poldy » Mon May 05, 2008 10:18 am

Hello!

Is it possible to have an animation as the main menu background? - My VN is set in winter and the whole main-menu screen is kind of crappy without falling snow... :(

Currently is set the background with

Code: Select all

mm_root = "title-screen.png"
in options.rpy. mm_root onyl accepts image names, is there a way to use a displayable instead as the mm-background?

Thanks for your help!

User avatar
luminarious
Veteran
Posts: 353
Joined: Thu May 01, 2008 1:12 pm
Projects: Winter, winter
Location: Estonia
Contact:

Re: animation in main menu

#2 Post by luminarious » Mon May 05, 2008 11:20 am

Erm, I had the exact same problem.. :P

If it's too complex to use animation, can at least the particle system somehow be used on the menu screen?

User avatar
PyTom
Ren'Py Creator
Posts: 15392
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: animation in main menu

#3 Post by PyTom » Mon May 05, 2008 11:42 am

mm_root should accept animations. Have you tried something like mm_root=Animation(...)? That _should_ work. If I wanted to use a particle system, I'd do something like:

mm_root=Fixed(
Particle(...),
Image(...))
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
luminarious
Veteran
Posts: 353
Joined: Thu May 01, 2008 1:12 pm
Projects: Winter, winter
Location: Estonia
Contact:

Re: animation in main menu

#4 Post by luminarious » Mon May 05, 2008 12:00 pm

I'm sorry, I think I'm being a bit dense right now, but if that's the syntax, how can I use at the same time a background picture and SnowBlossom?

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: animation in main menu

#5 Post by Jake » Mon May 05, 2008 12:20 pm

luminarious wrote:I'm sorry, I think I'm being a bit dense right now, but if that's the syntax, how can I use at the same time a background picture and SnowBlossom?
The 'Fixed' class which PyTom mentions is a layout class which will contain other displayables, so that when the Fixed is drawn it will draw first one of its parameters, then the other one:

http://renpy.org/wiki/Fixed

Although by the look of the docs there, he got the parameters the wrong way around. ;-)
Server error: user 'Jake' not found

User avatar
luminarious
Veteran
Posts: 353
Joined: Thu May 01, 2008 1:12 pm
Projects: Winter, winter
Location: Estonia
Contact:

Re: animation in main menu

#6 Post by luminarious » Mon May 05, 2008 12:23 pm

Thank you, got it now! :D

Poldy

Re: animation in main menu

#7 Post by Poldy » Mon May 05, 2008 12:30 pm

Thanks a lot! I was mislead by the comment in the template's option.rpy:

Code: Select all

        ## The background of the main menu. This can be a color
        ## beginning with '#', or an image filename. The latter
        ## should take up the full height and width of the screen.
which should be changed in that any(?) displayable is accepted. - Anyway thanks again, that saved my day :)

zephiel
Regular
Posts: 35
Joined: Fri May 09, 2008 1:07 am
Contact:

Re: animation in main menu

#8 Post by zephiel » Mon May 26, 2008 9:02 pm

eh? im lost, im trying to use a gif.... do gif work?

cause i get this error

Code: Select all

While executing init code:
 - script at line 10 of C:\Documents and Settings\haseeb1\Desktop\R渭dem'i\renpy-6.6.2-full\renpy-6.6.2\roxdemi/game/options.rpy
 - python at line 77 of C:\Documents and Settings\haseeb1\Desktop\R渭dem'i\renpy-6.6.2-full\renpy-6.6.2\roxdemi/game/options.rpy.
ZZZZZZZZZZZZZZZZZ
......................ZZZ
.................ZZZ zuu, zenthosa nara verr nehi zunu.
.............ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: animation in main menu

#9 Post by EvilDragon » Tue May 27, 2008 4:49 am

I think that gifs don't work with renpy.
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: animation in main menu

#10 Post by Jake » Tue May 27, 2008 10:32 am

GIFs don't work as animations in Ren'Py; you need to define your own with the Animation displayable.

And as it goes, the 'error' you posted isn't helpful in the least, Zephiel. All you've given us is the first couple of lines of the stack trace - that is, it's telling us where in your script the error occurred. But since we don't have your script, and we don't know what the error actually was (it's in the same traceback.txt file, further down) we can't really help you just based on that, we have to guess what you're doing wrong. It might be totally unrelated to GIFs for all we know.

When you have a problem, you really need to post the entire traceback.txt file, and it really helps if you post the lines from your script which are causing the error as well. The traceback tells you which line numbers are responsible.
Server error: user 'Jake' not found

zephiel
Regular
Posts: 35
Joined: Fri May 09, 2008 1:07 am
Contact:

Re: animation in main menu

#11 Post by zephiel » Wed May 28, 2008 11:43 pm

oh, sorry. will gif ever be usable? or wat format is usable?

im trying to ad animation to my main menu.

i apreciate the help
ZZZZZZZZZZZZZZZZZ
......................ZZZ
.................ZZZ zuu, zenthosa nara verr nehi zunu.
.............ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ

User avatar
EvilDragon
Veteran
Posts: 284
Joined: Fri Dec 28, 2007 5:47 am
Location: Where the Dragons rule!
Contact:

Re: animation in main menu

#12 Post by EvilDragon » Thu May 29, 2008 3:07 am

I think (I don't know actually) that renpy doesn't support APNGs (animated PNGs), so this way you're stuck with defining the animation on a per-frame filmstrip basis (which is complicated for longer animations, see http://www.renpy.org/wiki/renpy/doc/ref ... .Filmstrip).

It may be a better idea to record your animation as an MPEG-1 video (and keep it as small as possible) and then embed it in a displayable that will show it on the main menu.
Angels of paradise, angels of sacrifice
Please let me be under your wings...

User avatar
Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

Re: animation in main menu

#13 Post by Jake » Thu May 29, 2008 7:51 am

zephiel wrote:oh, sorry. will gif ever be usable?
I'm pretty sure PyTom's said he has no plans to implement it.
zephiel wrote: or wat format is usable?
The one I mentioned in my last post, for one - save out your frames individually and assemble them into an Animation displayable. It's really not difficult if you follow the example in the manual.

Compiling your animation into an MPEG1 video will probably be more trouble than it's worth for a short animation, and assembling an Animation displayable frame by frame is probably more trouble than it's worth for a long animation.

IIRC also that when Ren'Py plays MPEG1 videos it hands the audio mixer off to the movie-playing code wholesale, so you can't play any other sounds while your animation is going on.
Server error: user 'Jake' not found

Post Reply

Who is online

Users browsing this forum: Bing [Bot], FictionalHeart