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.


Topics - thisdyingsoul

Pages: [1]
1
Graphics / Smooth movement.
« on: October 01, 2013, 08:15:54 am »
I see a lot of this topics and still doesn't work for me:
    sf::RenderWindow window(sf::VideoMode(640, 480), "My window");
        window.setFramerateLimit(60);
       
        sf::Texture tex;
        tex.loadFromFile("bomberman.png");
        sf::Sprite sprite;
        sprite.setTexture( tex );      

        auto move = 100.f;
        auto dt   = 0.f;
        sf::Clock clock;
    while (window.isOpen()){        
        sf::Event event;
        while (window.pollEvent(event)){    
            if (event.type == sf::Event::Closed)
                window.close();
        }  
        sprite.move( move * dt, 0 );

        window.clear();        
        window.draw( sprite );
        window.display();

        auto& pos = sprite.getPosition();
        if((pos.x > 640) || (pos.x < 0)) move = -move;

        dt = clock.restart().asSeconds();                    
    }
 

The sprite speed up randomly (small but perceptible jumps).
I read about here
http://gafferongames.com/game-physics/fix-your-timestep/ and here http://gamedev.tutsplus.com/tutorials/implementation/how-to-create-a-custom-2d-physics-engine-the-core-engine/.
Implemented the timestepping and the interpolation rendering.
Implemented everything on sdl2.
Tried also on different computers.
And run the sfml examples.
All have the same problem.
And in all cases, without frame limit or vsync (or with framelimit >=75 (+-) ) all runs smooth.
At 60fps or less the problem continues.

Thank you for the patience!

2
DotNet / SFML-2 and Boo
« on: November 30, 2011, 03:42:05 am »
Hello, I will try to work with SFML-2 and Boo Language but I need the dll files to work with. There is some place where I can get it?

Pages: [1]
anything