• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Scrolling the screen more smoothly

  • 2
    Posts
    9
    Years
    • Seen Jan 31, 2020
    Hello,

    I am using RMXP Pokémon Essentials and I've encountered something I want to change. Namely, the scrolling seems to be a bit jittery. I don't think that the problem is framerate or lag, and can be exemplified by inserting the following code snippet into Scene_Map.main:

    pbSEPlay("Choose")
    $game_map.display_x+=2
    pbWait(20)

    What you'll observe is that the game only scrolls every other cycle, meaning the display only moves for quantities of 4 (which some of you undoubtedly knew already). I really want to change this to quantities of, say, 1 in order to get a smoother scrolling game. I realize this means moving a fraction of a pixel, which may be hard. Is this possible? I am willing to put some time into this if someone can point me in the right direction.

    Bonus problem:
    The same snippet also shows that when the player is in the vicinity of an event, both events will 'shake' --that is, they go to the left one pixel on the first cycle (when the screen doesn't scroll) and right one pixel on the next cycle (when the screen scrolls one pixel). This is evident when the player and event are diagonal to one another. I attribute this to a rounding error (since 2/4 = 0.5, something probably isn't rounding correctly), and so this matter isn't as pressing since I can probably solve it in time.
     
    Back
    Top