Animated Main Menu
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.
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.
-
- Newbie
- Posts: 16
- Joined: Thu Nov 16, 2006 2:10 pm
- Contact:
Animated Main Menu
I have a question about the main menu. I heard somewhere before that it's possible to have an animated background when the main menu is displayed (aka showing a simple list of images at decided intervals)
How do you do that? Thank you for any help provided.
How do you do that? Thank you for any help provided.
Mm... haven't tried but maybe this is it :
If it's not mm_root, try gm_root. And of course, replace "*.jpg" by your pictures... and "2.0" by the time in seconds you want them to be displayed. The animation will loop.
Code: Select all
init:
$ animmenu = Animation("1.jpg", 2.0, "2.jpg", 2.0, "3.jpg", 2.0)
$ style.mm_root.background = animmenu
-
- Newbie
- Posts: 16
- Joined: Thu Nov 16, 2006 2:10 pm
- Contact:
Hmmm...my test mule has something like this:
where amano1 and amano2 are 800x340, so they appear as if in widescreen.
Code: Select all
$ titlefader = Animation("amano1.jpg", 4.00, "amano2.jpg", 4.00)
$ style.mm_root.background = LiveComposite((800,600), (0, 120), titlefader, )
Code: Select all
$ wowanime = anim.Filmstrip(
"romanclub.jpg",
(400,600),
(3,2),
5, 6, True, )
$ title = ui.text("Test Mule", size = 24, color = (160, 160, 160, 255))
$ style.mm_root.background = LiveComposite((800, 600), (0, 0), wowanime, (444, 44), "bluehairvp3.jpg", (.55, .60), title, )
The filmstrip image is displayed on the left side of the screen, while the stationary image is on the right. They are all live-composited together, including the Title.
My Test Mule is currently set for other settings, so I haven't had a chance to reactivate this code, but it should work.
EDIT: my example uses the default black background. In your case I guess your BG will take the place of bluehairvp3 and will be positioned as full-size.
-
- Regular
- Posts: 51
- Joined: Sun Feb 18, 2007 4:56 am
- Location: Vancouver, Canada
- Contact:
Re: Animated Main Menu
You can make a clip in windows movie maker. Just insert the pictures, decide the timings and save it in a video format compatible with Renpy. Then you can insert it into your code, set it to loop and hopefully have the effect you were going for (I can't give you any of the actual code because I haven't learnt much Renpy script yet ^^;).deltazechs wrote:I have a question about the main menu. I heard somewhere before that it's possible to have an animated background when the main menu is displayed (aka showing a simple list of images at decided intervals)
How do you do that? Thank you for any help provided.
- PyTom
- Ren'Py Creator
- Posts: 16093
- 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:
DaFool >>> For big stuff, it's better to use many images then one Filmstrip. IIRC, the filmstrip takes up twice as much memory as the small images.
frumplstlskn >>> I recommend against using a movie as the main menu background. While theoretically supported, in practice it doesn't work too well when there's something on top of the menu. (When a menu is full-window, then we use hardware acceleration, if possible.)
frumplstlskn >>> I recommend against using a movie as the main menu background. While theoretically supported, in practice it doesn't work too well when there's something on top of the menu. (When a menu is full-window, then we use hardware acceleration, if possible.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Who is online
Users browsing this forum: Bing [Bot]