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

Pages: [1]
1
General / Re: Should i use this game loop?
« on: May 22, 2014, 04:13:52 am »
Quote
Looks like only these two have to be swapped and you should pass TimePerFrame to your updateStatistics function instead of dt, like you did with your update function.

Audio is a strange title btw haha :D

:D actually, this source code come from 'SFML Game Development' Book and original code is:
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();
        }

        updateStatistics(dt);
        render();
    }
}
 

2
General / Re: Should i use this game loop?
« on: May 21, 2014, 05:59:59 pm »
This post really belongs in the help section, but anyway; I believe this will help you: http://en.sfml-dev.org/forums/index.php?topic=15175.msg107603#msg107603

Oh, i'm sorry :(, i'm newbie and thank you for your help :)

3
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 :)

4
General discussions / Re: The new SFML team
« on: May 17, 2014, 06:59:14 pm »
Great news! :D
This is a awesome team  8)

5
General discussions / Re: Question about game performance
« on: May 13, 2014, 02:40:15 pm »
Quote
If you run directly from VS, you need to put the Media folder where your "Projectname.vcxproj" file is (thats probably also where your source code is)

@Geheim: Wow, it's work. Thank u very much! :D

6
General discussions / Re: Question about game performance
« on: May 13, 2014, 09:09:31 am »
:D Thank's everybody for helping!
I thought that the issue was solved. It's slow because i ran with debugger.
When i run in Release mode and without debugger, it's pretty good.
Thanks Nexus for your anwser.

I want to ask one more question:
When i run in Visual Studio, Although i copied Sansation.ttf file to Release/Media folder but it's still could not found, console print that: "Failed to load font "Media/Sansation.ttf" (failed to create the font face)".
How can i fix this? Thanks :)

7
General discussions / Re: Question about game performance
« on: May 11, 2014, 02:02:02 pm »
@Ixrec: 'profiler' word is seem new to me, so tks for your link :)

@Nexus:
- Oh, i didn't know that debug and release is diffirent :P
- I'll keep reading to 'optimizations' part.
- I think that performance is low because of i compiled in Visual Studio. Then, when i compiled in GCC 4.7.1 (CodeBlock), it's run better. Thanks for your reply :D

8
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.

9
SFML projects / Re: Eleutheromania - 2D RPG - Work in progress
« on: May 10, 2014, 11:16:56 am »
Wow, your rpg game is very impressive!

I really love to make rpg game. :D
So, would anyone please give me some recommendation (Books, Website, Video, ...) about how to make a 2d rpg  game like this?

Thank you so much. (Sorry for my English is not good :()

Pages: [1]
anything