Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Where to edit?

Where and how do I edit the scripts so that:

-The "center" of the screen is a different spot (where the player is)
-The map scrolls after a different number of tiles
 
In Game_Player, first up change:
Code:
  CENTER_X = (320 - 16) * 4
  CENTER_Y = (240 - 16) * 4
to
Code:
  CENTER_X = (128 - 16) * 4
  CENTER_Y = (96 - 16) * 4

then further down where it says:
Code:
    max_x = ($game_map.width - 20) * 128
    max_y = ($game_map.height - 15) * 128
replace it with:
Code:
    max_x = ($game_map.width - 8) * 128
    max_y = ($game_map.height - 6) * 128

and hopefully that should do it :P
 
Code:
  def scroll_right(distance)
    @display_x = [@display_x + distance, (self.width - 20) * 128].min
  end

and

Code:
  def scroll_down(distance)
    @display_y = [@display_y + distance, (self.height - 15) * 128].min
  end

of Game_Map. Change them to these:

Code:
  def scroll_right(distance)
    @display_x = [@display_x + distance, (self.width - 8) * 128].min
  end

Code:
  def scroll_down(distance)
    @display_y = [@display_y + distance, (self.height - 6) * 128].min
  end

You should need to do what Dirtie already said, as well. None of this should interfere with the SDK.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top