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.

[Resolved] Problem about not-smooth text

Status
Not open for further replies.
Hi!

I'm scripting a script to show text above event, but I got the problem that text is not so smooth.

http://i83.photobucket.com/albums/j295/ ... ierror.jpg[/img]

and this is my script:

Code:
class Sprite_Character < RPG::Sprite
  alias wor_sprcha_upd update
  # UPDATE
  def update
    wor_sprcha_upd
    if $game_switches[1] == true and @character.is_a?(Game_Event)
      if @name_sprite.nil?
      @name_sprite = Sprite.new
      @name_sprite.bitmap = Bitmap.new(@character.event.name.size * 14,40)
      @name_sprite.bitmap.font.size = 20
      end
      @name_sprite.x = self.x - (@name_sprite.bitmap.width / 2)
      @name_sprite.y = (self.y - @name_sprite.bitmap.height) - (self.bitmap.height / 4)
      @name_sprite.bitmap.draw_text(0,0,@name_sprite.bitmap.width,@name_sprite.bitmap.height,@character.event.name,1) unless @name_sprite.nil?
    end
  end
  # DISPOSE
  def dispose
    super
    if !@name_sprite.nil?
      @name_sprite.bitmap.dispose
      @name_sprite.dispose
    end
  end
  
end

class Game_Event
  attr_reader :event
end
You can try it by place it in main,

Is there any way to make the text more smooth?
Thanks in advance!  :smile:
 
Status
Not open for further replies.

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