Bug Issue: 1 pixel line erased from actor


Pages: 1

Luyren

  • Master Stencyler
  • *
January 16, 2018, 11:13:19 am
b9703, happens on Windows Export

When an actor moves towards a direction, a line of pixels is erased from it in the side it is moving towards. This is more visible when the actor collides with tiles. In the sample game, this happens in the top and right sides of the actor, but happened in the bottom side in another game. A movement in the opposite direction seems to fix it.

This seems to be a 1 pixel regardless of the scale of the game. In the sample game, at x1 scale you can see the black outline of the purple square be erased. At x2 scale, only half of it is erased. It is easier to see if you hit the tiles.

In the game I'm working on, it looks more like there is an extra pixel line of collision in the top of tiles. I don't know if it's the same issue as above, or another one on top of that.

Sample game: arrows to move.
« Last Edit: January 17, 2018, 09:02:43 am by Luyren »


New attachment added by Luyren - January 16, 2018, 11:14:20 am


Issue updated by Justin - February 01, 2018, 10:34:18 am
  • Tags added: 3.5 LP


rob1221

  • Master Stencyler
  • *
May 11, 2018, 05:55:31 am
I'm not seeing such a problem using that sample game.  Is this fixed for you, including that other game you mentioned?
  • Status changed from New to Need Info


Luyren

  • Master Stencyler
  • *
May 11, 2018, 04:15:33 pm
b9878
After some testing, it seems this happen when the height of an actor is an odd number.

Added an image showing the issue:
The white characters are 23 pixels high (the entire image, not the collision shape) and the red actor is 23 pixels high as well. In all of those you can see there is a space between them and the ground.

The purple actor is 32 pixels high, and the green actor is one animation of the white characters, but I imported with one pixel less from the bottom (so 22 pixels). In those cases, there is no extra pixel of collision.

I can reduce the collision box to offset this, but then that's just a work around.

I will try to get this consistently in a sample game.
« Last Edit: May 11, 2018, 04:21:09 pm by Luyren »


New attachment added by Luyren - May 11, 2018, 04:16:11 pm


Luyren

  • Master Stencyler
  • *
May 11, 2018, 04:53:25 pm
Added a new sample game, Sample Extra Pixel. It is easier to see if you increase the scale, but it happens in x1 as well. And again, it happens in Windows Export. I can't reproduce with the sample game in Flash.


New attachment added by Luyren - May 11, 2018, 04:54:01 pm


New attachment added by Luyren - May 11, 2018, 04:54:17 pm


rob1221

  • Master Stencyler
  • *
May 12, 2018, 07:09:52 am
I haven't seen anything unusual with the collision data on Stencyl's end.  This might just be something that box2D does: https://gamedev.stackexchange.com/questions/15092/rectangles-render-with-gaps-in-between-them-box2d
  • Status changed from Need Info to Confirmed


Justin

  • Master Stencyler
  • *
May 12, 2018, 12:37:13 pm
Perhaps the physics engine causes the bug to manifest in some cases, but this is a rendering bug, not a physics bug.

edit: I didn't notice your post mentioning that you couldn't see the problem in the first sample game. Perhaps something has changed since I looked.
« Last Edit: May 12, 2018, 12:38:29 pm by Justin »


Luyren

  • Master Stencyler
  • *
May 12, 2018, 12:59:56 pm
For the record, the white character in one of the images is 17x23 for image size per frame, and the collision box was 7x19, and the extra pixel of height showed up. I changed it to 7x18 and now it is perfectly standing on the tiles.

Even if it cannot be fixed for the time being or at all, it seems consistent enough that I can work around it.


Issue updated by Justin - June 29, 2018, 01:17:21 pm
  • Tags added: graphics, openfl


Pages: 1

Details

  • Reported
    January 16, 2018, 11:13:19 am
  • Updated
    June 29, 2018, 01:17:21 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    Confirmed
  • Priority
    Normal
  • Version
    3.5.0 beta 1
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    Compiling/Testing Games

Tags


Attachments

* Raycast Prototype.stencyl (786.33 kB - downloaded 19 times.)

* example.png (53.64 kB, 1364x917 - viewed 16 times.)
* Sample Extra Pixel.stencyl (758.16 kB - downloaded 7 times.)

* image in game.png (5.28 kB, 962x265 - viewed 16 times.)