[XP][VXA] Drago Pixel Movement

Started by LiTTleDRAgo, May 07, 2013, 11:53:36 am

Previous topic - Next topic

LiTTleDRAgo

Script updated (XP Version)
Now no issue for event triggers.

@Kise, if you redownload the script, please remove the event addon, as it also included in the new script.

Zexion

Drago i'm also using it and i noticed that there are some issues with player touch aswell.
The event in question.
Spoiler: ShowHide

I'm trying to just have the player move with direction fix here but it seems to work sometimes and other times i can just walk over it and nothing happens.

LiTTleDRAgo

July 09, 2017, 10:57:07 pm #22 Last Edit: July 10, 2017, 01:04:53 am by LiTTleDRAgo
Quote from: Zexion on July 09, 2017, 09:10:45 pm
Drago i'm also using it and i noticed that there are some issues with player touch aswell.
The event in question.

I'm trying to just have the player move with direction fix here but it seems to work sometimes and other times i can just walk over it and nothing happens.


For your problem, the reason is this line :


  #--------------------------------------------------------------------------
  # * Pixel Disable
  #--------------------------------------------------------------------------
  def pixel_disable?
    return true unless self.pixel_movement 
    return true if @move_route_forcing # <<<<<<<
    return false
  end


That line disabling pixel movement when you use move route command.
Since your move route is just turn_up without any movement, it turned weird.

Solution :
1. Comment that line in the script, that means player will walk half a tile regardless in move route or not.
You probably need to readjust your entire move route event.
2. Add $game_player.pixel_movement = false before move route command and then enable it again later.
3. Use script command instead move route command, that way you didn't have to disable pixel movement.
Spoiler: ShowHide


Btw script reuploaded to 1.11.
- Better coding.

Zexion

Ahh that explains it, I'll be going with the 3rd option because it seems like the best work around for this case. Thanks for the quick reply drago!

LiTTleDRAgo

Oh sorry, there are no 4.

4. Change that line in the script to:
    return true if @move_route_forcing && @move_route.list.any? {|s| (1..14).include?(s.code)}
This way, the pixel movement will be disabled only if there are movement command in move route.

Spoiler: ShowHide


The script is updated again.

Zexion


Kise

I've found two bugs with latest version. First one - I can't enable pixel movement for events because game throws NoMethodOccured while running script, undefined method '[]' for nil:NilClass.

The second one I captured on video, the script creates too early side movement or even makes it impossible to take a step forwad - one tile around any event. It's difficult for me to describe, so take a look at the video - https://youtu.be/uisJ8ROQY1I ( At the beginning I can't go forward, when it should be possible )

LiTTleDRAgo

July 14, 2017, 12:07:48 pm #27 Last Edit: July 17, 2017, 03:05:16 am by LiTTleDRAgo
For first problem, sorry it's my error. It should be $game_map.events[EVENT_ID].pixel_movement = true / false
Or if you using script command, you can use get_character(ID).pixel_movement = true / false
While ID is :
  • -1 (player),
  • 0 (self event),
  • 1.. (event with that ID)



For the second one I also noticed that, however I postponed it since to fix that bug, I need to recalculate everything again.
I'm sorry, I haven't got enough time right now, but I'll try to fix it later.

LiTTleDRAgo

July 15, 2017, 06:43:50 am #28 Last Edit: July 17, 2017, 03:03:00 am by LiTTleDRAgo
ver 1.12b : *deleted*

Kise

July 16, 2017, 11:37:52 am #29 Last Edit: July 16, 2017, 01:23:02 pm by Kise
Thanks! I had to comment out sixth line to get it working ( it caused game to crash ). I tested it for a bit and didn't found any major problems so far.
I somehow managed to get on top of non-through event twice, but I'm not sure how I did it - just wanted to let you know about it.

Zexion

July 16, 2017, 04:33:56 pm #30 Last Edit: July 16, 2017, 05:04:52 pm by Zexion
The bug occurs by standing on the "second half" of the tile. Usually each step is about half a tile with pixel movement on, if you step only once and an event is walking to that square, they will ignore your collision. Also if the event is moving and you move at the same time it seems to cause the same problem. Honestly it doesn't bother me.

LiTTleDRAgo

July 16, 2017, 07:40:38 pm #31 Last Edit: July 17, 2017, 08:54:33 am by LiTTleDRAgo
ver 1.12c : *deleted*

Oh well, I had to overwrite passable? method this time....

Spoiler: ShowHide

  #--------------------------------------------------------------------------
  # * Overwriten method: passable?
  #--------------------------------------------------------------------------
  def passable?(x, y, d)
    new_x = x_with_direction(x,d) # new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)
    new_y = y_with_direction(y,d) # new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)
    return false unless $game_map.valid?(new_x, new_y)
    return true if @through
    return false unless $game_map.passable?(x, y, d, self)
    return false unless $game_map.passable?(new_x, new_y, 10 - d)
    for event in $game_map.events.values
      #----------------------------------------------------------
      if ((event.x + event.revise_x) - new_x).abs < 1 and
        ((event.y + event.revise_y) - new_y).abs < 1
        unless event.through || (self == event)
      #----------------------------------------------------------
          return false if self != $game_player
          return false if event.character_name != ""
        end
      end
    end
    #----------------------------------------------------------
    if self != (pl = $game_player) && ((pl.x + pl.revise_x) - new_x).abs < 1 &&
      ((pl.y + pl.revise_y) - new_y).abs < 1
    #----------------------------------------------------------
      return false if @character_name != "" && !$game_player.through
    end
    return true
  end


I already marked my change on passable? method.
If you have other scripts that aliases / overwrite that method, you should know what to do.

Zexion

Thanks again. take another level+ lol

LiTTleDRAgo


schmoggi

July 17, 2017, 06:20:59 am #34 Last Edit: July 17, 2017, 06:56:40 am by schmoggi
Helloo,

thank you very much for your effort LittleDrago! I love 16px Tile Movement, specially for Games with Zelda Style Battle Systems (ABS). It doesn't feel blocky  like with the original 32px Movement and personally, i don't see the need for pixel Movement, not to mention that the need for collision maps is often present when using it. I've got one Question:

Is there a possibility, this Script can be made compatible with Heretics Modular Passable Script? I already made some Request one Year ago but sadly, didn't get an answer :/. Here is the Link
http://forum.chaos-project.com/index.php/topic,15436.0.html
Forget the mentioned Script in there, your Script is looking much better.

EDIT:
Woah .. i just thought "well, why not just test it anyway?". Guess what, i did not get any Errors *o*. It works pretty well actually, at least what i tested so far, i can't believe it. You are god.
Finally, it seems i can have 16px Movement and all the Advantages of Heretics Collection afterall!
Only the Moving Plattforms Script is buggy, but that was predictable. An easy Workaround would be, disable pixel Movement when entering/leaving a Plattform. Of course 16px Movement on a Plattform would be Cherry on the Cake!


greetz

LiTTleDRAgo

I tried the script in clean project and have no problem with my pixel movement.
But I don't mind adjusting a little bit.

Update 1.15 (link same as post above).
Just put my pixel movement below modular passable script.

LiTTleDRAgo

July 17, 2017, 07:38:32 pm #36 Last Edit: July 19, 2017, 02:22:46 am by LiTTleDRAgo
I'll update pastebin later (after I fix new version).

Not recommended to use this:
Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
# DRG - Pixel Movement
# Version: 1.15b
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:
($imported ||= {})[:drg_pixel_movement] = 1.15
#==============================================================================
#
# Introduction :
#
#   This script makes player's movement became pixel movement.
#   Event pixel movement turned off by default.
#
#   To activate / deactivate pixel movement
#   - $game_player.pixel_movement               = true / false
#   - $game_map.events[EVENT_ID].pixel_movement = true / false
#
#   If used in Script call
#   - get_character(ID).pixel_movement = true / false
#   where ID : -1 (player),
#               0 (self event),
#               1.. (event ID)
#
#==============================================================================
#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :pixel_movement, :direction_fix
  attr_writer   :revise_x,       :revise_y
  #--------------------------------------------------------------------------
  # * Others
  #--------------------------------------------------------------------------
  define_method(:x_with_direction)  {|x, d| x + (d==6 ?   1 : d==4 ?   -1 : 0)}
  define_method(:y_with_direction)  {|y, d| y + (d==2 ?   1 : d==8 ?   -1 : 0)}
  define_method(:x_pixel_direction) {|x, d| x + (d==6 ? 0.5 : d==4 ? -0.5 : 0)}
  define_method(:y_pixel_direction) {|y, d| y + (d==2 ? 0.5 : d==8 ? -0.5 : 0)}
  define_method(:revise_x)          { pixel_disable? ? 0    : @revise_x ||= 0 }
  define_method(:revise_y)          { pixel_disable? ? 0    : @revise_y ||= 0 }
  #--------------------------------------------------------------------------
  # * Constant
  #--------------------------------------------------------------------------
  ALIASING_PIXEL = lambda do |x|
    [:move_down,:move_left,:move_right,:move_up, :move_lower_left,
    :move_lower_right,:move_upper_left,:move_upper_right].each do |meth|
      $@ || alias_method(:"#{meth}_unpixel_#{x}", :"#{meth}")
      define_method(:"#{meth}") do |*args|
        respond_to?(:"#{meth}_pixel") && !pixel_disable? ?
        send(:"#{meth}_pixel",*args) :
        reset_pixel && send(:"#{meth}_unpixel_#{x}",*args)
      end
    end
  end 
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  $@ || alias_method(:update_move_unpixel, :update_move)
  $@ || alias_method(:moving_unpixel,      :moving?)
  $@ || alias_method(:passable_unpixel,    :passable?)
  #--------------------------------------------------------------------------
  # * Aliased method: passable_conditions?
  #--------------------------------------------------------------------------
  if method_defined?(:passable_conditions?)
    $@ || alias_method(:passable_conditions_unpixel,   :"passable_conditions?")
    def passable_conditions?(x, y, d, new_x, new_y, event, *args)
      result = passable_conditions_unpixel(x, y, d, new_x, new_y, event, *args)
      unless result
        if ((event.x + event.revise_x) - new_x).abs < 1 and
            ((event.y + event.revise_y) - new_y).abs < 1 and
              not event.through and event != self
          return true
        end
      end
      return result
    end
  #--------------------------------------------------------------------------
  # * Aliased method: player_conditions?
  #--------------------------------------------------------------------------
    $@ || alias_method(:player_conditions_unpixel,   :"player_conditions?")
    def player_conditions?(x, y, d, *args)
      result = player_conditions_unpixel(x, y, d, *args)
      return true unless result || player_collition_passable?(x,y,d)
      return result
    end 
  end
  #--------------------------------------------------------------------------
  # * Aliased method: passable?
  #--------------------------------------------------------------------------
  def passable?(x, y, d)
    result = passable_unpixel(x, y, d)
    unless @through || !result 
      return false unless pixel_disable? || passable_pixel?(x, y, d)
    end
    return result
  end
  #--------------------------------------------------------------------------
  # * Passable Pixel
  #--------------------------------------------------------------------------
  def passable_pixel?(x, y, d)
    return tile_collition_passable?(x, y, d) if $Modular_Passable
    event_collition_passable?(x, y, d) &&
    player_collition_passable?(x, y, d) &&
    tile_collition_passable?(x, y, d)
  end
  #--------------------------------------------------------------------------
  # * Determine if Collided with Events
  #--------------------------------------------------------------------------
  def event_collition_passable?(x, y, d)
    unless @through
      new_x = x_with_direction(x, d)
      new_y = y_with_direction(y, d)
      for event in $game_map.events.values
        #----------------------------------------------------------
        unless event.through || (self == event)
          if ((event.x + event.revise_x) - new_x).abs < 1 and
            ((event.y + event.revise_y) - new_y).abs < 1
        #----------------------------------------------------------
            return false if self != $game_player
            return false if event.character_name != ""
          end
        end
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Determine if Collided with Player
  #--------------------------------------------------------------------------
  def player_collition_passable?(x,y,d)
    unless self == (pl = $game_player) || @through
      new_x = x_with_direction(x,d)
      new_y = y_with_direction(y,d)
      #----------------------------------------------------------
      if @character_name != "" && !pl.through &&
        ((pl.x + pl.revise_x) - new_x).abs < 1 &&
        ((pl.y + pl.revise_y) - new_y).abs < 1
      #----------------------------------------------------------
        return false
      end
    end
    return true
  end
  #--------------------------------------------------------------------------
  # * Determine if Collided with Tile
  #--------------------------------------------------------------------------
  def tile_collition_passable?(x, y, d)
    nx = x_with_direction(x, d)
    ny = y_with_direction(y, d)
    if ((d == 2 || d == 8) && revise_x % 1 != 0)
      unless $game_map.passable_pixel?((nx+revise_x).floor, ny, d)
        return !(@revise_x = 0)
      end
      unless $game_map.passable_pixel?((nx+revise_x).ceil, ny, d)
        return false
      end
    end
    if ((d == 4 || d == 6) && revise_y % 1 != 0)
      unless $game_map.passable_pixel?(nx, (ny+revise_y).floor, d)
        return !(@revise_y = 0)
      end
      unless $game_map.passable_pixel?(nx, (ny+revise_y).ceil, d)
        return false
      end
    end
    return true
  end 
  #--------------------------------------------------------------------------
  # * Aliased method: update_move
  #--------------------------------------------------------------------------
  def update_move
    if pixel_disable?
      reset_pixel && update_move_unpixel
    else
      distance = 2 ** @move_speed
      _x,_y = (@x + revise_x), (@y + revise_y)
      @real_y = [@real_y + distance, _y * 128].min if _y * 128 > @real_y
      @real_x = [@real_x - distance, _x * 128].max if _x * 128 < @real_x
      @real_x = [@real_x + distance, _x * 128].min if _x * 128 > @real_x
      @real_y = [@real_y - distance, _y * 128].max if _y * 128 < @real_y
      @anime_count += @walk_anime ? 1.5 : @step_anime ? 1 : 0
    end
  end
  #--------------------------------------------------------------------------
  # * Aliased method: moving?
  #--------------------------------------------------------------------------
  def moving?
    if pixel_disable?
      moving_unpixel
    else
      (@real_x != (@x + revise_x) * 128 || @real_y != (@y + revise_y) * 128)
    end
  end
  #--------------------------------------------------------------------------
  # * xy_pixel_correction
  #--------------------------------------------------------------------------
  def xy_pixel_correction(direction)
    _x, _y = (@x + revise_x), (@y + revise_y)
    case direction
    when 2
      if revise_x % 1 != 0
        unless passable?(_x.ceil,_y.floor, 2) or passable?(_x.ceil,_y.ceil, 2)
          if passable?(_x.floor,_y.floor, 2) or passable?(_x.floor,_y.ceil, 2)
            @revise_x = (_x = (@x += revise_x.floor)) * 0
          end
        end
      end
      if revise_x % 1 != 0
        unless passable?(_x.floor,_y.floor, 2) or passable?(_x.floor,_y.ceil, 2)
          if passable?(_x.ceil,_y.floor, 2) or  passable?(_x.ceil,_y.ceil, 2)
            @revise_x = (_x = (@x += revise_x.ceil)) * 0   
          end
        end
      end
    when 4
      if revise_y % 1 != 0
        unless passable?(_x.ceil,_y.ceil, 4) or passable?(_x.floor,_y.ceil, 4)
          if passable?(_x.ceil,_y.floor, 4) or passable?(_x.floor,_y.floor, 4)
            @revise_y = (_y = (@y += revise_y.floor)) * 0
          end
        end
      end
      if revise_y % 1 != 0
        unless passable?(_x.ceil,_y.floor, 4) or passable?(_x.floor,_y.floor, 4)
          if passable?(_x.ceil,_y.ceil, 4) or passable?(_x.floor,_y.ceil, 4)
            @revise_y = (_y = (@y += revise_y.ceil)) * 0
          end
        end
      end
    when 6
      if revise_y % 1 != 0
        unless passable?(_x.floor,_y.ceil, 6) or passable?(_x.ceil,_y.ceil, 6)
          if passable?(_x.floor,_y.floor, 6) or passable?(_x.ceil,_y.floor, 6)
            @revise_y = (_y = (@y += revise_y.floor)) * 0
          end
        end
      end
      if revise_y % 1 != 0
        unless passable?(_x.floor,_y.floor, 6) or passable?(_x.ceil,_y.floor, 6)
          if passable?(_x.floor,_y.ceil, 6) or passable?(_x.ceil,_y.ceil, 6)
            @revise_y = (_y = (@y += revise_y.ceil)) * 0
          end
        end
      end
    when 8
      if revise_x % 1 != 0
        unless passable?(_x.ceil,_y.ceil, 8) or passable?(_x.ceil,_y.floor, 8)
          if passable?(_x.floor,_y.ceil, 8) or passable?(_x.floor,_y.floor, 8)
            @revise_x = (_x = (@x += revise_x.floor)) * 0
          end
        end
      end
      if revise_x % 1 != 0
        unless passable?(_x.floor,_y.ceil, 8) or passable?(_x.floor,_y.floor, 8)
          if passable?(_x.ceil,_y.ceil, 8) or passable?(_x.ceil,_y.floor, 8)
            @revise_x = (_x = (@x += revise_x.ceil)) * 0
          end
        end
      end
    end 
    direction
  end
  #--------------------------------------------------------------------------
  # * add_revise_coord
  #--------------------------------------------------------------------------
  def add_revise_coord
    @revise_x % 1 == 0 && @revise_x = (@x += @revise_x.round) * 0
    @revise_y % 1 == 0 && @revise_y = (@y += @revise_y.round) * 0
  end
  #--------------------------------------------------------------------------
  # * Pixel Disable
  #--------------------------------------------------------------------------
  def pixel_disable?
    return true unless self.pixel_movement 
    return true if @move_route_forcing && @move_route.list.any? do |s|
      (1..14).include?(s.code)
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * reset_pixel
  #--------------------------------------------------------------------------
  def reset_pixel
    return 0 if (@revise_x ||= 0) == 0 && (@revise_y ||= 0) == 0
    xy_pixel_correction(@direction)
    @revise_x = (@x += revise_x.floor) * 0
    @revise_y = (@y += revise_y.floor) * 0
  end
  #--------------------------------------------------------------------------
  # * Move Down
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_down_pixel(turn_enabled = true)
    @quarter = false
    turn_enabled && turn_down
    if passable?(@x, ((@y + revise_y).floor), xy_pixel_correction(2)) or
       passable?(@x, ((@y + revise_y).ceil), 2)
      turn_down
      @revise_y = y_pixel_direction(@revise_y,2)
      add_revise_coord
      increase_steps
    else
      @revise_y = revise_y.ceil
      add_revise_coord
      check_event_trigger_touch(@x, y_with_direction(@y,2))
    end
  end
  #--------------------------------------------------------------------------
  # * Move Left
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_left_pixel(turn_enabled = true)
    @quarter = false
    turn_enabled && turn_left
    if passable?((@x + revise_x).ceil, @y, xy_pixel_correction(4)) or
       passable?((@x + revise_x).floor, @y, 4)
      turn_left
      @revise_x = x_pixel_direction(@revise_x,4)
      add_revise_coord
      increase_steps
    else
      @revise_x = @revise_x.floor
      add_revise_coord
      check_event_trigger_touch(x_with_direction(@x,4), @y)
    end
  end
  #--------------------------------------------------------------------------
  # * Move Right
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_right_pixel(turn_enabled = true)
    @quarter = false
    turn_enabled && turn_right
    if passable?((@x + revise_x).floor, @y, xy_pixel_correction(6)) or
       passable?((@x + revise_x).ceil, @y, 6)
      turn_right
      @revise_x = x_pixel_direction(@revise_x,6)
      add_revise_coord
      increase_steps
    else
      @revise_x = @revise_x.ceil
      add_revise_coord
      check_event_trigger_touch(x_with_direction(@x,6), @y)
    end
  end
  #--------------------------------------------------------------------------
  # * Move up
  #     turn_enabled : a flag permits direction change on that spot
  #--------------------------------------------------------------------------
  def move_up_pixel(turn_enabled = true)
    @quarter = false
    turn_enabled && turn_up
    if passable?(@x, (@y + revise_y).ceil, xy_pixel_correction(8)) or
       passable?(@x, (@y + revise_y).floor, 8)
      turn_up
      @revise_y = y_pixel_direction(@revise_y, 8)
      add_revise_coord
      increase_steps
    else
      @revise_y = revise_y.floor
      add_revise_coord
      check_event_trigger_touch(@x, y_with_direction(@y,8))
    end
  end   
end

#==============================================================================
# ** Game_Player
#------------------------------------------------------------------------------
#  This class handles the player. Its functions include event starting
#  determinants and map scrolling. Refer to "$game_player" for the one
#  instance of this class.
#==============================================================================
class Game_Player
  #--------------------------------------------------------------------------
  # * Constant
  #--------------------------------------------------------------------------
  ALIASING_PIXEL.call(0)
  #--------------------------------------------------------------------------
  # * Alias Method
  #--------------------------------------------------------------------------
  $@ || alias_method(:pixel_initialize, :initialize)
  #--------------------------------------------------------------------------
  # * Pixel Movement
  #--------------------------------------------------------------------------
  def initialize(*args)
    pixel_initialize(*args)
    @pixel_movement = true
  end
end

#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
#  This class deals with events. It handles functions including event page
#  switching via condition determinants, and running parallel process events.
#  It's used within the Game_Map class.
#==============================================================================
class Game_Event
  #--------------------------------------------------------------------------
  # * Constant
  #--------------------------------------------------------------------------
  ALIASING_PIXEL.call(1)
  #--------------------------------------------------------------------------
  # * Alias Method
  #--------------------------------------------------------------------------
  $@ || alias_method(:pixel_initialize, :initialize)
  #--------------------------------------------------------------------------
  # * Pixel Movement
  #--------------------------------------------------------------------------
  def initialize(*args)
    pixel_initialize(*args)
    @pixel_movement = false
  end
end

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================
class Game_Map
  #--------------------------------------------------------------------------
  # * Tile not Passable
  #--------------------------------------------------------------------------
  unless method_defined?(:tile_not_passable?)
    def tile_not_passable?(x, y, d, bit, tile_id, self_event = nil, result = nil)
      return result if not result.nil?
      if tile_id == nil
        return true
      elsif @passages[tile_id] & bit != 0
        return true
      elsif @passages[tile_id] & 0x0f == 0x0f
        return true
      end
    end
  end 
  #--------------------------------------------------------------------------
  # * Tile Passable
  #--------------------------------------------------------------------------
  unless method_defined?(:tile_passable?)
    def tile_passable?(x, y, d, bit, tile_id, self_event=nil, result=nil)
      return result if not result.nil?
      if @priorities[tile_id] == 0
        return true
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Passable Pixel
  #--------------------------------------------------------------------------
  def passable_pixel?(x, y, d, self_event = nil)
    case d
    when 2, 8
      bit_ex = (1 << (4 / 2 - 1)) & 0x0f
      bit_ey = (1 << (6 / 2 - 1)) & 0x0f
    when 4, 6
      bit_ex = (1 << (2 / 2 - 1)) & 0x0f
      bit_ey = (1 << (8 / 2 - 1)) & 0x0f
    else
      return true
    end
    for event in $game_map.events.values
      if event.tile_id >= 0 and event != self_event and
        ((event.x + event.revise_x) - x).abs < 1 and
        ((event.y + event.revise_y) - y).abs < 1 and not event.through
        if tile_not_passable?(x, y, d, bit_ex, event.tile_id, self_event)||
           tile_not_passable?(x, y, d, bit_ey, event.tile_id, self_event)
          return false
        end
        if tile_passable?(x, y, d, bit_ex, event.tile_id, self_event)||
           tile_passable?(x, y, d, bit_ey, event.tile_id, self_event)
          return true
        end
      end
    end
    for i in [2, 1, 0]
      tile_id = data[x, y, i]
      if tile_not_passable?(x, y, d, bit_ex, tile_id, self_event) ||
        tile_not_passable?(x, y, d, bit_ey, tile_id, self_event)
        return false
      end
      if tile_passable?(x, y, d, bit_ex, tile_id, self_event) ||
        tile_passable?(x, y, d, bit_ey, tile_id, self_event)
        return true
      end
    end
    return true
  end
end



Unfortunately, to fix that I have to remove some step correction calculation.
You'll notice sometimes player will not dodge and stopped walking when faced unpassable tiles.

Kise

July 18, 2017, 04:34:20 am #37 Last Edit: July 18, 2017, 03:32:35 pm by Kise
Yeah, movement definitly feels less fluid and less intuitive with this version. Honestly, I'd rather disable passability on tiles like these, and stick to the previous version. There're not that many of them anyway.

@Edit - I noticed that player can't step into second half of the tile, if the next one is impassable - is it done on purpose? here's screenshot. https://image.ibb.co/iDfrFQ/bugornot.jpg

LiTTleDRAgo

Is that with new beta version or still previous version?

Kise

July 19, 2017, 02:53:04 am #39 Last Edit: July 19, 2017, 03:02:33 am by Kise
That happens on both versions.