Trying to overlay a picture on a movie

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
osnofla
Newbie
Posts: 4
Joined: Sat Jun 11, 2016 12:12 pm
Contact:

Trying to overlay a picture on a movie

#1 Post by osnofla »

Hello,
For a scene in a game that I'm working on, I need to show a movie which is viewed thorugh a hole. At first, I thought it will be easy, just put a picture of a hole above the playing movie... But to my surprise, after two days trying all variations I could thought with "renpy.movie.cutscene" and "add movie/play movie" I was unable to get it.
I still think it can't be so difficult, so the problem must be my low programming level. I could see the movie (movie.avi) playing in different ways, but never get the picture (hole.png) overlaying it.
Could anybody more skilled give me a clue on this? Thank you very much and sorry for my English.

User avatar
Donmai
Eileen-Class Veteran
Posts: 1960
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: Trying to overlay a picture on a movie

#2 Post by Donmai »

Try creating a new layer for your masking bitmap.
https://www.renpy.org/doc/html/displayi ... html#layer
https://www.renpy.org/doc/html/config.h ... fig.layers

Code: Select all

init python:
    config.layers = [ 'master'', 'transient', 'screens', 'overlay', 'mask' ]

Code: Select all

    show your_bitmap onlayer mask
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

osnofla
Newbie
Posts: 4
Joined: Sat Jun 11, 2016 12:12 pm
Contact:

Re: Trying to overlay a picture on a movie

#3 Post by osnofla »

Sorry, I can't get it to work... The idea looks promising and in fact I get the image overlayed on normal screens, but for some reason, when a movie begins to play it seems to override any other layer.
I was thinking about trying screen language (because of the zorder command), but the syntax is a real nightmare for me and I feel unable to get something useful this way...
Some more help, please?

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

Re: Trying to overlay a picture on a movie

#4 Post by Imperf3kt »

There are two ways to play a movie, one will be fullscreen and override any and all layers (probably what you're using and also all that Android supports)
The other let's you use the movie as if it were a regular image, and put it where you want, on whatever layer you want, scaled however you want, but uses more processing power and isn't fully supported on all devices (such as Android)
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

osnofla
Newbie
Posts: 4
Joined: Sat Jun 11, 2016 12:12 pm
Contact:

Re: Trying to overlay a picture on a movie

#5 Post by osnofla »

I guess you mean using "renpy.movie_cutscene" as fullscreen and the other defining movie as DinamicDisplayable and showing it like an image...
Well, I tried both with the same result: the movie always appear on top. Of course, maybe my code is not right at all, as I said, I'm not a good programmer so if someone could give a try to this maybe I'm wrong and there is finally a way to do it.
Thanks for reading.

Post Reply

Who is online

Users browsing this forum: No registered users