Preload Manager

Discussion in 'JS Plugin Releases (RMMV)' started by Galenmereth, Oct 24, 2015.

    Tags:
  1. KadoDragon

    KadoDragon Veteran Veteran

    Messages:
    155
    Likes Received:
    9
    First Language:
    English
    I seem to be having a bit of a problem with this script at the moment. I have it set to load all system music at boot, but when I look at the log, it preloads one music file pretty quickly but then just hangs there and does nothing. It's still running at full FPS, doesn't seem frozen, just hanging and doing nothing.


    Here is a screenshot of the console next to the game after about 10 minutes of running with the game as the active window.


    Got any idea?


    EDIT: I have found out that running this script is actually corrupting files in my project which is really bad. Without fail, after running the script, one music file becomes corrupted and crashes the game when it tries to play it.
     
    Last edited by a moderator: Jul 14, 2016
  2. MJS4745

    MJS4745 Villager Member

    Messages:
    6
    Likes Received:
    0
    Location:
    USA
    First Language:
    English
    I was wondering at first if the size of the BGM file was a factor in how long it takes for the music to play on the title screen. However, even with the preloading plugin parameters set to true and the music file specifically named in the .js file as instructed in the file, I am still experiencing a delay. The custom BGM played on the title screen takes about 5 seconds to play(at 3.25 MB) while the original Dungeon1 BGM file(at 6.56 MB) takes about 2 seconds, so file size obviously isn't the issue. In either case the game isn't actually playing the music at the start of the title screen though, which is what I thought this preloader was supposed to help fix.


    The file is an OGG sound file, so that shouldn't be the issue; I am not using any other plugins either to minimize interference.


    As I stated above, even with all of the parameters set to true, and with the OGG file being specifically named in the actual .js file as per instructions, I am still seeing a lag of 2 to 5 seconds on the title screen with music playing for some reason. Which is annoying since it only takes about a second to just start a new game, and the title screen music can and often does set the tone for the game to come. So this lag in playing is quite disappointing to say the least.
     
  3. TheTitan99

    TheTitan99 Veteran Veteran

    Messages:
    165
    Likes Received:
    65
    First Language:
    English
    Primarily Uses:
    RMMV
    This doesn't seem to work with the new 1.3.0 version of RPG Maker MV. Started a new, vanilla project, only plugin is the newer Preload Manager, get this error message on load up:


    "ReferenceError


    key is not defined"


    Not sure what it means, maybe something with the new index file in 1.3.0? I'm not sure, shouldn't even be making wild guesses, ha, ha.


    Edit:


    Appears to have been fixed in version 1.3.1. I'm not having any more problems at least when testing.


    Edit 2:


    Tested out some more. There is a problem. When deploying a game, AND the game is encrypted, it'll get stuck on the loading screen. Probably because it can't read the encrypted files...? I dunno. But, it gets stuck on the initial load, with an FPS of 0, and an ms of 999+. This is on a vanilla 1.3.1 game, with the only added plugin being this preloader.
     
    Last edited by a moderator: Aug 15, 2016
  4. Rozel

    Rozel Villager Member

    Messages:
    27
    Likes Received:
    30
    First Language:
    English
    @Galenmereth Hi. I deleted some older music I didn't need for the game anymore, but it still searches for that music and tries to play it. This results in an error.


    [​IMG]


    I have tried restarting the computer. I've tried disabling the plugin, playing the game (which works fine), then re-enabling the plugin and still get this error. Is there some kind of cache I need to clear? How would I do this? Thank you for your time.
     
  5. Ringtale Games

    Ringtale Games Veteran Veteran

    Messages:
    82
    Likes Received:
    18
    First Language:
    english
    Look for where you originally used that sound file in the game. 


    So like, if you had an event, or a setting in the 'system' tag in your database where that sound was used. Erase that event or setting, or simply select a new file to use, that should clear it right up. 
     
  6. Rozel

    Rozel Villager Member

    Messages:
    27
    Likes Received:
    30
    First Language:
    English


    I have done that. The game works fine and the new replacement BGM plays when I have the plugin disabled.
     
  7. Ringtale Games

    Ringtale Games Veteran Veteran

    Messages:
    82
    Likes Received:
    18
    First Language:
    english
    Id suggest a second look. I had the same issue. 


    If you absolutely can't solve the mystery, try renaming the replacement to match the original file name. It'll fill the hole left when you erased the first song. 


    That route isn't the best fix, but it's an option. 
     
  8. Rozel

    Rozel Villager Member

    Messages:
    27
    Likes Received:
    30
    First Language:
    English
    I managed to fix it, but a bit differently! I didn't have the BGM set to run anywhere. "Autoplay BGM" was ticked off on the map, so it didn't have anything playing. But when I ticked it back on, it selected that song with that name. So it was still saving the name there. Replacing it then turning it off again fixed it.


    I wouldn't have been able to rename a file using that name because the Japanese characters would make other people crash when they tried to test my game. Thankfully we were able to find a solution, though. Thank you for your help.
     
  9. Ringtale Games

    Ringtale Games Veteran Veteran

    Messages:
    82
    Likes Received:
    18
    First Language:
    english
    Awesome! Glad to hear it. 


    I didn't know Japanese characters would do that haha. I'll keep this fix in mind if I notice it happening to someone else too 
     
    Rozel likes this.
  10. sundricat

    sundricat Veteran Veteran

    Messages:
    35
    Likes Received:
    2
    First Language:
    English
    On the note of preloading map resources, does it preload resources for common events that map events call?
     
  11. BonacimBR

    BonacimBR Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    Portuguese (Br)
    I am using the plugin on an Android build and every time I start the game on the device the message "Uncaught TypeError: undefined is not a function" pops up. I tested it before deploying to Android and it was normal (it also created the TDDM_PM.index file).
     
    Last edited by a moderator: Sep 12, 2016
  12. astracat111

    astracat111 Astra Cat Veteran

    Messages:
    205
    Likes Received:
    111
    Location:
    New York City
    First Language:
    English
    So, to  Galenmereth , I've been using this for a half a year and haven't updated recently...


    Everything runs fine except I'm having that same error most are having with BGM running on Android. Using the debug, what happens is it just hangs on one song. 


    I tried loading the files within the plugin javascript file using this: 


    TDDP.bootPreloadBGM = [
    "1_Battle",
    "2_Town",
    ]


    In the console in the debug it loads 1 BGM then just hangs and does nothing, no error messages or anything. I've tried switching the BGMs around and that doesn't help...


    So my conclusion is that somehow it's screwing up when M4A files try to load. This really sucks, because this has been an indispensable plugin for developing for PC, but it will not load M4A/MP4 files properly. I'm using Fre:AC to encode, although I don't think that's the problem. 


    Even more interesting, is that it will sometimes load the files if they are placed on the map, or if there's just 1 of them to load. Any more than 1 placed in there and it's not loading it. 


    Thanks for the plugin again, it's great for PC, but as of right now it's not compatible really with Android.
     
  13. Laurent

    Laurent Veteran Veteran

    Messages:
    108
    Likes Received:
    3
    First Language:
    French
    Hello, someone has the latest version of the plugin please?
     
  14. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,915
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV


    Yes it does; if it comes across a "Common Event" tag in the event, it then proceeds to go through the common event's events too.



    Thanks for the detailed feedback. I'm in the process of setting up an Android test environment now to once and for all squish these pesky audio bugs, then I'll release 2.0 officially and (hopefully) be able to be a bit more active going forward.
     
  15. astracat111

    astracat111 Astra Cat Veteran

    Messages:
    205
    Likes Received:
    111
    Location:
    New York City
    First Language:
    English


    Believe it or not your update helped me to get my pc demo fixed as far as loading times are concerned. My game uses all parallax maps with tons of characters/game-objects on screen at once at times, so it's important that everything is preloaded....


    But the problem remains, probably a chromium problem: audio. Testing how much ram this is all taking, it takes probably 10-20MB of ram to run a file that's like <2MB big. Just the expense of using html5 I guess.
     
  16. King Galaxian

    King Galaxian King Galaxian Veteran

    Messages:
    91
    Likes Received:
    14
    First Language:
    American!
    For some reason, whenever Ive tried to use any of the versions of this plugin past 1.1.1, along with the webaudiocache plugin, the music takes a long time to load up. And yet, in version 1.1.1, it loads up fine with webaudiocache. I have no idea why. I'm have no knowledge of javascript or any sort of scripting. But I was just wondering...is there any way, once you release version 2.0 of this plugin, that it will work well with webaudiocache? And if not, is there any other way to address the problem with the loading times for music files?
     
  17. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,915
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    @King Galaxian The reason it takes time is because it's preloading the entire song up front rather than streaming it. But does it take a long time when you test play locally, or is it when you test play on the web?
     
  18. King Galaxian

    King Galaxian King Galaxian Veteran

    Messages:
    91
    Likes Received:
    14
    First Language:
    American!
    When I playtest it locally. I honestly don't know how to test play it on the web...  :(  


    Edit: Oh and its after the Now Loading screen that the music still takes time to load. As in about 2-3 seconds. Its after the title screen is already loaded.
     
    Last edited by a moderator: Sep 25, 2016
  19. Galenmereth

    Galenmereth I thought what I'd do was Veteran

    Messages:
    2,206
    Likes Received:
    1,915
    Location:
    Norway
    First Language:
    English
    Primarily Uses:
    RMMV
    What format is the audio file? And are you on Windows or macOS? I'll take a closer look at this, as that should not happen :)
     
  20. King Galaxian

    King Galaxian King Galaxian Veteran

    Messages:
    91
    Likes Received:
    14
    First Language:
    American!
    The audio file is .ogg And I'm on windows 10, though I've had the same problem on windows 8.1 (before I did the free windows 10 update).
     

Share This Page