[Hot Start S1]: bgv webm (a2b2a) = loop.

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Post Reply
Message
Author
Hannah Darkness
Newbie
Posts: 12
Joined: Sun Sep 15, 2024 3:21 pm
Contact:

[Hot Start S1]: bgv webm (a2b2a) = loop.

#1 Post by Hannah Darkness »

viewtopic.php?t=68877

S1.1. Background video.
I plan to create the main and game menus with the active content items, such as video and music loops.
v2 is supposed to be played a2b (from start to finish), then b2a (reverse playing).

My videos are original, and I prefer to never give the piracy a chance to steal my intellectual property, especially regarding that my project is commercial.
So the online reverse video websites are pointless for me.

I suggest you to add the option of the background video with the function of b2a and a2b2a playing, including loop. (b2a2b may also work in some cases.)

S1.2. Timemarks and timeline.
Another notable possibility of a2b2a video playing use is the map is to add the character, or building, or any another item or part of surroundings as the image buttons.
If you'll add the timemarks to the video playing (if you'll mark the specific moments of video), then link them to timeline of events (such as the sprites or sprite buttons that will appear only in specific order and only together with specific timemarks), then will be possible to use the a2b2a function for the video as the map of the game world (player could be able to talk to specific character, or visit another location by clicking the sprite of the door, etc.) or whatever else.

Code: Select all

tl101:
     play music
     show Lucy
     
 1tmg2h1m3s:
     101tl2e
[/code]

Let's say, a video is short: you can't count how many times it will play a2b2a during the long time.
Here may help the tmg - the global timemark that strictly counts the time since the start of a2b2a. You need to stop the video on the moment of the e2 (a second event, appearance of Lucy) or look the slide, decide on where and how Lucy will appear. Then you must specify this in the tl101 - timeline number 101.

Code: Select all

tl58:
     open the door
     
 1tml47m2sb2a:
     58tl1e

Let's say, a video is long: you can't estimate the total time the video will be playing until the moment of someone opening the door will happen.
Here may help the tml - the local timemark, in the shown example - timemark during b2a playing.

Which timemark and when must happen? How the game must determine the order of timemarks and their events?
Here may help the number of timemark and the number of timeline to link and schedule them properly.

Is it possible for this my suggestion to be included in the future Ren'Py? How soon?

User avatar
jeffster
Miko-Class Veteran
Posts: 877
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: [Hot Start S1]: bgv webm (a2b2a) = loop.

#2 Post by jeffster »

Hannah Darkness wrote: Fri Sep 20, 2024 6:59 pm viewtopic.php?t=68877

S1.1. Background video.
I plan to create the main and game menus with the active content items, such as video and music loops.
v2 is supposed to be played a2b (from start to finish), then b2a (reverse playing).

My videos are original, and I prefer to never give the piracy a chance to steal my intellectual property, especially regarding that my project is commercial.
So the online reverse video websites are pointless for me.

I suggest you to add the option of the background video with the function of b2a and a2b2a playing, including loop. (b2a2b may also work in some cases.)
I don't think that playing video in reverse will be implemented in Ren'Py, because video files usually don't store every frame as it is.

At the start of a frame sequence (let's say 3 sec long) there is a "key frame", stored as it is. For next several frames, only the difference with the previous frame is stored.

For example, the movie scene has the same background, and a person is speaking. Almost all the picture is the same, except lips are moving, etc. Storing only changed data for the picture allows therefore to save space, sometimes ~10 times and more.

Then it's easy to roll the video in the usual direction, just adding a little of changed data. But showing the same video backwards requires to work through every frame from key frame to the last frame, to reconstruct the whole picture. It takes much more time and memory.

Ren'Py must use as little time and memoory as possible, because some resources (like large pictures, audio, video) already affect performance, and some platforms (like "web" in browsers and Android) have limited resources.

Besides, not many VN developers need to play video backwards.

Try to search internet with reverse video editor -online (i.e. "minus online", to exclude online converters) to find software that reverses video. It seems that OpenShot can do that.

Hannah Darkness wrote: Fri Sep 20, 2024 6:59 pm S1.2. Timemarks and timeline.
It is possible to program timed events (including sequences of timed events) using "timer" statement of screen language.

Or, if you really want to link events to played video, it is possible to write a Python function started e.g. by play_callback
https://renpy.org/doc/html/movie.html#Movie

and it could set appropriate flag variables at selected time marks.

E.g. using a dict with time values as keys:

Code: Select all

define timemarks = {
    1: "opendoor",             # At 1 sec set "opendoor"
    3.5: "closedoor",        # At 3.5 sec set "closedoor"
    }

screen timeline():
    if "opendoor" in timeline():
        #... do something with that

#...
init python:
    def timeline(start=False):
        if start:
            store.timeline_start = renpy.get_game_runtime()
        else:
            current_time = renpy.get_game_runtime() - store.timeline_start
            s = set()
            for k in timemarks:
                if current_time > k:
                    s.add(timemarks[k])
        return s
In other words, it's not hard to achieve something like timelines connected to playing video, using current Ren'Py functionality.
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

Hannah Darkness
Newbie
Posts: 12
Joined: Sun Sep 15, 2024 3:21 pm
Contact:

Re: [Hot Start S1]: bgv webm (a2b2a) = loop.

#3 Post by Hannah Darkness »

Pitivi shows my video as a number of different slides, but I can't pick up a specific slide to be able to change the order of the slides. While I can add another video to the same Pitivi file. (The problem with Pitivi is that the Pitivi disallows to save the file as webm.)
What do you assume from this? Most likely, is it possible to rearrange the slides in my video?
What is the trusted download link for OpenShot?

User avatar
jeffster
Miko-Class Veteran
Posts: 877
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: [Hot Start S1]: bgv webm (a2b2a) = loop.

#4 Post by jeffster »

Hannah Darkness wrote: Sat Sep 21, 2024 3:58 pm Pitivi shows my video as a number of different slides, but I can't pick up a specific slide to be able to change the order of the slides. While I can add another video to the same Pitivi file. (The problem with Pitivi is that the Pitivi disallows to save the file as webm.)
What do you assume from this? Most likely, is it possible to rearrange the slides in my video?
What is the trusted download link for OpenShot?
OpenShot has "Time" filter
https://www.openshot.org/static/files/u ... ntext-menu
and can reverse clips. (Right-click the clip - Time - Normal - Reverse (x1).
The link:
https://www.openshot.org/
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

Post Reply

Who is online

Users browsing this forum: No registered users