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

Pages: [1]
1
General / Should i use this game loop?
« on: May 21, 2014, 05:40:21 pm »
Hi :)!
I put render() method into while loop like this:

void Application::run()
{
        sf::Clock clock;
        sf::Time timeSinceLastUpdate = sf::Time::Zero;

        while (mWindow.isOpen())
        {
                sf::Time dt = clock.restart();
                timeSinceLastUpdate += dt;
                while (timeSinceLastUpdate > TimePerFrame)
                {
                        timeSinceLastUpdate -= TimePerFrame;

                        processInput();
                        update(TimePerFrame);

                        // Check inside this loop, because stack might be empty before update() call
                        if (mStateStack.isEmpty())
                                mWindow.close();

                        render();
                }

                updateStatistics(dt);
        }
}

and here is result, FPS is very high but it's seem not stability:


So, i want to ask that should i use this game loop?
Thanks :)

2
General discussions / Question about game performance
« on: May 11, 2014, 10:40:48 am »
Hello :) !

I built a game from book sfml game development and this is result:


Problem: FPS is so low, FPS < 10 when i shoot bullet.

So, is window 8.1 cause this or my computer's hardware is weak?
My computer:
- CPU: Core i3 - 2310M ~2.1GHz
- RAM: 4GB.
- VGA: Intel HD Graphics 3000

Sorry for my English is not good.

Pages: [1]