leijunhunter / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Drawing Sprite or DrawableObject in a line rendering with inconsistent edge #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

What steps will reproduce the problem?

Drawing Sprite/DrawableObject repeated accross the screen. i.e. if you repeat 
the same graphic like in a level on a platform game, the edge of the tile will 
be rendered with a noticeable edge thickness difference – this shows even 
more if you scroll the images (different edges become thinner, then thicker).

Image example see attached bar.png

Code:

Sprite[] sprites = new Sprite[10];

int iX = 0;
for( int count = 0; count < 10; count++ )
{
    sprites[count] = new Sprite(iX, 50, Textures.bar.getWidth(), Textures.bar.getHeight());
    sprites[count].setTexture(Textures.bar);
    add(0, sprites[count]);
    iX += sprites[count].getWidth();
}

What is the expected output?
The tile repeated with even graphics.

What do you see instead?
See attached example.jpg
The tile repeated with the edge of some tiles thicker than the others, which 
tiles depends on where the images are on screen. The problem is magnified when 
you scroll/move the images across the screen and individual edges become 
thicker/thinner depending on position on the screen.

What version of Rokon are you using?
2.0.3

On which version of Android are you experiencing this?
2.2 on a Nexus One

Please provide any additional information below.
If you create a large bar.png image with the 32x32 image pasted 10 times inside 
this, then render the one image to the screen it is fine.

I realise this is probably due to rendering indicidual objects on a 2D scene 
and might not be fixable.... but thought I'd ask. 

Original issue reported on code.google.com by gav.thor...@gmail.com on 10 Aug 2010 at 5:21

Attachments:

GoogleCodeExporter commented 8 years ago
Isn't really 'fixable'

Try changing the size of your game / window for better results

Original comment by rtaylor205@gmail.com on 16 Aug 2010 at 1:54

GoogleCodeExporter commented 8 years ago
Thought it wouldn't be fixable. 

Running at native res 480x800 on a nexus one so not much point changing the 
size of the game window.

Thanks anyway.

Original comment by gav.thor...@gmail.com on 16 Aug 2010 at 2:06