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 - SharkFin

Pages: [1]
1
Hm no I have some weird bug in my code. The fact that I had the same bug in my other program raised some suspicion. Thanks for your answer.. This one's my bad I think. (still don't know what the bug is exactly but I know it is a bug)

Edit: Yep sorry about this, Turns out I was dividing by zero at one point in my code... Sorry for the pointless post, and my cockyness.. Thanks for the reply though!

2
Yeah well it sure looks like it's deleting it. When there are only a few pieces making large movements sfml is fine with it, but the more there are, the more likely they are to be removed. It seems to me like a memory management thing that sfml is doing, but it definitely happens.

3
Edit:    This has been solved. I was dividing by zero, and is not a problem with SFML. My bad

I'm creating a flocking simulation based around http://www.red3d.com/cwr/boids/. I'm getting a problem though.
The flocking is working fine, whatever, but when I try to make the boids wrap around (x position greater than the width, set width to 0 and vice versa), they flash where they should be but then are deleted. I'm using
sf::CircleShape shape(10.f);
shape.setPosition(sf::Vector2f(x,y));
but when the position is set far enough away from it's current position, it is deleted.
The same thing happened with a double pendulum simulation that I attempted yesterday. The physics were all broken which didn't make sense, but the thing would spin faster and faster until sfml just deleted the shapes. (the physics breaking is not the issue here, it's sfml deleting things)
Is there some way to specifically avoid having sfml delete things, or is there a way to turn it off entirely?

Pages: [1]
anything