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

Pages: [1]
1
General / Re: Help with creating rhythm game
« on: August 27, 2013, 05:53:25 pm »
Okay then. Is it completly impossible to make such game in SFML? It's sad, but i must use SFML for this task, dont ask why, lol.
Is it a good idea to try libraries like FMOD? Any other good libraries?

2
General / Help with creating rhythm game
« on: August 27, 2013, 11:15:56 am »
Hello!
I have some questions about rhythm games. Example of good rhythm game is Osu!(u can google it).
So, what is the best way to synchronize music playing and gameplay?
How to implement simple metronome in SFML that will beat with specified BPM?
Any tutorials/articles about Audiosurf-like game development?
I will be glad to hear any advices and recommendations.
Thanks!

3
Window / Re: Same effect as KeyPressed with Gamepad
« on: August 17, 2013, 07:16:36 pm »
I'll try it, thanks for fast answer. ;)

4
Window / Same effect as KeyPressed with Gamepad
« on: August 17, 2013, 06:57:41 pm »
Hi there.
if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Left)
{
}
 
I use it for navigation in menu, its very easy to handle single key pressures.
But how can i imlement same single pressuers with gamepad?
I can check  "event.type == sf::Event::JoystickMoved" but even with small moving of stick there will be many pressures.
Thanks.

5
Window / Re: Help with implementing framelimit/correct timestep
« on: August 06, 2013, 04:37:10 pm »
I tried all methods from there.
But none of them helped  :(
Okay, i will try them again, i could miss something.
Also i asked about VSync hish CPU usage. Anybody had this problem?
Thanks.

6
Window / Re: Help with implementing framelimit/correct timestep
« on: August 06, 2013, 01:08:30 pm »
Sorry, but your code stutters as hell too.

7
Window / Help with implementing framelimit/correct timestep
« on: August 05, 2013, 08:41:40 pm »
Hello everybody.
I need some help with timestep. I tried a lot of methods to implement correct time step, but i none of them helped.
If i use setFrameLimit(60) my game will stutter hard.
If i use VSync - then game use 90% of CPU, but there is no stuttering.
Also, i tried to use this code: (it is from SFML's wiki)
 
        sf::Clock frameClock;
        sf::Clock updateClock;
        sf::Int32 nextUpdate = updateClock.getElapsedTime().asMilliseconds();
        float updateRate(1.0f / 20.f);
        float maxUpdates = 1;
        window.setFramerateLimit(60);

        while (window.isOpen())
        {
                sf::Int32 updateTime = updateClock.getElapsedTime().asMilliseconds();
                Uint32 updates = 0;

                sf::Event event;
                while (window.pollEvent(event))
                {
                        if (event.type == sf::Event::Closed)
                                window.close();

                        SceneManager::instance().input(event);
                }      

                while((updateTime - nextUpdate) >= updateRate && updates++ < maxUpdates)
                {
                        SceneManager::instance().updateFixed(sf::seconds(updateRate)); 
                        nextUpdate += updateRate;
                }

                SceneManager::instance().update(frameClock.restart());

                window.clear();
                SceneManager::instance().draw(window);
                window.display();
        }
 
Looks better than just setFrameLimit() but there is still some stuttering, even when i use * dt.asSeconds() when moving.
Need some help with it, i will be glad to see your implementation of timestep.
Thanks/

Pages: [1]