1.5x scaling bugged?

AdventureIslands

  • *
  • Posts: 728
Jon added 1.5x scaling back to Webgames, but if I try to use it with Sretch to Fit, Scale to Fit (letterbox) or Scale to Fit (Fill), the game displays odd shutters and glitches everywhere.

If I try to use it with Full Screen or No Scaling though, the game plays and displays otherwise with no problems, but when screen has scrolling, the scene starts to experience odd glitching when moving around.

rob1221

  • *
  • Posts: 9472
I thought the scrolling tile shake was fixed but I guess not: http://community.stencyl.com/index.php/topic,22945.0.html

I'll take another look at it and see what I can do.

Coding Notes
I haven't fixed it yet but I'm narrowing down the cause.  When the screen scrolls, the position of the TileLayer changes until it reaches the tile size, and then the position goes back down to 0.  That's defined in these two lines in TileLayer.hx:
Code: [Select]
this.x = x % (scene.tileWidth * Engine.SCALE);
this.y = y % (scene.tileHeight * Engine.SCALE);
In 1x and 2x (probably 4x too), the draw() function of TileLayer is called from Engine.hx when the position goes from the tile size back down to 0.  In 1.5x, this does not happen consistently, so when the TileLayer snaps back to 0 it brings the tiles with it.  I'm going to check a couple variables in Engine.hx and hopefully that will lead me to the answer.

« Last Edit: November 18, 2013, 05:25:14 pm by rob1221 »

rob1221

  • *
  • Posts: 9472
Fixed: the cameraMoved variable wasn't being set properly on 1.5x due to rounding issues.  Changing a couple lines solved the problem.

Oh, about the stretch problem: refer to this thread (trying to keep one thread per problem): http://community.stencyl.com/index.php/topic,26653.0.html

« Last Edit: November 18, 2013, 06:06:45 pm by rob1221 »