Movie Using Images?

Discussion in 'Learning Ruby and RGSSx' started by Rikifive, May 2, 2016.

  1. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    676
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    So... How stupid that would be?


    As everybody knows, Ace's Movie player lacks of many simple functions, so my question is -


    Would that be stupid if I'd break a video into frames and then use magic of scripting to run through frames manually?


    Would the 'framed' version weight much more?


    Would it be lagging when loading bitmaps and such?


    Why such a stupid idea?


    I was just thinking, that 'playing' a video that way, would give me more control of it like:


    - Ability to make them skippable


    - Ability to implement interactions such as pressing buttons during cutscenes


    - Simply making minigames and such with animated background ~ Hmm.. Something similar to this?










    (The idea is of course not inspired by this in any way, but that's actually a pretty nice example of what I have in mind)


    - allow to put subtitles or in-game values (actually I don't need that, but that's also a good example)


    Would that be possible or should I forget about this?


    ~Thanks!
     
    Last edited by a moderator: May 2, 2016
    #1
  2. Zalerinian

    Zalerinian Jack of all Errors Veteran

    Messages:
    4,695
    Likes Received:
    921
    Location:
    The Internet.
    First Language:
    English
    Primarily Uses:
    N/A
    It's possible, but I don't think it'll be very efficient. You're using Ace, so loading the bitmaps shouldn't be too bad as long as you have a decent buffer so you're not waiting on each frame to load in. That being said, it's less efficient to be reading multiple, separate small files rather than a larger one file, as the hard drive will need to jump around more on the disk to read the separate files, most likely.


    There's going to be an overhead with each separate image that increases the overall filesize, because each file is going to have information telling whatever is reading it the width, height, and color information, among other possible bits of information. With a video file we only need the width height and color information once, and it applies to every frame.


    Then there's also the question of the audio with the images. You'll want to make sure they sync up if you're playing them separately, which shouldn't be a big challenge if they're both loaded in before playback starts, but it's still a concern.


    So yeah, it's possible, just like most things you could ask for, but the question of whether its worth it is up to you and whether or not you want to put in the effort to build the script(s) necessary to accomplish this. Not to mention you'll need to make your video and then have some tool separate each and every frame into separate files for you. That would be tedious to do manually, even if the video is just 24 frames per second. That'd be terrible.
     
    #2
    Rikifive likes this.
  3. Rikifive

    Rikifive Bringer of Happiness Veteran

    Messages:
    1,442
    Likes Received:
    676
    Location:
    Poland
    First Language:
    Polish
    Primarily Uses:
    Other
    Yeah, that's the problem.


    As for multiple small files - A silly workaround would be putting all frames into one png file and make it huuuuge, then use src_rects to handle stuff, but that would be even worse I think.


    Sync wouldn't be a problem ~ I have a video that I would like to break ~ so the video and sound would be 'compatible' with each other, though the problem is - if the game would lag even a little, then stuff would explode.


    Breaking the video into images shouldn't be bad as there are some tools here and there~


    Scripting that wouldn't be a problem either ~ It all would be happening in a custom scene anyway, so it would be just a matter of correctly updating it in the update method. ~ and I think that would be a pretty short code ~ everything would be done automatically.


    But yup, the problem is if Ace will handle this (not lag etc.) + the extra size that will come with it...
     
    #3

Share This Page