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.

Problem with the BS

Change the src_rect. In Spriteset_Battle, find this line:
Code:
@battleback_sprite.src_rect.set(0, 0, 640, 320)
And replace it with this line:
Code:
@battleback_sprite.src_rect.set(0, 0, 640, 480)
 

.rhap

Member

hmn, thanks, but... its strange, if it put in an lower value than 320 the black area gets bigger, but if i put in an higher value, it wont get smaller .___."
 
Add this below Scene_Debug

Code:
class Spriteset_Battle
  def initialize
    # Make viewports
    @viewport1 = Viewport.new(0, 0, 640, 480)
    @viewport2 = Viewport.new(0, 0, 640, 480)
    @viewport3 = Viewport.new(0, 0, 640, 480)
    @viewport4 = Viewport.new(0, 0, 640, 480)
    @viewport2.z = 101
    @viewport3.z = 200
    @viewport4.z = 5000
    # Make battleback sprite
    @battleback_sprite = Sprite.new(@viewport1)
    # Make enemy sprites
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
    # Make actor sprites
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    @actor_sprites.push(Sprite_Battler.new(@viewport2))
    # Make weather
    @weather = RPG::Weather.new(@viewport1)
    # Make picture sprites
    @picture_sprites = []
    for i in 51..100
      @picture_sprites.push(Sprite_Picture.new(@viewport3,
        $game_screen.pictures[i]))
    end
    # Make timer sprite
    @timer_sprite = Sprite_Timer.new
    # Frame update
    update
  end
  
  def update
    # Update actor sprite contents (corresponds with actor switching)
    for i in 0...$game_party.actors.size
      @actor_sprites[i].battler = $game_party.actors[i]
    end
    # If battleback file name is different from current one
    if @battleback_name != $game_temp.battleback_name
      @battleback_name = $game_temp.battleback_name
      if @battleback_sprite.bitmap != nil
        @battleback_sprite.bitmap.dispose
      end
      @battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
      @battleback_sprite.src_rect.set(0, 0, 640, 480)
      if @battleback_sprite.bitmap.height == 320
        @battleback_sprite.zoom_x = 1.5
        @battleback_sprite.zoom_y = 1.5
        @battleback_sprite.x = 320
        @battleback_sprite.y = 480
        @battleback_sprite.ox = @battleback_sprite.bitmap.width / 2
        @battleback_sprite.oy = @battleback_sprite.bitmap.height
      else
        @battleback_sprite.x = 0
        @battleback_sprite.y = 0
        @battleback_sprite.ox = 0
        @battleback_sprite.oy = 0
        @battleback_sprite.zoom_x = 1
        @battleback_sprite.zoom_y = 1
      end
    end
    # Update battler sprites
    for sprite in @enemy_sprites + @actor_sprites
      sprite.update
    end
    # Update weather graphic
    @weather.type = $game_screen.weather_type
    @weather.max = $game_screen.weather_max
    @weather.update
    # Update picture sprites
    for sprite in @picture_sprites
      sprite.update
    end
    # Update timer sprite
    @timer_sprite.update
    # Set screen color tone and shake position
    @viewport1.tone = $game_screen.tone
    @viewport1.ox = $game_screen.shake
    # Set screen flash color
    @viewport4.color = $game_screen.flash_color
    # Update viewports
    @viewport1.update
    @viewport2.update
    @viewport4.update
  end
end
 
.rhap said:
hmn, thanks, but... its strange, if it put in an lower value than 320 the black area gets bigger, but if i put in an higher value, it wont get smaller .___."
That's because of the size of the background picture. If you imported a 640 by 480 picture, it would work.
 

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