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

Pages: [1]
1
Graphics / Re: probably problem with linux nvidia driver
« on: September 02, 2013, 09:51:24 pm »
Managed to compile it, there was also some problem with world being * to GameWorld and world being name of stack but after resolving it everything was fine.

After few tests i can say that i still see some stutering. No matter what i do, curious thing is that when i limit framerate to 50 stuttering is much worse than at 60fps, if i use enable-vsync option it becomes better but at both framerates it is still visible.  It seems that best result i have with framerate limited to 60 and vsync on.

There are not too many options left for me it seems, i may install some old drivers and try or maybe install kde, i red some time ago about composition manager being a cause of screen tearing and KDE is only major GUI that left for me.

Really thank you for your effort, it had also some educational aspect for me to see your coding style, seems a bit complicated first but after some time i can say that it is pretty elegant :)

Anyway if any other people using linux  have/not have simmillar issues i would be really grateful if they post in this topic with graphis card,drivers and GUI used if possible.

2
Graphics / Re: probably problem with linux nvidia driver
« on: September 02, 2013, 11:15:38 am »
Let me know!

I tried to compile your app but there are some errors, to be exact:
/home/kuba/cpp/smooth-movement-test-master/src/Application.cpp: In member function ‘void Application::popWorld()’:
/home/kuba/cpp/smooth-movement-test-master/src/Application.cpp:45:21: error: ‘cont_worlds’ was not declared in this scope

and another one also with `cont_worlds' not declared in this scope. I tried to correct it on my own but failed miserably. Ill try to compile it in evening but i doubt if ill manage without your help. Anyway i really appreciate your help.

regards Kuba

3
Graphics / Re: probably problem with linux nvidia driver
« on: September 01, 2013, 10:28:51 am »
I tried with ffmpeg, i got around 30fps but the issue was not really visible. Ill try again and limit my app framerate to 30 also. I doubt if my card is a reason i have gtx275 , it should be enough for moving 1 sprite across screen smoothly .

4
Graphics / Re: probably problem with linux nvidia driver
« on: August 31, 2013, 10:50:03 pm »
I know exactly what you mean. Even though I'm on a Mobility Radeon HD 3650, I always get these "jerks" as I call them. I never managed to get rid of them besides rendering at ridiculously high frame rates.
The vsync implementation in my driver is also broken, it uses a spinlock instead of properly sleeping until vblank (you can see the system load going towards 50% (one full core) with vsync as compared to ~4% without).

I thought that this is only nvidia cards issue, soon ill install linux on laptop with radeon and then ill post if problem still exists. Strange that so few people have simmillar problems. I tested today on my sons if they also see those "jerks", they both saw them so luckily this is not mine personal issue :) If you know any good "fraps" like application for linux i may try to capture short video and if problem will be visible ill post link here. Maybe mine description of that problem is not clear enough  and people dont really know what we are talking about

5
Graphics / Re: probably problem with linux nvidia driver
« on: August 31, 2013, 10:42:47 pm »
I'm using Arch with the stable nvidia package (325.15) with KDE,

im not sure but it may have something to do not only with used drivers but also used composition manager. Im not any Linux guru, 99% of my knowledge comes form reading forums etc. but there is no much about simmillar issue. To tell the truth there is so little that im even not sure which keywords type in google :) 


Are you using a fixed time step for updating your physics and interpolation for drawing sprites on the screen?  That can make a big difference.
I think that when im limmiting framerate or waiting for sync to vblank and testing on computer with much higher framerate ability than limit is set it is equal to fixed timestep. Code responsible for moving my sprite is:
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
        {
            pozycja=sprite.getPosition();
            rotacja=sprite.getRotation();
            zapieprzaj.x=sin(rotacja*PI/180);
            zapieprzaj.y=-cos(rotacja*PI/180);
            sprite.setPosition(pozycja+zapieprzaj*300.0f*deltat);
        }
where deltat is timespan of previous frame.

6
Graphics / probably problem with linux nvidia driver
« on: August 27, 2013, 12:32:04 pm »
Hello i have problem with sprite movement which is imho connected with poor nvidia support for linux. When im moving sprite in any direction it looks like every few seconds sprite moves a bit faster and then it moves normally and then again bit faster. It seems like redrawing few frames is skipped. Additionally at the top of screen some tearing can be seen.

In windows any of that issues are not existant. I tried "windows.setFramelimit" and changing position of sprite accordingly to time elapsed in previous frame. Tried also syncing to vblank and moving with constant speed. None of this works. Its additionally a bit strange that when i check time elapsed in previous frame they are almost identical to each other but sprite still moves not smooth.

Im posting to ask other linux users if they have simmillar issues and maybe they solved it somehow. I tried with Ubuntu 12.04,12.10,13.04 and nouveau drivers and closed nvidia drivers. Now im trying with Manjaro linux with compton compositor and nvidia drivers version 325.15.1 its maybe a bit better but still issue is visible.

I cant believe that with all that recent buzz about linux gaming (steam, humble bundle etc.) there are still such stupid, unsolved  problems . To sum it up here is a question:

Is anybody have simmilar problem with stuttering sprite and is anybody solved it ?

7
Graphics / Re: vertical sync does not seems to work (maybe ubuntu problem)
« on: December 28, 2012, 05:58:50 pm »
i checked settings in nvidia system panel and in compizconfig as well. in both places there seems to be vsync turned on, also when i run glxgears it seems that number of frames match my refresh rate. I returned to linux after few years so im not sure if i checked everything what i could.
Even more weird thing is that after changing driver to another one and running my app i have constant 80 fps even that i commented out syncing or frame limit in my program. Tearing is still there. On previous drivers i reached fps numbers betwen 450-800 when without vsync or frame limiting. Ill have to further investigate it and try to run my app on other systems, right now im trying to build sfml2 for windows7.

8
Graphics / vertical sync does not seems to work (maybe ubuntu problem)
« on: December 28, 2012, 09:46:15 am »
hello all, i have problems with vertical syncing and screen tearing when running my app on PC with Ubuntu 12.10 installed, GPU is nvidia gtx 275 card, drivers are 304.41. I cant get rid  of excessive screen tearing, using window.setVerticalSyncEnabled(true); changes nothing at all. i red that ubuntu have some problems with nvidia drivers so it may be ubuntu issue not sfml but the only place where it happens is my sfml app. Here is minimal code sample, niebo.png resolution is 2048x2048:
#include <SFML/Audio.hpp>
#include <SFML/Graphics.hpp>
#include <sstream>

 int main()
 {
     float czas1;
     float klatki;
     sf::Vector2f vfklatki;
     sf::Vector2i viklatki(0,0);
     sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window",sf::Style::Fullscreen);
     window.setVerticalSyncEnabled(true);
     sf::Clock clock1;
     sf::Texture texture;
     texture.loadFromFile("niebo.png");
     sf::Sprite sprite;
     sprite.setTexture(texture);
     sf::View view;
     view.reset(sf::FloatRect(800,600,800,600));
     window.setView(view);
     sf::Font font;
     font.loadFromFile("FreeMono.ttf");
    while (window.isOpen())
     {
         sf::Event event;
         while (window.pollEvent(event))
         {
             if ((event.type == sf::Event::KeyPressed)&&(event.key.code==sf::Keyboard::Escape))
                 window.close();
         }
         clock1.restart();
         window.clear();
         window.draw(sprite);
         if (sf::Keyboard::isKeyPressed(sf::Keyboard::Left))
            view.move(-1000.0f*czas1,0.0f);
            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Right))
            view.move(1000.0f*czas1,0.0f);
            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Up))
            view.move(0.0f,-1000.0f*czas1);
            if (sf::Keyboard::isKeyPressed(sf::Keyboard::Down))
            view.move(0.0f,1000.0f*czas1);
        window.setView(view);
        vfklatki = window.mapPixelToCoords(viklatki);

        klatki = 1/czas1;

        std::stringstream ss;
        ss << klatki;
        std::string myString = ss.str();
        sf::Text text(myString,font,50);
        text.setPosition(vfklatki);
        window.draw(text);
        window.display();
        sf::Time time1 = clock1.getElapsedTime();
        czas1 = time1.asSeconds();
     }

     return EXIT_SUCCESS;
 }

 

btw, there is no change in documentation about changing convertCoords function to mapPixelToCoords.
 I would be very grateful for confirming or denying if on your Ubuntu installations there is the same issue.

9
System / Re: sf::Vector problem (probably)
« on: October 08, 2012, 09:42:34 pm »
for (i=0; i<16; i++)//change 16 to 15 here
Might not be it but last iteration of the loop accesses the element indexed as 15th.. and there are only elements from 0 to 14.

Thank You very much. that was it, i cant say how stupid i feel now,  but application works now :) at least works somehow :)

10
System / sf::Vector problem (probably)
« on: October 08, 2012, 09:19:42 pm »
Hello all, im not sure if that problem is connected with SFML but it appears when im using one of SFML classes so maybe ill try to ask here :) First some code:

sf::Vector2f *gridpoints = new sf::Vector2f[15];
sf::Vector2f *bfn = new sf::Vector2f[15];
for (i=0; i<16; i++)
{
 bfn[i].x=sf::Randomizer::Random(-1.0f,1.0f);
 bfn[i].y=sf::Randomizer::Random(-1.0f,1.0f);
}

when i execute this code im getting error:
glibc detected *** malloc(): memory corruption

im using ubuntu precise pangolin but under windows program crashes also but without any error message, i cant see anything wrong in above code and im fairly sure that that fragment of code is a reason for application to crash. Any help will be really appreciated :)

Kuba

Pages: [1]
anything