Galv's Cam Control

● ARCHIVED · READ-ONLY
Started by Galv 104 posts Page 2 of 6 View original ↗
  1. Roguedeus said:
    This reminds me of something I wanted to ask about...


    This plugin works amazing, but every so often there is a moment where the camera goes from one direction to another and being to stutter extremely quickly, and very noticeably. It will often continue until I stop moving, and allow the camera to catch up to the player, wait a few seconds, and begin walking again. But rarely, even that doesn't stop it. The whole time I am getting 60FPS so it doesn't appear to be frame rate related.


    It seems totally intermittent. I can make a video of it if you like. (I hope it will translate to a screen capture camera)


    I am wondering if having a non-default resolution is the problem? (Since no one seems to have mentioned it yet) The resolution I am using is an odd 48 multiple. 1488x720 That way the centered camera doesn't cut the bordering tiles in half.
    Thanks for letting me know. I think it could be to do with non-default resolution - I will do tests using the resolution you are using and make a fix for it when I can :)
  2. The MBS_Zoom plugin doesn't seem to work right with this since if I zoom it in to the player, it cuts so that the player is at the bottom right corner of the screen. I am wondering if you have plans to include your own zoom-in plugin.
  3. I am interested in looking into a zoom functionality plugin, but it won't be for a while as I am still getting through my huge to-do list :)
  4. Galv said:
    Thanks for letting me know. I think it could be to do with non-default resolution - I will do tests using the resolution you are using and make a fix for it when I can :)



    I know its been a while. But have you managed to find anything?


    I can still make that video if you like. (assuming I can capture the visual)
  5. I've seen the issue, there's actually version 1.7 available and I have had testers who experienced it say it fixed it for them. Please let me know :)
  6. Galv said:
    I've seen the issue, there's actually version 1.7 available and I have had testers who experienced it say it fixed it for them. Please let me know :)

    /facepalm


    Sometimes I really feel as stupid as I appear. BD


    edit:


    Yes, 1.7 makes a significant improvement. It seemed to jitter for a few seconds the first time I jumped in, after the update, but quickly vanished.


    Haven't seen it since.
  7. Using 1.7 it jittered? Or just scrolled down a little once entering the map?
  8. Galv said:
    Using 1.7 it jittered? Or just scrolled down a little once entering the map?



    Just the first time I started a game after the update. I began walking around and it immediately started jittering.


    I was thinking I was going to have to report that nothings improved, when suddenly it stopped and never happened again. I even walked around for a few minutes doing the usual things that would often cause the jitter, and it never happened.


    Even re-started the game. No jitter.


    So whatever it was, it seems to be dealt with. :)
  9. The fact it happened at all concerns me, still. I'll keep an eye on this and continue trying to replicate :)
  10. Galv said:
    The fact it happened at all concerns me, still. I'll keep an eye on this and continue trying to replicate :)



    Hey Galv, I think I found a sollution to the 1 grid jump problem.

    Try putting

     

    Spoiler
    target.screenY = function(){
    var tw = $gameMap.tileWidth();
    return Math.round(target.scrolledY() * tw + tw / 2);
    }



    under the var target = $gamePlayer  (in GALV.CC.camControl, case "player"


    Image of location to fix

    Spoiler
    81d151477f.png

    This seemed to fix the problem for me.


    Edit* Seemd to fix the jump, put i offset the player. I need to find a way to just set the camera on start to that position, and not move the players offset
  11. Are you talking about the jitter issue? Or the slide down at the start?


    I can add code to fix the offset issue - I'm currently concerned about the jitter issue still.
  12. I was referring to the offset. Sorry about that. If you could add the fix for that, that would be awesome.

    I'm personally noticing small shuddering but only in fullscreen mode. (using a 1280 x 720 resolution)
  13. Hi,
    I look for a cam control can be used to be focused on the mouse and the player because I would like to make a game with a gameplay like Shards of War. I wonder if your plug-in can do that.

    I want to add that it's not a request to implement that if your plug-in doesn't work that way. :)

    A video of the gameplay of Shards of War.






    There is a video for a camera hack for League of Legends which shows the cam following the mouse more precisely (at 0:14, Follow mouse section). There are others control camera too in this videos. The hack doesn't exit anymore but it was a really fun to play with.

  14. That's an interesting idea. I will definitely look into this one day - I have added this to my to-do list.
  15. Then godspeed. :)
  16. Updated to version 1.8 - fixed an issue when transferring player on the same map would force camera to the player even if it had another target.
  17. Hey Galv so after some time (a lot of time, took me a few weeks to discover these...) I found a few solutions/ patches to help people with other plugins... 

    There are still a few problems there seems, but hopefully in time I can find a fix (unless you find solutions sooner.)

    The first is the weird jump whenever the room starts. That has to do with the $gameMap.setDisplayPos not calculating the shift of the player and the half point of the tile. (since maps are broken into tiles, the center of the map is half a tile, it doesn't take that into account) 


    Add these two center x and center y overwrites into the script 


    Game_Player.prototype.centerX = function() {
    return ((Graphics.width / $gameMap.tileWidth() - 1) / 2.0);
    };

    Game_Player.prototype.centerY = function() {
    return ((Graphics.height / $gameMap.tileHeight() - 1.75) / 2.0);
    };






    Another fix is if you set the camera to a VERY low speed, I simply lock the movement at 0 else it stutters.


    Place this after the declaration of var sx, and sy inside Game_Map.prototype.updateScroll


    if (sx < 0.005) (sx = 0);
    if (sy < 0.005) (sy = 0);








    The next is a patch code is for MBS_MapZoom... to fix the strange offset you need to calc the zoom offset . Inside Game_Map.prototype.updateScroll add 


    var screenX = this.camTarget.screenX()*this.zoom.x;
    var screenY = this.camTarget.screenY()*this.zoom.y;








    Now you'll need to calc the zoom into the setDisplayPos as well... else the original jump start start of map problem persists... 
     


    So do this instead 


    Game_Player.prototype.centerX = function() {
    return ((Graphics.width / $gameMap.tileWidth() - (1*$gameMap.zoom.x)) / 2.0)/$gameMap.zoom.x;
    };

    Game_Player.prototype.centerY = function() {
    return ((Graphics.height / $gameMap.tileHeight() - 1.75*$gameMap.zoom.y) / 2.0)/$gameMap.zoom.y;
    };









    I've created a compatibility patch below in case this is too much trouble to implement, it also carries a small fix for MBS_MapZoom when zooming while moving. (tho maybe it will be patched soon.)

    Let me know if there are problems that still persist... or questions and I can try to help. Love the plugin galv, and I'm just happy I am hopefully able to improve it. View attachment GALV_CamControlPatch.js


    [Place patch below CamControl, and be sure CamControl is below MBS_MapZoom]

    740821576e.jpg
  18. Thanks, Anisoft. I threw those fixes into the latest version 2.0.
  19. Galv said:
    Thanks, Anisoft. I threw those fixes into the latest version 2.0.



    No problem, glad I could be of some help!
  20. Thank you for the amazing work on this. I'm running into a small snag and wondered if you had any thoughts:


    I have some events that change the camera behavior as the player walks through them. For example, the camera will follow the player as usual until they pass through an event that re-focuses the camera on the event itself, stopping the camera from moving, but allowing the player to still move freely. This is because, just off the screen is another event that will re-enable the player-following camera. This lets me create semi-hidden areas and reward player exploration. Hyper Light Drifter does this a lot, and I can get a similar effect here. So far, so good.


    If I walk/run past the events using the keyboard, it's smooth, beautiful, and works exactly as intended. But if I use mouse control, the player stops moving once I hit the event, and I have to click again to continue movement. Since I might have 2-3 of these events in a line, it causes a lot of disruption from the game flow.


    I can provide the built game to show the problem in action. Let me know if you prefer Windows or Mac.