Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bobblehat

Pages: [1]
1
Graphics / Re: setSmooth, seams on tiles.
« on: July 09, 2013, 10:28:24 am »
The logic in that post does make sense - I'll have to convert to vertices instead.

Is there any reason Sprites don't take a FloatRect in their constructor, or automatically account for this? The comments in the code state that the IntRect in the constructor is to only show a specific part of the texture, which is exactly what I'm trying to do -- it just seems slightly silly that more pixels get displayed than I need, and a bit inconsistently.


2
Graphics / setSmooth, seams on tiles.
« on: July 09, 2013, 02:14:59 am »
So, I've been working on a simple tile engine for a 2D platformer today. There's an odd issue I keep having.

Essentially my program renders a subsection of a spritesheet as a texture for each tile, by putting them into sprites and then iterating over a collection of sprites. I then move around the map using sf::View.

However, at no regular interval but frequent enough I have this happen:
http://imgur.com/K8vPPZd

This is a screenshot with setSmooth enabled for the tileTexture to show what I mean (I understand these artifacts with this enabled - some blurring between tiles of the spritesheet would be inevitable) -- but the problem is that it happens without it.

My view is the same size as the screen resolution, but centered on the ball sprite.

I'm assuming I can get around this by using a RenderTexture to draw the level into memory, and redrawing that as a single texture/sprite every frame, but it seems strange as to why this is happening.

It just crops up for a single frame, and then disappears.

Any help would be greatly appreciated.

Pages: [1]