I've been playing around with Galv Visibility Range, and I found some weird glitch on his script.
My character jump off the screen and suddenly the visibility range gone just for a moment. At first I thought it was the glitch from the script itself, but I then I tried to reproduce the error and I succeed
The glitch is, when you have a sprite and a tilemap which has same viewport, if the sprite the value Y has less than zero, the sprite will gone completely. I can not easily noticable since you already know that most of Sprite_Character has the oy at the bottom of the sprite.
If you want to test, here is the test code I made
If you get rid the tilemap completely, the sprite will work just fine. Also if you assign a different viewport for tilemap, the sprite will have no issue as well. However, if both has same viewport, it would generate the said issue.
Is anyone aware of this?
To overcome this problem might simply assign a different viewport for the sprite, but it's not a neat solusion I guess. I hope the next generation of RGSS will fix the tilemap class better.
Thought?
My character jump off the screen and suddenly the visibility range gone just for a moment. At first I thought it was the glitch from the script itself, but I then I tried to reproduce the error and I succeed
The glitch is, when you have a sprite and a tilemap which has same viewport, if the sprite the value Y has less than zero, the sprite will gone completely. I can not easily noticable since you already know that most of Sprite_Character has the oy at the bottom of the sprite.
If you want to test, here is the test code I made
class Sprite_Test < Sprite def initialize(v) super(v) self.bitmap = Bitmap.new(450,450) bitmap.fill_rect(bitmap.rect, Color.new(0,0,0,120)) rect = Rect.new(width/2 - 100, height/2 - 100, 200, 200) bitmap.fill_rect(rect, Color.new(255,255,255,120)) self.ox = width/2 self.oy = height/2 self.x = Graphics.width/2 self.y = Graphics.height/2#~ self.zoom_x = self.zoom_y = 2.5 end def update super case Input.dir4 when 2 self.y += 5 when 4 self.x -= 5 when 6 self.x += 5 when 8 self.y -= 5 end end endDataManager.initdef updates Graphics.update Input.update @vport.update @vport2.update @spr.update @tile.updateend@vport = Viewport.new@vport2 = Viewport.new@vport.z = 50@spr = Sprite_Test.new(@vport)map = load_data(sprintf("Data/Map%03d.rvdata2", 1))@tile = Tilemap.new(@vport)@tile.map_data = map.data$data_tilesets[2].tileset_names.each_with_index do |name, i| @tile.bitmaps = Cache.tileset(name)endupdates while true
Is anyone aware of this?
To overcome this problem might simply assign a different viewport for the sprite, but it's not a neat solusion I guess. I hope the next generation of RGSS will fix the tilemap class better.
Thought?
