Simple Verticle Scroller

Discussion in 'JS Plugin Requests' started by deveras111, Jul 6, 2019.

  1. deveras111

    deveras111 Veteran Veteran

    Messages:
    33
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMMV
    Hey all, I'm just looking for a plug in thats ganna allow me to scroll the map vetically forward, and I'm going to have the player avoid debri and enemies. Ideally I just need to be able to scroll the map forward, and be able to control how fast, as well as be able to stop it. I'm sure there is a way to do this by eventing but I have found nothing while researching, and God knows Im too dumb to figure it out. I am aware of Galv's space invader minigame but that is wayyy too complicated and it contains elements that I dont need. I just need the scrolling, this would include scrolling tiles on the map as likr I said, I want the player tp have to avoid obstacles.

    This is for rpg maker mv by the way.
     
    #1
  2. standardplayer

    standardplayer Keeper of Kitties Veteran

    Messages:
    203
    Likes Received:
    686
    First Language:
    English
    Primarily Uses:
    N/A
    There's an event command called scroll map. Set it up on a parallel process to move up the height of the map.

    Does this help?
     
    #2
  3. deveras111

    deveras111 Veteran Veteran

    Messages:
    33
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMMV
    So I actually wasn't aware of this :guffaw:
    But in trying it out it doesn't quite fit my need. Would there be any way to keep it from scrolling faster once the player gets too ahead, or killing the player if he goes off screen?
     
    #3
  4. standardplayer

    standardplayer Keeper of Kitties Veteran

    Messages:
    203
    Likes Received:
    686
    First Language:
    English
    Primarily Uses:
    N/A
    To be honest, I think you'd be more interested in Galv's Cam Control
    https://forums.rpgmakerweb.com/index.php?threads/galvs-cam-control.51656/

    There's no one way to handle this, so the Cam control isn't itself the answer to your question. It all comes down to what other factors you need other than just scrolling, like scrolling faster when the player gets ahead.

    I can't foresee you needing anything that a camera plugin won't handle.

    IIRC Galv's Cam Control allows you to pick coordinates as the focus for the cam.

    I would have a separate event that runs parallel to handle the camera.

    I'd likely have the camera move in increments.
    e.g. If player is less than three tiles from top of screen, increase speed of camera scroll
    else
    run at initial speed.

    Tell you what, take a look at that plugin, I think you're gonna like it and I think it's gonna help you.
    I'd need more specific info to tell you which of the several ways to pull this off is best for you, that's what it really comes down to.

    But that plugin is a much better alternative than regular old map scroll.


    EDIT: I'm gonna say this preemptively, but you're probably gonna need to be able to check your player's Y and possibly X coordinate at different points to address how the camera should be moving.
    Anywhere that a script box is available, such as on the 4th tab of the Conditional Branch event command, the following codes will return the player's current x and y
    $gamePlayer.x
    $gamePlayer.y
     
    #4
  5. deveras111

    deveras111 Veteran Veteran

    Messages:
    33
    Likes Received:
    4
    First Language:
    English
    Primarily Uses:
    RMMV
    So this does suit my fancy! However I'm wondering if this is the right way to go for my game. Is there perhaps a way to force the player to continually move forward? This might be a simpler way of keeping the map scrolling up. My player is going to be in a spaceship, navigating obstacles, so perhaps continous movement is the way to go. I've tried having a parallel process going moving the player up but that just disables movement. Could there be a plugin that keeps the player moving forward at a leisurely pace, while still allowing him/her to move quicker once a direction is pressed? (I have always dash enabled)
     
    #5
  6. standardplayer

    standardplayer Keeper of Kitties Veteran

    Messages:
    203
    Likes Received:
    686
    First Language:
    English
    Primarily Uses:
    N/A
    I don't know of any scripts like that, and I've been doing quite a bit of digging. I was able to get the map to scroll up and the player to stay with it, but only through using a Move Route. When you use that, you're keyboard input won't fully until the move route stops, even if you uncheck the 'wait for completion' box.

    FYI, I did this by having a separate parallel process that checks if -
    Math.floor($gamePlayer.screenX() / 48 >= 11)

    To explain, the screenX will give you a pixel location of where the player currently is on the screen, not the map. Since by default MV uses 48x48 tiles, dividing the screenX by 48 will return a more usable number. Furthermore, since there's a huge chance that the number returned will have a decimal, Math.floor will round it down to the nearest whole number.

    The result, however, was that the player moved continuously up, and my keyboard input wasn't really having much of an effect.

    I don't know if there will be a simple way to actually do a decent minigame like this through events.
    I'm not saying it isn't doable, but the route I would go would be more complex than probably using Galv's Space Invader minigame.

    Don't give up, though, either continue to reach out or consider something else other than a vertical scroller to add in to your game. I once made a simple first person shooter (obviously not 3d) using only events and Yanfly plugins. There is a lot you can do with RPG Maker, but some things are tougher than others.
     
    #6

Share This Page