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.

Making your character smaller?

Adkit

Member

This is either an extremely stupid question or an extremely hard one...

But how do you make your character say half the size of a normal character? For when you go out into a worldmap-screen and you want your guy to look tiny. I'm not sure how if it's possible, can you just reduce the size of the char-set in photoshop or is that no good? x.x
 
Insert this below Scene_Debug and above Main
Code:
class Game_Character

  attr_accessor :zoom

  alias_method :seph_simplezoom_gmchr_init, :initialize

  def initialize

    @zoom = 1.0

    seph_simplezoom_gmchr_init

  end

end

 

class Sprite_Character

  alias_method :seph_simplezoom_sprchr_update, :update

  def update

    seph_simplezoom_sprchr_update

    if @character != nil

      self.zoom_x = @character.zoom

      self.zoom_y = @character.zoom

    end

  end

end

To change the player's sprite size:
Code:
$game_player.zoom = n.n

To change events size:
Code:
$game_map.events[event_id].zoom = n.n

Replace n.n with a number such as 0.5, 1.5, etc.

1.0 is the default size
 

Adkit

Member

Doesn't work. :( Syntax error at line 5. I can only imagine it's because I'm using the pixlemovement script and that adds a different Game_Character than the default one and so on.

Is there some kind of quick way to fix that? Sorry if my hacking skillz don't heat the grillz.
 
Here's a quick and easy way:

Export the charset that you're using. Open it in your choice of paint program.

Resize it to half the size. Save under a different name.

Re-import it, and change the graphic at will. (You'll probably want to change the player's speed, too-- Speed 4 looks a lot faster with a tiny character.)

No scripting needed.
 
One thing to note - resizing can work, but if you have the spriting abilities, you might want to just find a cute little template (neoPKMN, Paradigm, etc) and sprite your character on that - that way you've still got good clean pixels, and a) smaller sprite, b) cute little overworld sprite clearly shows that the map is relative in size.
 

Adkit

Member

Unka Josh":2k8by6ho said:
Here's a quick and easy way:

Export the charset that you're using. Open it in your choice of paint program.

Resize it to half the size. Save under a different name.

Re-import it, and change the graphic at will. (You'll probably want to change the player's speed, too-- Speed 4 looks a lot faster with a tiny character.)

No scripting needed.

Gah, I didn't even know that was possible. x.x I thought the sprites HAD to be a certain size or something. It worked, thank you. :P
 
Stupid Game_Player. Not sure why that didn't work, but ok. lol

Try this:
Code:
class Game_Character

  attr_writer :zoom

  def zoom

    return @zoom.nil? ? 1.0 : @zoom

  end

end

 

class Sprite_Character

  alias_method :seph_simplezoom_sprchr_update, :update

  def update

    seph_simplezoom_sprchr_update

    if @character != nil

      self.zoom_x = @character.zoom

      self.zoom_y = @character.zoom

    end

  end

end

That should work fine. Don't go resizing your graphics. That's just silly.
 

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