Resizing videos

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
Settle for Pocky
Newbie
Posts: 3
Joined: Sun Jul 08, 2018 8:49 am
Contact:

Resizing videos

#1 Post by Settle for Pocky » Sun Jul 08, 2018 8:54 am

I made sure to check and couldn't find a question on it

Hey guys,

New to all of this. Was able to find the way to play a video that takes up the full screen

$ renpy.movie_cutscene("family guy.webm")

but I'm not able to figure out how to make it just a portion of the screen and where to place it. This section of code on it was

image launch = Movie(play="oa4_launch.webm",pos=(10,10),anchor=(0,0))

I don't know the size of that original video it played but it played in the top left corner and full screen, so I'm safe to assume that resizing can be done.

I'm just looking for how to resize and reposition videos

any help would be greatly appreciated.

User avatar
Per K Grok
Regular
Posts: 58
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot
Projects: Sea of Lost Ships
Deviantart: pekj
itch: per-k-grok
Location: Sverige
Contact:

Re: Resizing videos

#2 Post by Per K Grok » Sun Jul 08, 2018 9:50 am

Settle for Pocky wrote:
Sun Jul 08, 2018 8:54 am
---

I'm just looking for how to resize and reposition videos

---
Define an image holding the movie

Code: Select all

image familyGuy = Movie(play="family guy.webm")
then show the movie at a chosen position and with a chosen scaling.

Code: Select all

show familyGuy:
     xpos 100
     ypos 100
     zoom 0.5

Settle for Pocky
Newbie
Posts: 3
Joined: Sun Jul 08, 2018 8:49 am
Contact:

Re: Resizing videos

#3 Post by Settle for Pocky » Sun Jul 08, 2018 5:05 pm

It just jumps to the end. Does it possibly have to do that

(Here's the bit right before the add-on code)
-------------

label continue:
g "ye-p"
g "Hey I didn't even get your name yet!"

python:
name = renpy.input("What's your name?")

name = name.strip() or "Kee"

image familyGuy = Movie(play="familyguy.webm")

show familyGuy:
xpos 100
ypos 100
zoom 0.5

------------

sorry if I'm doing something wrong or wrong indentation

User avatar
Per K Grok
Regular
Posts: 58
Joined: Fri May 18, 2018 1:02 am
Completed: the Ghost Pilot
Projects: Sea of Lost Ships
Deviantart: pekj
itch: per-k-grok
Location: Sverige
Contact:

Re: Resizing videos

#4 Post by Per K Grok » Mon Jul 09, 2018 2:02 am

Settle for Pocky wrote:
Sun Jul 08, 2018 5:05 pm
It just jumps to the end. Does it possibly have to do that

(Here's the bit right before the add-on code)
-------------

label continue:
g "ye-p"
g "Hey I didn't even get your name yet!"

python:
name = renpy.input("What's your name?")

name = name.strip() or "Kee"

image familyGuy = Movie(play="familyguy.webm")

show familyGuy:
xpos 100
ypos 100
zoom 0.5

------------

sorry if I'm doing something wrong or wrong indentation

To show the indentation use the code-tags ( <|> button in the tool bar)

I don't think that is the problem though. If it was something wrong on that front you should not be able to play the game at all.

My best guess at this point is that there is something in the code coming after the show image command that interferes with the playing of the video and stops it so it just keep showing the same frame.

To test that hypothesis you can put in a pause after the show image command

Code: Select all

show familyGuy:
     xpos 100
     ypos 100
     zoom 0.5
pause 30

If the movie now runs during the pause then you can start looking for what it could be that interferes.

Settle for Pocky
Newbie
Posts: 3
Joined: Sun Jul 08, 2018 8:49 am
Contact:

Re: Resizing videos

#5 Post by Settle for Pocky » Tue Jul 10, 2018 2:08 pm

Got it.

(changed the name of movie to simply familyguy without any spaces or capitals. Nothing to do with it, just wanted to let you know on why the name is different)

image familyguy = Movie(play="familyguy.webm")

show familyguy:
xpos 100
ypos 100
zoom 0.5
pause 30

You'll go in the special thanks part of the game for this. Let's cross our fingers it becomes popular

Post Reply

Who is online

Users browsing this forum: No registered users