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 - [R]Viper

Pages: [1]
1
Graphics / Animation "flickering" when using float position.
« on: October 06, 2018, 05:58:46 pm »
Hi there, I'm doing a little project and I have a flickering problem.

You can clearly see the problem here (the while line on each side of the sprite) :

My movement  code is very simple.
heroine.Position += this._Direction * time.AsSeconds() * 100;

So my position is "always" a float.

If I cast my position to some int, everything is working fine.

this._Heroine.Position = new Vector2f((int) this._Heroine.Position.X, (int)this._Heroine.Position.Y);

But now, when I hit a wall, the sprite "shake".

And for information, I'm using a really simple spritesheet : https://opengameart.org/sites/default/files/OpenGunnerEnemySoldier_0.png where all sprite is 50*50 pixels.

I'm pretty sure there's a way to correct this flickering problem, but I can't figure it out...

Thank in advance guys!

2
DotNet / Re: SFML.NET 2.4 Update
« on: June 19, 2017, 10:38:46 pm »
Is there a way I can help with the 2.4 release?

Pages: [1]