VE - Pixel Movement


zQ6pp21.png


pixel-movement-name.png

​












This script allows to replace the tile based movement where the player walks a whole 32 pixel tile each step with one that he walks only 4 pixels. It also give a better collision system for events.

Download:
Victor Engine - Pixel Movement

Credits:
Author: Victor Sant

Terms of Use
Hey, this script works quite nicely with this project I'm working on! Quick question though because I'm not too sure of it yet but when you're setting up the collision size of the event, is the collision's point of origin at the center of the event or at the top left of it?
I'm really digging this Victor
@PK8

it's centered horizontally, and on the event foot. So the y is basically the height of the box.

Use this code i did to check the boxes.



Code:
if $imported[:ve_pixel_movement]

class Sprite_Character < Sprite_Base
  #--------------------------------------------------------------------------
  # * Definição de bitmap do tile
  #--------------------------------------------------------------------------
  alias :set_bitmap_ve_test :set_bitmap
  def set_bitmap
    set_bitmap_ve_test
    return if @character.follower?
    setup_rect_sprite(@character.bw * 32, @character.bh * 32)
  end

  alias :set_tile_bitmap_ve_test :set_tile_bitmap
  def set_tile_bitmap
    set_tile_bitmap_ve_test
    setup_rect_sprite(32, 32)
  end

  def setup_rect_sprite(w, h)
    @rect_sprite.dispose  if @rect_sprite
    @rect_sprite = Sprite_Base.new(self.viewport)
    @rect_sprite.bitmap = Bitmap.new(w, h)
    rect1 = Rect.new(0, 0, w, h)
    rect2 = Rect.new(1, 1, w - 2, h - 2)
    @rect_sprite.bitmap.fill_rect(rect1, Color.new(255, 64, 64, 255))
    @rect_sprite.bitmap.fill_rect(rect2, Color.new(255, 64, 64, 96))
  end


  alias :update_position_ve_test :update_position
  def update_position
    update_position_ve_test
    if @rect_sprite
	  @rect_sprite.x = @character.screen_x - @character.bw * 32 / 2
	  @rect_sprite.y = @character.screen_y - @character.bh * 32 + @character.shift_y
	  @rect_sprite.z = @character.screen_z + 1
    end
  end

  alias :dispose_ve_test :dispose
  def dispose
    @rect_sprite.dispose if @rect_sprite
    dispose_ve_test
  end
end

end
Thanks a bunch.

Hey, just got an idea for your script based on that. How about being able to set the collision size of the player, and the collision offset positioning of the player and the events?
I thought of adding a passability for the player, but it would cause some issues. Specially because the tile passability don't take in consideration players collision area. The collision offset fall on the same subject.

If i think a solution for that i might add.
So, in the events, when it has an event move 1 move 1, it only mobes 8 pixels rather then 2 boxes?
So, in the events, when it has an event move 1 move 1, it only mobes 8 pixels rather then 2 boxes?
Yes and no.Although every step is 4 pixel. Every move command for events gives a pre-set number of steps. So, unless you change the default move steps as stated on the instructions, 2 movements will move 2 tiles, because each move will give 8 steps.
zQ6pp21.png


pixel-movement-name.png





This script allows to replace the tile based movement where the player walks a whole 32 pixel tile each step with one that he walks only 4 pixels. It also give a better collision system for events.

Download:

Victor Engine - Pixel Movement

Credits:

Author: Victor Sant

Terms of Use
Victor, is it possible to change the number of pixels my character walks with each move? Right now it is 4 pixels by default, can I change this? There is a "move steps" command in the discription which I thought serves this purpose, but I couldn't get it to work.
Victor, is it possible to change the number of pixels my character walks with each move? Right now it is 4 pixels by default, can I change this? There is a "move steps" command in the discription which I thought serves this purpose, but I couldn't get it to work.
The move steps allows the character to move more than 4 pixels. so with move steps 3 the character will move 12 pixels. You can't change it a lower number than 4 though.
The move steps allows the character to move more than 4 pixels. so with move steps 3 the character will move 12 pixels. You can't change it a lower number than 4 though.
Ok, thanks. 
@Victor Santafter i put this script my actor cant go through the doors.
@Victor Santafter i put this script my actor cant go through the doors.

Text from the script instructions:

Code:
#  Events over blocked tiles will not start properly unless the event have
#  the tag <over tile>
Text from the script instructions:



#  Events over blocked tiles will not start properly unless the event have
#  the tag <over tile>

i am sorry i must be misunderstanding, you mean putting # tag in the beginning of the event? (As comment or just text?)
HI!!
I love it, but is there a way to make it JUST work for the Player? I mean like that the player can walk in pixels but the events can't, and the events work like before.
It's because I am makin' a game in which the events bug when they walk with this script ON, and I would like to make the script totally just work for the player, is it possible?

Original thread: https://forums.rpgmakerweb.com/threads/ve-pixel-movement.2878/