Enhanced Camera. Make awesome cutscenes!

Discussion in 'RGSS3 Scripts (RMVX Ace)' started by ♥SOURCE♥, Dec 9, 2014.

  1. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
  2. Sixth

    Sixth Veteran Veteran

    Messages:
    2,132
    Likes Received:
    801
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Wow, I must try this!


    I am using Tsukihime's Camera Target script to lock onto other events at certain puzzles and scenes, but this one sounds much more advanced! o.o


    I just hope this won't cost me any FPS drop! *-*


    Thanks a lot for this script!


    EDIT:


    Ok, after testing it, I must say that I am in love with this script!


    It fixes the "black edge" issue when not using a game resolution which can be divided by 32 (default tile size).


    Scrolls smoothly, pixel by pixel (as far as I can tell, haven't looked into the code yet).


    It is simply amazing!


    All the things which can be done with this, so many new features and real time mini-games can be made with this. A racing game for example, or the catch the thief game, like mentioned in the script's header.


    And the new ways of making cut-scenes, that is just epic! You know, Final Fantasy style, all things happening while the player can still move without the camera centered on the player.


    I got a little carried away here, sorry. Too many new ideas stroke my head after trying this script, lol.


    Ohh, and there is no notice-able FPS drop at all! *-*


    Huge thanks for this!


    EDIT2:


    Unfortunately, the whole screen gets messed up if my map is smaller in dimensions than my game resolution with this script. :(


    I suppose I could just fill the place with black abyss or some background, but it is still annoying to remake all the maps I made yet again. >.>
     
    Last edited by a moderator: Dec 10, 2014
    #2
  3. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    Updated to 1.0.1

    I'm glad you like it, Sixth! Really, your comment makes me happy. It feels great to know that this system helps you. I appreciate your feedback. Don't forget to show some of the things you do with Enhanced Camera! The racing game sounds very interesting!

    That should be fixed now, check the script in pastebin (I'll update the demos later today). Let me know how it works. :)
     
    #3
  4. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,071
    Likes Received:
    10,705
    First Language:
    English
    Primarily Uses:
    RMVXA
    Using this script I have got a smooth pan starting and ending with a diagonal movement instead of being stuck with the default right-angled movement only.  Which is great.  It also solves a problem I have on one map where a pan to a particular point has to happen, but the player might be crossing the 'trigger' line via one of several tiles.  Now it doesn't matter that I can't predict which tile it will be, the camera goes where I want it to and then returns to wherever the player happens to be.  Perfect!  So thanks for that.

    I do notice one thing, however.  If the player walks straight up and is stopped by e.g. the map edge, it is noticeable that the camera is fractionally behind the player, as it continues to move for a moment or two after the player has stopped.  I thought I needed to tweak the Deceleration Value (and, btw, the header says the default is 22, whereas in the script itself it is 38), but that doesn't seem to do it.  I dropped it down to 18 with no difference that I could see.  The distance walked is about 15 tiles, so there is enough time for the camera to fall behind.  It's not noticeable if it's just a few tiles.  What should I adjust?

    Thanks.
     
    #4
  5. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    I'm not sure if I understand what you mean, but try lowering even more the Deceleration Value (try 8?). Or maybe you want the camera to follow the player/events like it does in vanilla Ace, without deceleration?
     
    #5
  6. Kes

    Kes Global Moderators Global Mod

    Messages:
    21,071
    Likes Received:
    10,705
    First Language:
    English
    Primarily Uses:
    RMVXA
    Lowering the deceleration value even further worked.  The problem with the slight camera lag is that I have autodash enabled as the default and if the player is moving around obstacles at some speed in an otherwise open area (e.g. avoiding a statue on a large floor) or suddenly changing direction, there was a slight feeling of sea-sickness after a while.  It may be that my eyes are more vulnerable to seeing this effect than others' so that it's only a problem for me personally.

    Anyway, thanks, it's now sorted.  Great script - I've re-written a previously static cut scene to take advantage of the capabilities I now have.
     
    #6
  7. Sixth

    Sixth Veteran Veteran

    Messages:
    2,132
    Likes Received:
    801
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Thanks for the fix, it works! :)


    But just now, I encountered another issue...


    The animations won't follow the player/events correctly.


    For example, I put an animation to be shown on the player after every second (plus the animation time), and the player can still move freely, but when he moves, the animation gets away from the player too quickly. The longer the player moves in a direction, the further the animation will get from the source (from the player in this case).


    Same happens when the animation targets an event.


    The moment the camera starts moving, the animation position breaks.


    I guess the animations are not synchronized with the new camera movement.


    I hope you can fix this too! *-*
     
    #7
  8. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    Awesome! And I'm glad you like it. I look forward to watching that cutscene :D

    Hello Sixth! could you make a demo (blank project + animations + Enhanced Camera) showcasing the problem? I tested the animations and I don't find anything wrong with their display, maybe I am overlooking something. Thanks.
     
    #8
  9. Sixth

    Sixth Veteran Veteran

    Messages:
    2,132
    Likes Received:
    801
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    It seems to be a script conflict, because it won't happen in a new project.


    I will try to find the script which causes it now. It can take a while, I got many custom scripts installed.
     
    #9
  10. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    Oh, try to look for the ones that may do something to animations directly first (I think I saw a script by Victor that did something to animations). Let me know when you find it and I'll make a compatibility patch :)
     
    #10
  11. Sixth

    Sixth Veteran Veteran

    Messages:
    2,132
    Likes Received:
    801
    First Language:
    Hungarian
    Primarily Uses:
    RMVXA
    Found the culprit!

    It was this piece of code in Blackmourning's Base script:

    class Sprite_Character < Sprite_Base #-------------------------------------------------------------------------- # * Alias: Location updates #-------------------------------------------------------------------------- alias :bm_base_up :update_position def update_position move_animation(@character.screen_x - x, @character.screen_y - y) bm_base_up end #-------------------------------------------------------------------------- # * Overwrite: Moving animation #-------------------------------------------------------------------------- def move_animation(dx, dy) if @animation && @animation.position != 3 @ani_ox += dx @ani_oy += dy @ani_sprites.each do |sprite| sprite.x += dx sprite.y += dy end end endend
    I have no idea why did Blackmourning do this though...

    So far, nothing wrong happens if I just comment out these lines.
     
    #11
  12. deathsia

    deathsia Pegisister Veteran

    Messages:
    618
    Likes Received:
    52
    First Language:
    English
    I do believe I've found a bug. I don't think your camera script is compatible with paralax maps. When tested on a base tile map it runs perfectly but when I attempt to load a paralax map with no tiles on it, it freezes half way through the evented scroll I have in place.
     
    #12
  13. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    Hello! It's probably an incompatibility. What script are you using to make the parallax maps? Can you make a demo with the parallax maps, the events and Enhanced Camera for me to see the problem?
     
    #13
  14. deathsia

    deathsia Pegisister Veteran

    Messages:
    618
    Likes Received:
    52
    First Language:
    English
    It turned out the freezing was due to the lune anti-lag script but then I hit another problem.

    Objects that weren't apart of the parallax map floated along as if they were...idk FLOATING!

    And in regards to making a demo....

    ugh... I HATE making demos since my game has so many things set up and most of these things depend on each other, this makes making a small demo extremely annoying and tedious because I have to go through and try to determine what is needed and what isn't. The last demo I made errored right and left and the scripter couldn't figure out the problem because it kept erroring before they could even find the problem with their script.

    I'll try but....UGH!
     
    #14
  15. fragmentedbergyo

    fragmentedbergyo Villager Member

    Messages:
    28
    Likes Received:
    2
    Greetings, I discovered an incompatibility with MGC's Map Zoom script. Both scripts could do wonders in conjunction and I'd just like to inquire if you fine folks would be interested in checking it out if I were to link an example project.
    Basically, what happens - the map gets centered and borders are black. I tried to pinpoint the incompatibility, and suspected changes in the Game_Map class, but apparently the issue lies somewhere else.

    Thank you for your time.
     
    #15
  16. Awl_ii

    Awl_ii Villager Member

    Messages:
    20
    Likes Received:
    3
    First Language:
    English
    Great script!

    One issue I have to mention before I head out to class is that it seems to offset events a little. This is only noticable if you're using events as a third layer. I have included an image detailing the problem, but I should mention I also have a bunch of other scripts running in the game and haven't tested this script on a vanilla project yet.

    Other than that (if it isn't an exclusive issue on my end,) this script is PERFECT!

    OffsetExample.png
     
    Last edited by a moderator: Jan 27, 2015
    #16
  17. Korten12

    Korten12 Working on, The Border. :) Veteran

    Messages:
    175
    Likes Received:
    22
    First Language:
    English
    Same, I love the script but now all of the events I use to overlay tilesets are off base. :(
     
    #17
  18. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    Updated to 1.0.2! Camera will now behave like default when strength is set to 1.

    Be sure to grab the latest version from pastebin.

    I'll take a look at it as soon as I have free time. 

    Hello! Thank you both for your comments. The problem you report dissappears if you use the Event Jitter Fix (which I think it is included in the latest versions from Ace, but here's the link http://forums.rpgmakerweb.com/index.php?/topic/17448-event-jitter-fix-display-rounding-error-fix/ ).

    If the Event Jitter Fix is on your game and the problem persists, let me know.
     
    #18
  19. juggsywuggsy

    juggsywuggsy Warper Member

    Messages:
    3
    Likes Received:
    1
    Absolutely stunning! Great job.
     
    #19
  20. ♥SOURCE♥

    ♥SOURCE♥ Too sexy for your party. Member

    Messages:
    693
    Likes Received:
    410
    Thank you very much!
     
    #20

Share This Page