Main menu, movie into still image HELP

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.
Message
Author
User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Main menu, movie into still image HELP

#1 Post by GlazeWasTaken »

Hey all, first post, I have a question for the visual novel I am attempting to make. I'm not great with coding and haven't had a whole lot of experience, but I am trying to make my main menu have a short movie that plays, and then when the movie ends the background and the text buttons appear and then it stays on that forever.

Any help would be appreciated!
Last edited by GlazeWasTaken on Thu Jul 09, 2020 7:29 pm, edited 1 time in total.

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

Re: Main menu, movie into still image HELP

#2 Post by gas »

Have the movie play in the splashscreen label.
https://www.renpy.org/dev-doc/html/labe ... ial-labels
As for the main menu background... simply use that last frame picture as the main menu picture (I dunno, maybe a screenshot?). That way a player can reach the main menu without watching that movie again (anyway, by your sketch, that backgorund doesn't actually seem an active part of the movie).
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
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Main menu, movie into still image HELP

#3 Post by Imperf3kt »

You would not use the splashscreen for that but the before_main_menu label
https://www.renpy.org/doc/html/label.ht ... ial-labels
If it exists, this label is called before the main menu. It is used in rare cases to set up the main menu, for example by starting a movie playing in the background.
I mention this because the splashscreen is only shown on game load, whereas the before main menu label will play through even if a player quits to the main menu mid game.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

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

Re: Main menu, movie into still image HELP

#4 Post by gas »

Imperf3kt wrote: Sun Jan 12, 2020 11:09 pm You would not use the splashscreen for that but the before_main_menu label
https://www.renpy.org/doc/html/label.ht ... ial-labels
If it exists, this label is called before the main menu. It is used in rare cases to set up the main menu, for example by starting a movie playing in the background.
I mention this because the splashscreen is only shown on game load, whereas the before main menu label will play through even if a player quits to the main menu mid game.
Movie playing as a background of the main menu, that's what before_main_menu does. His movie play before it.
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
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Main menu, movie into still image HELP

#5 Post by GlazeWasTaken »

gas wrote: Mon Jan 13, 2020 12:13 am
Imperf3kt wrote: Sun Jan 12, 2020 11:09 pm You would not use the splashscreen for that but the before_main_menu label
https://www.renpy.org/doc/html/label.ht ... ial-labels
If it exists, this label is called before the main menu. It is used in rare cases to set up the main menu, for example by starting a movie playing in the background.
I mention this because the splashscreen is only shown on game load, whereas the before main menu label will play through even if a player quits to the main menu mid game.
Movie playing as a background of the main menu, that's what before_main_menu does. His movie play before it.
I think I understand, but I have an OP playing using the splashcreen label already:

Code: Select all

label splashscreen:
    scene black
    with Pause(1)
    $ renpy.movie_cutscene("movies/op.m2t")
    with Pause(1)
    return
For the main menu I am currently using this code, but it continues to loop the video. Again, I am very much a beginner:

Code: Select all

image main_menu = Movie(play="movies/title.m2t", size=(1920,1080))
screen main_menu:
    add "main_menu"

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Main menu, movie into still image HELP

#6 Post by GlazeWasTaken »

GlazeWasTaken wrote: Mon Jan 13, 2020 3:05 am
gas wrote: Mon Jan 13, 2020 12:13 am
Imperf3kt wrote: Sun Jan 12, 2020 11:09 pm You would not use the splashscreen for that but the before_main_menu label
https://www.renpy.org/doc/html/label.ht ... ial-labels


I mention this because the splashscreen is only shown on game load, whereas the before main menu label will play through even if a player quits to the main menu mid game.
Movie playing as a background of the main menu, that's what before_main_menu does. His movie play before it.
I think I understand, but I have an OP playing using the splashcreen label already:

Code: Select all

label splashscreen:
    scene black
    with Pause(1)
    $ renpy.movie_cutscene("movies/op.m2t")
    with Pause(1)
    return
For the main menu I am currently using this code, but it continues to loop the video. Again, I am very much a beginner:

Code: Select all

image main_menu = Movie(play="movies/title.m2t", size=(1920,1080))
screen main_menu:
    add "main_menu"
After doing a bit of fiddling with the before_main_menu label, I have it working (kind of).
I need it to be playing the main menu theme in the background, so that the visuals tie in with the song, but right now it plays after the menu intro is done. There is also a short black screen that transitions between the video and the title screen, a quick flash cutting between the two. Any way I can fix these things? Thank you!

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Main menu, movie into still image HELP

#7 Post by Alex »

GlazeWasTaken wrote: Mon Jan 13, 2020 3:05 am ...For the main menu I am currently using this code, but it continues to loop the video. Again, I am very much a beginner:

Code: Select all

image main_menu = Movie(play="movies/title.m2t", size=(1920,1080))
screen main_menu:
    add "main_menu"
Try to set 'loop and 'image' properties for your movie - https://www.renpy.org/doc/html/movie.html#Movie

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Main menu, movie into still image HELP

#8 Post by GlazeWasTaken »

Alex wrote: Mon Jan 13, 2020 3:27 pm
GlazeWasTaken wrote: Mon Jan 13, 2020 3:05 am ...For the main menu I am currently using this code, but it continues to loop the video. Again, I am very much a beginner:

Code: Select all

image main_menu = Movie(play="movies/title.m2t", size=(1920,1080))
screen main_menu:
    add "main_menu"
Try to set 'loop and 'image' properties for your movie - https://www.renpy.org/doc/html/movie.html#Movie
Hi, that was my old code. Here is how it's looking now:

Code: Select all

label before_main_menu:
    $renpy.movie_cutscene("movies/title.m2t")
    return
What I am currently having trouble with is this:
I need it to be playing the main menu theme in the background, so that the visuals tie in with the song, but right now it plays after the menu intro is done. There is also a short black screen that transitions between the video and the title screen, a quick flash cutting between the two. Any way I can fix these things? Thank you!

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Main menu, movie into still image HELP

#9 Post by Alex »

Have you tried this?

Code: Select all

image main_menu = Movie(play="movies/title.m2t", size=(1920,1080), loop=False, image="images/static_img.png")
screen main_menu:
    add "main_menu"

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Main menu, movie into still image HELP

#10 Post by GlazeWasTaken »

Alex wrote: Tue Jan 14, 2020 5:08 pm Have you tried this?

Code: Select all

image main_menu = Movie(play="movies/title.m2t", size=(1920,1080), loop=False, image="images/static_img.png")
screen main_menu:
    add "main_menu"
I just went and tried this:

Code: Select all

label before_main_menu:
    image main_menu = Movie(play="movies/title.m2t", size=(1920,1080), loop=False, image="images/title screen logo.png")
    screen main_menu:
        add "main_menu"

return
and the video is still in a weird size as well as it looping and not going to the image, which is strange because it says loop=false. I tried removing the label as well, and it does the same thing. Really not sure what is going wrong. Maybe the video format I'm using is a problem?
Last edited by GlazeWasTaken on Thu Jul 09, 2020 7:29 pm, edited 1 time in total.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Main menu, movie into still image HELP

#11 Post by Imperf3kt »

I believe so, m2t is mpeg2 transport, typically packaged in an m2ts (mpeg-2 transport stream) container. Generally only used with blurays or HDTV broadcasts.
It's a licensed format, so to use it you'd technically need to pay royalties.

As far as I can see, Ren'Py doesn't officially support its use.
https://www.renpy.org/doc/html/movie.html
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Main menu, movie into still image HELP

#12 Post by GlazeWasTaken »

Imperf3kt wrote: Wed Jan 15, 2020 1:31 am I believe so, m2t is mpeg2 transport, typically packaged in an m2ts (mpeg-2 transport stream) container. Generally only used with blurays or HDTV broadcasts.
It's a licensed format, so to use it you'd technically need to pay royalties.

As far as I can see, Ren'Py doesn't officially support its use.
https://www.renpy.org/doc/html/movie.html
Thanks for letting me know about this, I am using Vegas Pro 14 to put together the cutscenes/OP/credits, and I am not sure which file type to use. What is the best extension to use for use in renpy?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Main menu, movie into still image HELP

#13 Post by Imperf3kt »

There's some varying opinions about that, but personally I prefer vp8 / vp9 inside an mkv or WebM container.
The documentation has the following to say about it
Note that using some of these formats may require patent licenses. When in doubt, and especially for commercial games, we recommend using VP9, VP8, or Theora; Opus or Vorbis; and WebM, Matroska, or Ogg
If Vegas doesn't export to this format, you can choose something with the codec and 'mux' the output into a different container with a muxing program.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
GlazeWasTaken
Newbie
Posts: 24
Joined: Sun Jan 12, 2020 2:41 pm
Contact:

Re: Main menu, movie into still image HELP

#14 Post by GlazeWasTaken »

Imperf3kt wrote: Wed Jan 15, 2020 3:40 am There's some varying opinions about that, but personally I prefer vp8 / vp9 inside an mkv or WebM container.
The documentation has the following to say about it
Note that using some of these formats may require patent licenses. When in doubt, and especially for commercial games, we recommend using VP9, VP8, or Theora; Opus or Vorbis; and WebM, Matroska, or Ogg
If Vegas doesn't export to this format, you can choose something with the codec and 'mux' the output into a different container with a muxing program.
Thank you, I will try one of these out.
My main issue is still that the video is sized weirdly while it plays and that it continues to loop, despite having the loop defined as false and having an image defined to the Movie, so it should go right to that image after it is done playing. MPEG2 is supported by renpy from the Movie page, but maybe for some reason that format is messing with the Movie script. I will try and find a program that allows me to re-encode my videos to mkv and then post an update.

User avatar
Alex
Lemma-Class Veteran
Posts: 3090
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Main menu, movie into still image HELP

#15 Post by Alex »

That's the actual code that worked well for me (no additional labels required)... It uses video and image from tutorial game.

Code: Select all

image main_menu_movie_bg = Movie(play="oa4_launch.webm", size=(640,320), loop=False, image="images/bg washington.jpg")

screen main_menu():

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

    style_prefix "main_menu"

    add gui.main_menu_background
    
    add "main_menu_movie_bg" align(0.5,0.5)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], half1-2moon, Majestic-12 [Bot]