[Bug] Frame drop when changing scenes (1.5.0/1.5.1)

Discussion in 'RPG Maker MV Improvement Boards' started by Oscar92player, Aug 5, 2017.

  1. Fasoldgames

    Fasoldgames Veteran

    Messages:
    62
    Likes Received:
    40
    First Language:
    Dutch
    I got the same problems, menu loading lag, picture show trouble. I've been working on a game for almost a year now, and with the new update, my game is broken. I just hope I can download RPG Maker 1.4. Does not show up in my account details though....
     
    #21
  2. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I do hope you realize that *every* game out there has some menu loading lag. In fact, I can't think of any game out there that doesn't have a small pause to load the menu. So if you are looking for no menu lag, you might be looking a really long time.
     
    #22
  3. Fasoldgames

    Fasoldgames Veteran

    Messages:
    62
    Likes Received:
    40
    First Language:
    Dutch
    I don't think this is very constructive. The lag I am talking about is far from normal, as are the other image problems. And the length seems to increase, which is very annoying, as is the fact that I can't download version 1.4 anymore, apparently.
     
    #23
  4. Susan

    Susan Veteran

    Messages:
    2,759
    Likes Received:
    8,381
    Location:
    somewhere on this planet~
    First Language:
    No idea...
    Primarily Uses:
    RMMV
  5. Fasoldgames

    Fasoldgames Veteran

    Messages:
    62
    Likes Received:
    40
    First Language:
    Dutch
    Thanks! I'll try that!
     
    #25
    Susan likes this.
  6. Chaos17

    Chaos17 Dreamer

    Messages:
    1,233
    Likes Received:
    397
    Location:
    France
    First Language:
    French
    You should watch Digital Foundry videos and you will might realize that frame drops are not loved at all whatever the situations and games.
    So players DO bash games with bad framedrops.



    And this is just an example with a 3D game, 2D games with simple window skins like the author of this topic showed should NOT have frame drops or you never played a Vanillara game (the master of master of 2D). So yeah, that's a flaw that should be fixed and not defended. Otherwise you need to play more games. If it was 10 years ago, I would say it's the computer fault of the user but not today, our computers are enoug powerfull to handle Rpg maker Mv.
     
    #26
    Oscar92player likes this.
  7. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Chaos17 : Computer speeds are the same they were since 2007. I know as I had a 3 GHZ computer then, and most computers are still 2.4 - 3.4 GHZ. All that has changed are the cores, and most computers and programs are not designed to handle it. So really it stands to reason that games would run slower as we've had no improvements on the speed side in about 10 years now. All the improvements are in graphic cards, speed of OS, and memory the system can handle.

    And like I said, EVERY GAME I can think of has had a small drop loading a new screen, and I played a LOT of games when I was younger. Usually it is like 1/60 of a second, but it is there. For example, even Persona 5 had it, there was a very small delay when you load the menu the first time.

    Now, could it be gotten around by storing the menu in memory? Sure. But then the code would have to be rewritten to update it every time you change something. Plus, you would need enough memory to store the Menu + the main screen + whatever else is stored. But, that's an extra 11 MB just at the default resolution that is needed on the video card to do that, just to store the menu (816 x 624 x 24 = # of bytes needed, then divide by 1024 then divide by 1024 again to get it in MB ). It gets worse if you want a bigger image. With today's graphics cards, maybe a non-issue, but still something to think about.
     
    Last edited: Sep 13, 2017
    #27
  8. Chaos17

    Chaos17 Dreamer

    Messages:
    1,233
    Likes Received:
    397
    Location:
    France
    First Language:
    French
    It's okay, I got an awswer from coder and it's make more sense. That's a bit sad though. I

    [​IMG]
     
    #28
  9. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Chaos17 : Bummer. I was hoping predrawing the image would fix it. But, what I understand (from my CS days) is it depends on your video card having extra space where it can draw the image but not show it on screen? It was called page flipping in the DOS days, you just drew the image on another 'page' of the screen, and flipped to it when it mattered.
     
    #29
  10. Poryg

    Poryg Pixie of the Emvee kingdom

    Messages:
    1,866
    Likes Received:
    3,607
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I wouldn't say it's the fault of just javascript... But look at the optimization.
    If I were to dissect how the menu is being created.

    1. Necessary data (event positions etc.) are stored before the Scene_Map is destroyed
    2. Scene_Map is destroyed and Scene_Menu is created.
    3. Screenshot of where you are is being made. That is a resource demanding thing. Always. Then it is blurred, which is extra strain for the cpu.
    4. The windows are being drawn one by one. First the background, then the text and with it all sorts of data that need to be obtained. Both background and text need to create bitmaps using cpu.
    5. Then there is of course the animation.
    When you leave menu, Scene_Menu is destroyed and Scene_Map is created from scratch.
    Which involves:
    1. Drawing the lower layer, so that means obtaining data from the tileset and appropriate map, then drawing the map.
    2. Creating a bitmap from the map and adding it as a child to the scene.
    3. Creating the higher layer, so events etc.
    And I kept it very simple, omitting quite a bit.

    When you change maps, Scene_Map is destroyed and Scene_Map is created from scratch.

    It is the fact that everything every scene is being drawn on the spot and from scratch that these lags are created.
    And you would be able to precache the menu, I'm sure of it. Or just rewrite it so it is more cost efficient. They could precache the windows and while creating a little lag at the beginning, from there no lag would be present. They could refrain from making a snapshot of your current map position and then blurring it, because that's the main reason why there are such huge frame drops. And I'm sure there's more.

    Precaching maps would be much more complicated, because in all honesty, the game would need to decide where are you going to teleport from the map you're in. But then again, precaching is possible. I use PIXI to precache my images as textures, so they're always ready when needed. I turn them into PIXI.Sprites (instead of RPG maker's default sprites), so cpu is not involved in making them. And while it is annoying that we say it all over again, it does make a considerable difference. Because unlike cpu, gpu is dedicated to drawing graphics, which makes it draw the graphics faster than cpu. And if I could, I would reprogram my rpg_core scripts so that gpu is dedicated to draw tiles.
    I'm nothing special in programming though... So the only thing I can do is show people how to create their own menu that won't cause any significant frame drops. I've got it already planned and hopefully will finish it in a couple of days.
     
    #30
  11. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    @Poryg : I'd like to see that. Precaching like you say would be like the old dos page flips, where you have it all ready to go. Though, odds are you still have a micro pause as you load it (which is what I meant when I said all games have a little pause on scene changes), it's still better than say a pause of a few minutes (which I hit in another game recently).
     
    #31
  12. Poryg

    Poryg Pixie of the Emvee kingdom

    Messages:
    1,866
    Likes Received:
    3,607
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Yes, you always have a micropause, because the instructions need some time to get processed. However, as long as the micropause is less than human's reaction time (which is often at least 0.15s), people won't really notice it. However, you can't have frame drops from 60 to 5 fps, that's poor optimization.

    I will draw you the menu and send you the codes as well as the instructions through PM once I'm finished with it.
     
    #32
  13. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Ok, though I don't have Mv installed on my machine right now, so I can;t really do anything with it. Maybe send it to the OP and see what they think as well?

    And yeah, what I mean by micropause is a pause of 1/60 or 2/60 of a second. Slightly noticeable if you go looking for it, but not otherwise.
     
    #33
  14. Poryg

    Poryg Pixie of the Emvee kingdom

    Messages:
    1,866
    Likes Received:
    3,607
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Well, I wanted to send it to you, since you said you wanted to see :D
    But ok. The point still stands, if you want a lagless menu, you have to design it yourself. Because looking at the default code, it's so complicated that it's better to just throw it away.
    And making map transitions would mean the same. You need to take care of it yourself, because the software cannot precache maps effectively, since it doesn't know where would you teleport.
     
    #34
  15. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    True. That's why I just use the map fade, as people are ok with that.

    And sure, you can still send it, I just can't check it out right away.
     
    #35
  16. Oscar92player

    Oscar92player Veteran

    Messages:
    300
    Likes Received:
    126
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    In fact, I'm using the commands "Fade In" and "Fade Out" when changing maps since the VX version of the Maker, so the players can have a smooth transition between places. However, in MV, I have to put a "Wait" command with aprox. 30 frames, so the map can load correctly to make that "tearing" effect disappear, because if you begin to walk inmediatly after the default transition, the player will experiment some lag due to the frame drop that happens in that exact moment.
     
    #36
  17. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    I'll have to take your word for it, as I've never tested it short of a short MV project in 1.1 with maps no bigger than 40 x 40 (which I didn't notice it, but I wasn't looking for it, as it was a short project to test out a battle system, nothing more). Did you have this problem in all versions of MV?

    PS: @Oscar92player : I know you posted your PC specs somewhere once, but can you post them on this thread? Also include if you are using 32 or 64 bit version of windows please. I'd recommend posting them in the opening post so the dev team can look at it when they get a chance.
     
    #37
    Oscar92player likes this.
  18. Oscar92player

    Oscar92player Veteran

    Messages:
    300
    Likes Received:
    126
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    I've updated the main post with the details, but here they are too:

    Computer details:
    Processor:
    • AMD A10-5745M APU with Radeon(tm) HD Graphics
    • 2.1 GHz
    • 4 cores
    Video Card:
    • AMD Radeon HD 8670M
    • 1.0 GB of Dedicated Memory
    • 1024 MB of Total Memory
    • Pixel Shader Version 5.0
    • Vertex Shader Version 5.0
    Video Card #2:
    • AMD Radeon HD 8610G + HD 8670M Dual Graphics
    • 3.0 GB of Dedicated Memory
    • 4.0 GB of Total Memory
    • Pixel Shader Version 5.0
    • Vertex Shader Version 5.0
    RAM:
    • 8.0 GB
    OS:
    • Windows 10 Home (64-bit) Build 1703 (a.k.a. Creators Update)
     
    #38
  19. bgillisp

    bgillisp Global Moderators

    Messages:
    8,339
    Likes Received:
    6,274
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMVXA
    Ok, that can help. Once I get MV on my new computer (its still on my old one), I can see how an old version of MV works on Windows 10 64 bit on my end, as my new computer is 2.8 GhZ quad core, 32 GB memory, 1 TB HD, 4 GB Video card (forgot which card).

    See... I still have a version 1.1 project and a version 1.3.1 project, with the respective plug-ins, so I can see if maybe the error doesn't replicate on an old version. I don't remember seeing it in 1.1, and I only used 1.3.1 for a couple of hours, but I didn't go looking for it too.

    PS: Any chance the bug goes away when you update to 1.5.1? I don't see where it was fixed in the changelog, but still curious.
     
    #39
  20. Oscar92player

    Oscar92player Veteran

    Messages:
    300
    Likes Received:
    126
    Location:
    Benalmádena - Málaga - Spain
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Didn't try, because my own project is now using YEP 1.5.0, and I need to make a new project with the 1.5.1 version and see if this issue still happens. But, for what I know about the changelog, I think the issue will be the same. I don't know at the moment, I will test it and see what happens.

    P.S.: By the way, Yanfly has made another MV Update based on the 1.5.1 version of MV. I didn't try this version still, but if it works the same as YEP 1.5.0, I will be updating my project with it so I can make a more stable computer game, because it seems that the latest updates are more efficient for mobile devices than computers.

    UPDATE: I've tested a new project with 1.5.1, and the frame drops are the same as in 1.5.0. It seems that we need to wait for another update or something, so I'll change the details of the thread title to 1.5.0/1.5.1.
     
    Last edited: Sep 15, 2017
    #40

Share This Page