Jump to content
Double Fine Action Forums
Sign in to follow this  
nulian

Graphic bug between the tiles

Recommended Posts

While I walk around this bug randomly appears lines between the grid tiles while the camera moves.

Got a NVidia GeForce 560 ti graphics card with windows 8 latest drivers

hackbug_zps4d9b5923.png

Hacked in my own solution to get around the bug because it annoys me allot while playing the game.

Added a line that makes the camera jumps past each full tilesx/y not really noticeable ingame but fixes that annoying bug.

Probably not the real cause of the bug.

In the Scripts/Room.lua file I changed 2 small things in this function.


function Room:_tick_updateCamera()

 local HeroCharacter = require("Characters.HeroCharacter")

 local rFocus

 for _, rEntity in ipairs(self.tEntities) do

   if rEntity:is(HeroCharacter) then

     rFocus = rEntity

   end

 end

 if rFocus then

   rFocus.rBody:forceUpdate()

   rFocus.rProp:forceUpdate()

   local x, y = rFocus.rProp:modelToWorld()

   local sx, sy = self.rCamera:getScl()

   local x0, y0, x1, y1 = sx * 0.5, sy * 0.5, self.iWidth * self.iTileSize - sx * 0.5, self.iHeight * self.iTileSize - sy * 0.5

   x = math.max(x0, math.min(x, x1))

   y = math.max(y0, math.min(y, y1)) 

   --Added this line so the camera just moves per tilex/y

   local posx, posy = math.floor(x/self.iTilesX)*self.iTilesX, math.floor(y/self.iTilesY)*self.iTilesY 

   self.rCamera:setLoc(posx, posy)

 end

end

Share this post


Link to post
Share on other sites

Looks like a good fix, works for me.

There's a remaining issue of constant rather than temporary lines in the castle main room, but looks like that's due to a texture issue. In CastleInterior_BlingExtended02.png the 3rd tile down on the left doesn't extend properly into pixels 0-1. Unless its an intended artistic effect, not sure.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×
×
  • Create New...