[RPGMMV ] JS plugin New Folder and Verbose console.log

● ARCHIVED · READ-ONLY
Started by Lady_Blackpearl 7 posts View original ↗
  1. Hi, I have two small questions! The first is I create another folder in img folder and called it custom_menu, I justw ant store there all menu images and stuff and then I placed this code almost on top of my plugin:

    Code:
    ImageManager.loadMenu = function(filename, hue) {
        return this.loadBitmap('img/custom_menu/', filename, hue, false);
    };

    The code work fine, images are loading without problem so far but is it fine and safe to use or will have problem later when, I don't know, export the game?

    And as second question (so won't make 7 bilions of thread and get killed :X), I noticed when trying to console.log for test something when I open console the menu start a bit to lag and getting this "[Violation] 'requestAnimationFrame' handler took 95ms". Is this even normal? My guess the cause could be the cursor animation I made, where from 255 opacity goes to 180 and back to 255 in a update. Thanks! :3
  2. First question:
    Afaik files that are only used by plugins dont count as used. So you have to add those images by hand after the export. You could also just export all files, not just the used ones.

    Second question:
    Extensive console.log really leads to heavy lag. The error might be related to that, even though I've never seen that error before.
  3. There should be no problems with custom folders, they're just not managed by the editor.

    As for your second question, yes, it's normal. MV engine is optimized so poorly that frame drops are rather consistent, especially on weaker machines.
  4. Mmh some ppl say is not a error but I'm still worried tho XD despite I'm still new on javascript I always liked to have as much as I can a clean and ordered code and store my code stuff like images in a separate and reserved folder :x
  5. Poryg said:
    MV engine is optimized so poorly that frame drops are rather consistent, especially on weaker machines.
    XD should I worry of my code then? Because Im running a i7 6700k and a gtx1080...
  6. If you're still worried, think about it logically:

    The program's executable has no influence whatsoever over the scripts - it's nw.js, an open source web browser if I simplify it. All power lies in the script files.

    And so, why would the default folders work and your custom ones not when the code is entirely the same, you just have a string of folder of different length.
    There's really no reason at all why should there be an error for the others if it worked for you.

    And yes, worries about code are quite on place, because even though many people don't realise it, Javascript is a single threaded language and therefore has only one cpu core worth of power.
  7. Well anyway thanks both! I will try see what cause that verbose anyway, if I don't find it oh well I will live with it! I can't make miracles! :p

    EDIT: actually I found the problem of the verbose. I made a window_menustatus.prototype.update function for create a animation (since couldnt find an alternative way...) and removing it the verbose disappear. Mmh might be have to find a better way to do what i want :X