Movie as a background for 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
ArceDeer
Newbie
Posts: 11
Joined: Mon Jul 02, 2012 1:37 am
Contact:

Movie as a background for main menu?

#1 Post by ArceDeer »

Hi~

I'm just starting to get used to the scripting in Ren'Py. All I've been doing before is making the sprites and all the related content.

Right now, I just started to transfer all the content made into the engine, so I could start building the game, and I wanted to know if it was possible to use a movie (as in a displayable, obviously) on the background for the main menu. You know, to make things look fancy and all.

I already added a video before the game starts, and I tried using the same logic to do this. Off course, it didn't work. In any case, is it possible to do this?

As technical reference, the video is in 720p, and is only about 2 seconds, made to loop endlessly.

Thank you for your attention, and thank you for bearing with a noob.

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie as a background for main menu?

#2 Post by nyaatrap »

I don't know how to loop movies, but the following way can show:
http://lemmasoft.renai.us/forums/viewto ... 88#p242640

User avatar
LightSPS
Newbie
Posts: 20
Joined: Fri Sep 14, 2012 2:21 pm
Projects: Glass Road:Curse of Vindauga
Organization: Square Pulse Studios
Location: USA
Contact:

Re: Movie as a background for main menu?

#3 Post by LightSPS »

I was in the same boat as you were. I built a visual novel engine from scratch using Microsoft XNA studio 4.0. One of the things I was able to do was add a movie as a background in the menu. However, I can tell you with 1,000,000,000% certainty that you CAN NOT do that in Renpy. The best you can do is take your menu video loop and output the frames in the video as JPEGS, then create a GIANT Renpy animation loop displayable. This creates the illusion of moving video. Keep in mind that the the most arguments the animation function can take is 255, but in reality it's only half of that, because you have to account for the other arguments as well. The most frames you can add in 125, but really only 124 because only an even amount of frames will loop - weird behavior.

Here is the spinet of code I used to create the moving background illusion.

I had to create a program specifically to auto generate the code to create the animation. No way in heck, a person could type 255 arguments without going insane. If YOU really want to, there is a way, but it's an indirect method with underwhelming results.

File: options.rpy | Look at gm_root & mm_root

Code: Select all

## We then want to call a theme function. themes.roundrect is
    ## a theme that features the use of rounded rectangles. It's
    ## the only theme we currently support.
    ##
    ## The theme function takes a number of parameters that can
    ## customize the color scheme.

    theme.diamond(
        # Color scheme: Colorblind
                                    
        ## The color of an idle widget face.
        widget = "#898989",

        ## The color of a focused widget face.
        widget_hover = "#464646",

        ## The color of the text in a widget.
        widget_text = "#CCCCCC",

        ## The color of the text in a selected widget. (For
        ## example, the current value of a preference.)
        widget_selected = "#F2F2F2",

        ## The color of a disabled widget face. 
        disabled = "#898989",

        ## The color of disabled widget text.
        disabled_text = "#666666",

        ## The color of informational labels.
        label = "#c2c2c2",

        ## The color of a frame containing widgets.
        frame = "#252525",

        ## 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.
        mm_root = Animation("Animations/Main_Menu_Loop/Menu_Loop_00000.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00001.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00002.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00003.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00004.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00005.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00006.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00007.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00008.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00009.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00010.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00011.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00012.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00013.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00014.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00015.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00016.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00017.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00018.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00019.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00020.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00021.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00022.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00023.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00024.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00025.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00026.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00027.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00028.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00029.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00030.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00031.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00032.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00033.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00034.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00035.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00036.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00037.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00038.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00039.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00040.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00041.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00042.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00043.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00044.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00045.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00046.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00047.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00048.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00049.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00050.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00051.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00052.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00053.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00054.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00055.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00056.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00057.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00058.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00059.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00060.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00061.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00062.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00063.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00064.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00065.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00066.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00067.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00068.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00069.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00070.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00071.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00072.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00073.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00074.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00075.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00076.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00077.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00078.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00079.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00080.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00081.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00082.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00083.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00084.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00085.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00086.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00087.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00088.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00089.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00090.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00091.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00092.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00093.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00094.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00095.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00096.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00097.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00098.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00099.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00100.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00101.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00102.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00103.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00104.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00105.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00106.jpg", .1),
        
        ## The background of the game 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.
        gm_root = Animation("Animations/Main_Menu_Loop/Menu_Loop_00000.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00001.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00002.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00003.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00004.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00005.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00006.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00007.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00008.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00009.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00010.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00011.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00012.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00013.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00014.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00015.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00016.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00017.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00018.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00019.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00020.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00021.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00022.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00023.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00024.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00025.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00026.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00027.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00028.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00029.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00030.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00031.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00032.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00033.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00034.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00035.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00036.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00037.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00038.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00039.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00040.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00041.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00042.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00043.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00044.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00045.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00046.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00047.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00048.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00049.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00050.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00051.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00052.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00053.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00054.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00055.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00056.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00057.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00058.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00059.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00060.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00061.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00062.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00063.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00064.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00065.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00066.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00067.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00068.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00069.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00070.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00071.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00072.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00073.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00074.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00075.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00076.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00077.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00078.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00079.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00080.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00081.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00082.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00083.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00084.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00085.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00086.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00087.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00088.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00089.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00090.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00091.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00092.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00093.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00094.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00095.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00096.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00097.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00098.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00099.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00100.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00101.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00102.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00103.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00104.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00105.jpg", .1,"Animations/Main_Menu_Loop/Menu_Loop_00106.jpg", .1),
        
        ## If this is True, the in-game window is rounded. If False,
        ## the in-game window is square.
        rounded_window = False,

        ## And we're done with the theme. The theme will customize
        ## various styles, so if we want to change them, we should
        ## do so below.            
        )

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: Movie as a background for main menu?

#4 Post by SleepKirby »

For what it's worth, here's a way to cut down on the boilerplate with that animation definition. (This exact code isn't tested, although it is similar to working code in my game.)

Code: Select all

main_menu_animation_args = []

for i in range(107):
    # Python string formatting: http://docs.python.org/2/library/string.html#format-examples
    filename = "Animations/Main_Menu_Loop/Menu_Loop_{num:0>5}.jpg".format(num=i)

    main_menu_animation_args.append(filename)
    main_menu_animation_args.append(.1)

main_menu_animation = Animation(*main_menu_animation_args)

theme.diamond(
    ...
    mm_root = main_menu_animation,
    ...
)

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:

Re: Movie as a background for main menu?

#5 Post by PyTom »

You _can_ use a movie as a background for the main menu:

Code: Select all

screen main_menu:

    # This ensures that any other menu screen is replaced.
    tag menu

    add Movie(size=(800, 600))
    on "show" action Play("movie", "shuttle.ogv")
(Whether it's a good idea or not is another story.)
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

User avatar
LightSPS
Newbie
Posts: 20
Joined: Fri Sep 14, 2012 2:21 pm
Projects: Glass Road:Curse of Vindauga
Organization: Square Pulse Studios
Location: USA
Contact:

Re: Movie as a background for main menu?

#6 Post by LightSPS »

PyTom wrote:You _can_ use a movie as a background for the main menu:

Code: Select all

screen main_menu:

    # This ensures that any other menu screen is replaced.
    tag menu

    add Movie(size=(800, 600))
    on "show" action Play("movie", "shuttle.ogv")
(Whether it's a good idea or not is another story.)
I COULD KISS YOU!! ......but that would be weird. Oh, you have no idea how much this is going to help me with a project I'm working on! (Bad idea or not, this is something I'm happy to know can be done in Renpy now)

ArceDeer
Newbie
Posts: 11
Joined: Mon Jul 02, 2012 1:37 am
Contact:

Re: Movie as a background for main menu?

#7 Post by ArceDeer »

Whoah. Sorry to not reply in a long time, since I just got home. But thanks tons for the responses!

Yeah, I suppose it would not be so much of a good idea in terms of performance, hmmm....

In the worst case scenario, I'll use the option given by LightSPS. or by SleepKirby. They both seem like stable good methods to implement this. In the end, it's only about 8 frames looped in a decent speed. I appreciate everyone's time, and I hope the thingy I'm doing goes well.

But then again, excuse my poor programming knowledge, why is it exactly a bad idea to use a video? just wondering, I mean...

User avatar
mirelle
Regular
Posts: 87
Joined: Thu Nov 29, 2012 11:28 am
Projects: The Story of X
Organization: Vocamania
Location: Indonesia
Contact:

Re: Movie as a background for main menu?

#8 Post by mirelle »

I'm not an expert myself, but the biggest problems might lie on performance issues and the chance that the codec required to play the video is missing in the player's computer.
[[The X Story]]
Discover the hidden truth within-- but be reminded that more often than not, curiosity kills the cat.
lurking here as a representative of the team~

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: Movie as a background for main menu?

#9 Post by nyaatrap »

If movie is used in a place where players need interaction, it can slow/disrupt interaction, or in the worst case, it breaks any interaction totally and prevents start playing.

User avatar
SleepKirby
Veteran
Posts: 255
Joined: Mon Aug 09, 2010 10:02 pm
Projects: Eastern Starlight Romance, Touhou Mecha
Organization: Dai-Sukima Dan
Location: California, USA
Contact:

Re: Movie as a background for main menu?

#10 Post by SleepKirby »

I guess basically this: movies definitely have their uses, as they ARE supported in Ren'Py for a reason; but they should be used sparingly (i.e. only when they will really enhance some part of the game), because there are a lot of potential technical problems that can happen with movies.

SundownKid
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: Movie as a background for main menu?

#11 Post by SundownKid »

SleepKirby wrote:I guess basically this: movies definitely have their uses, as they ARE supported in Ren'Py for a reason; but they should be used sparingly (i.e. only when they will really enhance some part of the game), because there are a lot of potential technical problems that can happen with movies.
The vast majority of professional-quality games have movies, not necessarily for cutscenes (though many do), but for various things like menu backgrounds, intros and outros, etc. Not using movies at all is extremely difficult when you get up to commercial tier, so that's not really an option. Ren'py is pretty behind the curve with regards to where you can embed a movie. Even being able to put a looping movie as a background, similar to defining an image, would be very cool and improve the looks of the game a lot more than using a workaround like scrolling or basic animations.

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

Re: Movie as a background for main menu?

#12 Post by DaFool »

SundownKid wrote: The vast majority of professional-quality games have movies, not necessarily for cutscenes (though many do), but for various things like menu backgrounds, intros and outros, etc. Not using movies at all is extremely difficult when you get up to commercial tier, so that's not really an option. Ren'py is pretty behind the curve with regards to where you can embed a movie. Even being able to put a looping movie as a background, similar to defining an image, would be very cool and improve the looks of the game a lot more than using a workaround like scrolling or basic animations.
Most commercial video games use Bink Video, which is a proprietary format which is uber-tweaked to the specific game platform:

http://www.radgametools.com/bnkmain.htm

marigoldsofthenight
Regular
Posts: 44
Joined: Sat Aug 14, 2010 5:31 pm
Contact:

Re: Movie as a background for main menu?

#13 Post by marigoldsofthenight »

PyTom wrote:You _can_ use a movie as a background for the main menu:

Code: Select all

screen main_menu:

    # This ensures that any other menu screen is replaced.
    tag menu

    add Movie(size=(800, 600))
    on "show" action Play("movie", "shuttle.ogv")
(Whether it's a good idea or not is another story.)
Excellent. Any way to get the video file to loop?

SundownKid
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: Movie as a background for main menu?

#14 Post by SundownKid »

I'm pretty sure you have to add:

Code: Select all

loops=-1
Inside the parenthesis after "Play".

I would love to use these as looping animated backgrounds, but I'm afraid that it might have major issues once the game starts being distributed due to the instability of movies. If it's an .ogv file, will it get messed up on people's machines?

marigoldsofthenight
Regular
Posts: 44
Joined: Sat Aug 14, 2010 5:31 pm
Contact:

Re: Movie as a background for main menu?

#15 Post by marigoldsofthenight »

Hmm... can't get the loops code to work for some reason. How should it be placed in the code?

Post Reply

Who is online

Users browsing this forum: Dark79