Bind Pictures To Map

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

  1. Andar

    Andar Veteran Veteran

    Messages:
    28,643
    Likes Received:
    6,584
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    what is the size of the pictures you're binding to the map?
     
  2. Krimer

    Krimer Veteran Veteran

    Messages:
    136
    Likes Received:
    102
    Location:
    Kiev, Ukraine
    First Language:
    Ukrainian
    This plugin is not a parallax mapping plugin. Yes, you can do that with him, but its still just a standard pictures, they need to be deleted or changed when player moved to another map.
     
    Last edited by a moderator: Jan 24, 2017
  3. Skurge

    Skurge " (GASP) What's going on!? " Veteran

    Messages:
    1,051
    Likes Received:
    205
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    Hi, I love this plugin and I'm using it to identify faction turf on my project's map. To reduce the amount of commands and images being made I wish to use the simple "change picture tint" command. However the binded images seem to ignore these and I was hoping you could provide me an answer to this problem- I've checked the documentation and help pages but I find nothing relevant concerning this particular issue.
     
  4. Skurge

    Skurge " (GASP) What's going on!? " Veteran

    Messages:
    1,051
    Likes Received:
    205
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    bump^

    Tinting images using this plugin does not seem to work.
     
  5. anonamix

    anonamix Veteran Veteran

    Messages:
    73
    Likes Received:
    62
    First Language:
    english
    Primarily Uses:
    RMMV
    Edit: Never mind, I found out what I was doing wrong. I was never here...
     
    Last edited: Mar 29, 2017
  6. Skurge

    Skurge " (GASP) What's going on!? " Veteran

    Messages:
    1,051
    Likes Received:
    205
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    Hate to bump again, but I am requiring assistance with this plugin if anyone can help me.
     
  7. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,366
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    This plugin is very heavy and very consumer.
    If you want better performance, I made a basic plugin.
    Much faster and easier to manage.
    to bind picture use by real Map screen
    Code:
    $gameScreen.showPicture(ID, 'fileName', 0, x, ,y).bindToMap();
    to bind to position where picture are.
    Code:
    $gameScreen._pictures[ID].bindToMap();
    // or
    $gameScreen._pictures[ID].bindToMap(x,y);
    Code:
    $gameScreen._pictures[ID]._BindToMap = false; // set false

    the plugin here, simply add to new plugin to repalce basic rmmv Game_Screen prototype && Game_Picture
    Code:
    // PROTOTYPE RMMV □────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    // □ [maxPictures] □ [initialize] □ [showPicture] □ [isPreloaded] □ [show]
    // └─────────────────────────────────────────────□□□-Game_Screen-□□□───────────────────────────────────────────────────────────────┘
    //□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
        //SETMAX PICTURE limit , ADD MORE MAX LIMITE DE PICTURE IN GAME
        Game_Screen.prototype.maxPictures = function() { return 1000 };
    //□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
    //□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
        // AJOUTER LES OBJECT EASING DANS GAMESCREEN
        var alias_Game_Screen_Prototype_initialize = Game_Screen.prototype.initialize;
        Game_Screen.prototype.initialize = function() {
            alias_Game_Screen_Prototype_initialize.call(this);
            this._picturesEasing1 = [];
            this._picturesEasing2 = [];
        };
    //□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
    //□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    //QUAND AFFICHE UNE PICTURE AJOUTE AUSSI UN CONTENEUR EASING [DANS LE BON PID ARRAY]
    Game_Screen.prototype.showPicture = function(pictureId, name, origin, x, y, scaleX, scaleY, opacity, blendMode) { // frames permet de detecter Leanimatedpicture, compatibility ivra
        var picture = new Game_Picture();
        picture.show(name, origin, x, y, scaleX, scaleY, opacity, blendMode);
        this._pictures[pictureId] = picture;
        this.setAngle = function(t){ this._pictures[pictureId]._angle = t; return this }
        this.setRot = function(r){ this._pictures[pictureId]._rotationSpeed = r; return this }
        this.bindToMap = function(){ this._pictures[pictureId]._BindToMap=true; return this }
        return this
    };
    //□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
    //□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    // CHECK SI PICTURE EXISTE , UTILE POUR VERIFIER SI UN MENUE EST PRELOAD
    Game_Screen.prototype.isPreloaded = function(pictureId) {
        if(this._pictures[pictureId]){ return true;} return false
    };
    //□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
    //□▼↓▼□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↓↓↓
    // remplace le constructeur d'image, supprimer rotation et angle initialisation
    Game_Picture.prototype.show = function(name, origin, x, y, scaleX, scaleY, opacity, blendMode) {
        this._name = name;
        this._origin = origin;
        this._x = x;
        this._y = y;
        if(scaleX===0||scaleX>0){ this._scaleX = scaleX };//+
        if(scaleY===0||scaleY>0){ this._scaleY = scaleY };//+
        if(opacity===0||opacity>0){ this._opacity = opacity };//+
        if(blendMode===0||blendMode>0){ this._blendMode = blendMode };//+
        this._angle = 0; //+
        this._rotationSpeed = 0; //+
        this._BindToMap = false; //+
        this._bindX=x;//+
        this._bindY=y; //+
        this.initTarget();
        this.initTone();
    };
    //□▲↑▲□═══════════════════════════════════════════════════□□═══════════════════════════════════════════════════□↑↑↑
    
    // PROTOTYPE RMMV □───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
    // □ [bindToMap] □ [update] □ [updateBindPos]
    // └─────────────────────────────────────────────□□□-Game_Picture-□□□───────────────────────────────────────────────────────────────┘
    //$gameScreen._pictures[30].bindToMap()
    Game_Picture.prototype.bindToMap = function(aX,aY) {
        console.log('this: ', this);
        this._bindX = aX||($gameMap.displayX()*48)+this._x;
        this._bindY = aY||($gameMap.displayY()*48)+this._y;
        this._BindToMap = true;
    };
    Game_Picture.prototype.update = function() {
        this.updateMove();
        this.updateTone();
        this.updateRotation();
        this.updateBindPos();//++
    };
    Game_Picture.prototype.updateBindPos = function() {
        if(this._BindToMap){
            this._x = this._bindX-$gameMap._displayX*48;
            this._y = this._bindY-$gameMap._displayY*48;
        }
    };
    
     
    Last edited: May 29, 2017
  8. Skurge

    Skurge " (GASP) What's going on!? " Veteran

    Messages:
    1,051
    Likes Received:
    205
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    N/A
    I'm sorry I didn't understand that, does that fix the tint picture function?
     
  9. Gabrelik

    Gabrelik Almighty Maker of Sandwiches Veteran

    Messages:
    772
    Likes Received:
    1,284
    Location:
    Florida, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    @Jonforum ,

    Are you suggesting an edit to this plugin, or trying to promote your own? If the latter, I would recommend starting your own thread for that.
     
  10. Oni Giri

    Oni Giri Villager Member

    Messages:
    18
    Likes Received:
    4
    First Language:
    German
    Primarily Uses:
    RMMV
    Hi there,
    it looks like this plugin from @Galenmereth has some problems with the 1.5 update?
    It worked fine, but I got this error after the update:
    "Cannot read property "setDimensions" of null" (line 216)

    Any suggestions?
     
  11. Parallax Panda

    Parallax Panda Got into VxAce ~2014 and never stopped... Veteran

    Messages:
    695
    Likes Received:
    1,035
    Location:
    Fukuoka, Japan
    First Language:
    Swedish
    Primarily Uses:
    RMMV
    Is this plugin abandoned or still supported? I've noticed it had problems with Terrax Lightning plugin as well as the fact that it hasn't been updated since 2015-11-14! Considering it's September 9th 2017 now I'm a little worried about using this plugin for my main project because it might not be working well with the current (or future) version of the engine and/or other up to date plugins.

    Still, this is as far as I know the ONLY plugin of it's kind. And being able to bind pictures to the map is vital for my project. :kaoback:

    I also wonder about the performance. Does anyone know if this plugin is demanding less or more (or about the same) processing power from the CPU/RAM when used for displaying entire maps for parallax mapping (a ground layer and a overlay layer) compared to Galv's Layer Graphics?

    Basically I'm considering ONLY using this plugin instead of Galv's for parallax mapping, even though it's more work binding and deleting pictures with plugin commands compare to simply adding a tag in each map's note section. The reason being that this plugin works better with Khas AdvancedFog plugin.
    But I'd like to weight in the two plugins performance usage as well as the overall compatibility with the current MV build (and other plugins) before I make the jump. Another important thing for me to consider is if this plugins is still supported since I'm fairly sure Galv still supports his plugin.

    So any opinions or information regarding this would be very, very, VERY appreciated. :kaojoy:

    Thanks,
    P.Panda
     
  12. Mieze

    Mieze Maker Freak Veteran

    Messages:
    107
    Likes Received:
    99
    First Language:
    German
    Primarily Uses:
    N/A
    For me the plugin destroys the performance. I can not test without it does not lag. And the picture is not displayed. For me it does not work.
     
  13. ImperiousRex

    ImperiousRex Veteran Veteran

    Messages:
    61
    Likes Received:
    7
    Any alternatives to this plugin?
    Tried searching plugin list and google with no results.

    I'm surprised binding pictures to the map is not more popular.
     
  14. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,366
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    hi , this is the only line you need .
    PHP:
    x= ($gameMap.displayX() * $gameMap.tileWidth());
    y= ($gameMap.displayY() * $gameMap.tileHeight());
    no need plugin for bind to map.
     
    ImperiousRex likes this.
  15. ImperiousRex

    ImperiousRex Veteran Veteran

    Messages:
    61
    Likes Received:
    7
    Thanks

    Though how do I use it? Replace lines in the game files?
     
  16. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,586
    Likes Received:
    1,366
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    no this its the coor of your obj on the map
    youObj.x = ($gameMap.displayX() * $gameMap.tileWidth());
     
  17. ImperiousRex

    ImperiousRex Veteran Veteran

    Messages:
    61
    Likes Received:
    7
    I'm trying to show a picture and bind it to the map on the co ordinates of the current mouse position which is all working except for binding the picture to the map instead of screen

    Am I supposed to add those lines of code as a script call or plugin command after using the show picture command? Please help.
     
  18. kako05

    kako05 Veteran Veteran

    Messages:
    92
    Likes Received:
    4
    First Language:
    Australian
    Primarily Uses:
    RMMV
    This plugins has serious problems with changing images.
    i5 3570k 4.2ghz/rx 380x/8gb ram

    [​IMG]

    simple event and FPS from 54-60 stable drops to 30-1 fps in a minute making everything crash. It's ok for a few second, then it start to decrease fps exponentially every time it changes picture. Without Bind Pictures To Map script, everything runs smooth solid 60 fps. But yeah... problem is i cant do maps as pictures hides my characters/npc under it...
    Is there any other script which would do the same without breaking performance? I want to add 3 pictures (like gif) to make my background moving.
     
    Last edited: Oct 15, 2017
  19. Kes

    Kes Global Moderators Global Mod

    Messages:
    20,977
    Likes Received:
    10,677
    First Language:
    English
    Primarily Uses:
    RMVXA
    @kako05 Asking in a coder's thread for people to recommend someone else's plugin is a bit of a no-no. Please make a new thread in JS Plugin Requests.
    Also, the problem you report must have something to do with your specific setup or project. If it were 'just' the fault of the plugin, then everyone else would have been reporting this issue.
     
  20. kako05

    kako05 Veteran Veteran

    Messages:
    92
    Likes Received:
    4
    First Language:
    Australian
    Primarily Uses:
    RMMV
    Ok i got it.
    I'll try to disable all my plugins and see if problem still there. It's a clean project btw. I'll post a gif later on.

    edit
    I just tested on a new project with only Bind Pictures To Map.
    I used 3 PNG images 3.73MB sizes each. Resolution 1920x1080. Same thing, performance just dies after half a minute. Must be some kind of memory leak, becouse ram usage just build up until performance drops.
    No other script or anything else, i used this resolution images, becouse previously i did a game on fullHD. But it's not a fault of YEP_core engine as i didn't used it this time.
    So i scaled pictures to 800x600 resolution and it runs just fine.

    30sec after starting
    [​IMG]

    ~3 minutes with lowe res pictures.
    (stable 60 fps, it's lower becouse i pressed print screen button)
    [​IMG]


    But it runs just fine on 1920x1080 without Bind Pictures To Map command on my game. But as I said, problem, I cant choose pictures layer option, like in that script to give "bottom" rule so i can see characters on top of the picture.
     
    Last edited: Oct 16, 2017

Share This Page