Animated mainmenu background: how to do it?
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.
- zankizuna
- Veteran
- Posts: 416
- Joined: Fri May 04, 2012 2:20 am
- Completed: Monochrome Valentine
- Projects: Softwar
- Deviantart: raseru09
- itch: ZanKizuna
- Location: Manilaaaaaaaa
- Contact:
Animated mainmenu background: how to do it?
How am I supposed to place an animated background pic in the main menu?
I've tried doing some codes around "mm_root=" but I just can't get it right..
I've tried making a video to use then place it there, but it didn't work... what is the proper code?
I've tried doing some codes around "mm_root=" but I just can't get it right..
I've tried making a video to use then place it there, but it didn't work... what is the proper code?
-
- Lemma-Class Veteran
- Posts: 2299
- Joined: Mon Feb 06, 2012 9:50 pm
- Completed: Icebound, Selenon Rising Ep. 1-2
- Projects: Selenon Rising Ep. 3-4
- Organization: Fastermind Games
- Deviantart: sundownkid
- Location: NYC
- Contact:
Re: Animated mainmenu background: how to do it?
You should leave mm_root blank and add the animated image directly to the screen code in the screens script. I don't think a video would work, though it would be useful to me if someone had a way to use it as a background.
- Fade Lalique
- Newbie
- Posts: 11
- Joined: Sun May 27, 2012 6:06 am
- Contact:
Re: Animated mainmenu background: how to do it?
I think it would be possible to convert the video you plan to use into a gif file. That way it might work
- Hijiri
- Eileen-Class Veteran
- Posts: 1519
- Joined: Sun Mar 25, 2012 6:35 pm
- Completed: Death Rule:lost code Overdrive Edition, Where the White Doves Rest-Tsumihanseishi
- Projects: Death Rule: Killing System
- Organization: MESI Games
- IRC Nick: Hizi
- Tumblr: mesigames
- Skype: kurotezuka
- itch: hijiri
- Location: Los Angeles
- Contact:
Re: Animated mainmenu background: how to do it?
Renp dosent support Gif files (Well, animated ones at least) you'll have to anomate via ATL codeFade Lalique wrote:I think it would be possible to convert the video you plan to use into a gif file. That way it might work
- nyaatrap
- Crawling Chaos
- Posts: 1824
- Joined: Mon Feb 13, 2012 5:37 am
- Location: Kimashi Tower, Japan
- Contact:
Re: Animated mainmenu background: how to do it?
hm, if I remember correctly, the screen language doesn't support the repeat statement of ATL, does it? I think I read it somewhere in the forum...
- rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
- Contact:
Re: Animated mainmenu background: how to do it?
I think this should work:
youranimatedbgpic is defined where your other images are defined - ATL's repeat statement should work normally.
For example:
Code: Select all
##############################################################################
# Main Menu
#
# Screen that's used to display the main menu, when Ren'Py first starts
# http://www.renpy.org/doc/html/screen_special.html#main-menu
screen main_menu:
# This ensures that any other menu screen is replaced.
tag menu
# The background of the main menu.
window:
xpadding 0
ypadding 0
add "youranimatedbgpic"
For example:
Code: Select all
image youranimatedbgpic:
"assets/rotating-image.png"
xanchor 0.5
yanchor 0.5
rotate 0
linear 50.0 rotate 360
repeat
-
- Eileen-Class Veteran
- Posts: 1261
- Joined: Fri Mar 16, 2012 11:38 am
- Projects: Rika
- Organization: Solo (for now)
- IRC Nick: Trick
- Location: Tokyo, Japan
- Contact:
Re: Animated mainmenu background: how to do it?
I think what the original poster was looking for was a method of showing an animation using either a .gif with different frames, or cycling through different images.
I'm only guessing, because I'm not having much luck getting ATL code to work, but if you can use ATL to create an animation, maybe it would be possible to place the animation in a label, and then loop the label itself.nyaatrap wrote:hm, if I remember correctly, the screen language doesn't support the repeat statement of ATL, does it? I think I read it somewhere in the forum...
"We must teach them through the tools with which they are comfortable."
The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.
If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.
If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.
- rinrin
- Veteran
- Posts: 211
- Joined: Thu Apr 16, 2009 9:18 am
- Completed: Several.
- Projects: Several.
- Contact:
Re: Animated mainmenu background: how to do it?
The principle is the same. Only this part changes:TrickWithAKnife wrote:I think what the original poster was looking for was a method of showing an animation using either a .gif with different frames, or cycling through different images.
Code: Select all
image youranimatedbgpic:
"assets/image1.png"
pause 0.1
"assets/image2.png"
pause 0.1
"assets/image3.png"
pause 0.1
repeat
- zankizuna
- Veteran
- Posts: 416
- Joined: Fri May 04, 2012 2:20 am
- Completed: Monochrome Valentine
- Projects: Softwar
- Deviantart: raseru09
- itch: ZanKizuna
- Location: Manilaaaaaaaa
- Contact:
Re: Animated mainmenu background: how to do it?
Thanks a lot guys I think rinrin got the code right..
GIFs are not supported by ren'py.. I've known this ever since.
I really needed a code like that. thanks.
GIFs are not supported by ren'py.. I've known this ever since.
I really needed a code like that. thanks.
-
- Newbie
- Posts: 22
- Joined: Wed Jul 08, 2015 6:34 am
- Contact:
Re: Animated mainmenu background: how to do it?
I've also wanted to do this too and I've been looking at various threads in order to achieve this.
Below is my code at the moment that I tried placing in the script.rpy and screen.rpy (at different times) but it has had no effect. My main aim is to cycle through some images which place the main menu one bit at a time until it's completed and then things go as normal.
I am not quite sure what is going wrong here so any advice would be highly appreciated. I have tried things like and placing this code after it but that didn't seem to work either
Below is my code at the moment that I tried placing in the script.rpy and screen.rpy (at different times) but it has had no effect. My main aim is to cycle through some images which place the main menu one bit at a time until it's completed and then things go as normal.
Code: Select all
image animated_main_menu:
"images/GUI/main_menu_plain.png"
pause 1.0
"images/GUI/main_menu_1.png"
pause 1.0
"images/GUI/main_menu_2.png"
pause 1.0
"images/GUI/main_menu_3.png"
pause 1.0
"images/GUI/main_menu_4.png"
pause 1.0
"images/GUI/main_menu_5.png"
pause 1.0
Code: Select all
label before_main_menu:
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Animated mainmenu background: how to do it?
Have you added your image to the main menu screen?
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
*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
-
- Newbie
- Posts: 22
- Joined: Wed Jul 08, 2015 6:34 am
- Contact:
Re: Animated mainmenu background: how to do it?
I have added the main image for my main menu screen in the options.rpy as
so it isn't part of my animation because it is the same as another on of my files within the animation that I want to do ("images/GUI/main_menu_5.png")
Code: Select all
mm_root = "images/GUI/main_menu_small2.png"
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Animated mainmenu background: how to do it?
This quote by rinrin is how to create an animated image using ATL and then show it on your main menu, which is done by adding it to the main menu screen.
If you have done this and you get no effect it is probably because your basic main menu root image is the final end state of what you want the menu to look like, so the animation isn't visible as it is just placing images over images that are already there in the base image. Try changing your base image to solid black (or whatever your base color is).rinrin wrote:I think this should work:youranimatedbgpic is defined where your other images are defined - ATL's repeat statement should work normally.Code: Select all
############################################################################## # Main Menu # # Screen that's used to display the main menu, when Ren'Py first starts # http://www.renpy.org/doc/html/screen_special.html#main-menu screen main_menu: # This ensures that any other menu screen is replaced. tag menu # The background of the main menu. window: xpadding 0 ypadding 0 add "youranimatedbgpic"
For example:Code: Select all
image youranimatedbgpic: "assets/rotating-image.png" xanchor 0.5 yanchor 0.5 rotate 0 linear 50.0 rotate 360 repeat
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
*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
-
- Newbie
- Posts: 22
- Joined: Wed Jul 08, 2015 6:34 am
- Contact:
Re: Animated mainmenu background: how to do it?
I actually have read that one before posting here and I tried implementing it but it didn't work for me for some reason (although, since I am a real noob, it's probably something stupidly simple I'm screwing up here)
I placed in the script.rpy file since that is where most images are declared (I assumed) and
in screens.rpy
Right now, it's just showing my main title screen without the animation effect.
I placed
Code: Select all
image animated_main_menu:
"images/GUI/main_menu_plain.png"
pause 1.0
"images/GUI/main_menu_1.png"
pause 1.0
"images/GUI/main_menu_2.png"
pause 1.0
"images/GUI/main_menu_3.png"
pause 1.0
"images/GUI/main_menu_4.png"
pause 1.0
"images/GUI/main_menu_5.png"
Code: Select all
screen main_menu():
# This ensures that any other menu screen is replaced.
tag menu
# The background of the main menu.
window:
xpadding 0
ypadding 0
add "animated_main_menu"
Right now, it's just showing my main title screen without the animation effect.
- trooper6
- Lemma-Class Veteran
- Posts: 3712
- Joined: Sat Jul 09, 2011 10:33 pm
- Projects: A Close Shave
- Location: Medford, MA
- Contact:
Re: Animated mainmenu background: how to do it?
As I said in my last post, I suspect this is because you made your mm_root an image that is the same as what the animation looks like when it is finished. If all the parts are already being shown and the animation puts those parts up on top of the parts that are already there in the base image, you aren't going to see the animation even if it is working. As I suggested in my last post, make your mm_root a plain black screen (or whatever your base image is).
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
*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
Who is online
Users browsing this forum: Amazon [Bot]