• A weird problem
    3 replies, posted
I have been making a game in C++. It started as console-application, and it seems that it has to stay as one. The game reports stuff every frame. This does not slow or crash the game. The problem is, that if I remove the reporting-stuff, the game slows down to 30 FPS from 60 FPS. This also persist if I hide the console behind the window or through project properties. Does anyone have any idea what could cause this? The reporting line is extremely simple: [code] cout<<"FPS: "<<Framerate<<endl; cout<<"Bullets: "<<ammustenmaara<<endl; cout<<"Enemies: "<<EnemyAmounts<<endl; [/code] Also, interesting fact is that without the report-lines, it runs slower when there are fewer stuff on the screen, and faster when there are much more stuff. Any help? Otherwise I have to keep the report-function and declare that; :iiam:
Are you using a curses library? I don't see how you can get FPS in a terminal game.
Console application, c++, SFML for graphics, GNU GCC as compiler.
You need to post more code.
Sorry, you need to Log In to post a reply to this thread.