![]() |
|
extreme frame rate drop |
Sylvarant
Member #7,886
October 2006
|
So I'm started using openlayer and one of the first things I wanted to do Is check my framerate, when I just did this :
I got an average framerate of about 470 then I decided that it would be better to make a print fps function for the sake of keeping my main loop tight. void print_fps(TextRenderer var) { float fps = FpsCounter::GetFps(); string frame_string = "FPS : "+ToString(fps); var.Print(frame_string,20,20 ); } and in my main I replaced the old code by print_fps(arial); these actions downed my framerate from 470 to 37 fps average?
|
CursedTyrant
Member #7,080
April 2006
![]() |
Shouldn't it be like this?
--------- |
HoHo
Member #4,534
April 2004
![]() |
FPS doesn't change linearly with added scene complexity. How low does your FPS drop when you call the print_fps function two or more times? __________ |
Sylvarant
Member #7,886
October 2006
|
@cursedtyrant void setup() { // Sets up the devices needed Setup::SetupProgram(true, false, true); // Sets up the screen dimensions Setup::SetupScreen(480,320,WINDOWED); set_window_title("Project - Metroid Version 0.1"); // Set up the delta time routines with the default fps of 100.0 // FpsCounter::Start( 100.0 ); }
|
Ariesnl
Member #2,902
November 2002
![]() |
Do you have an AMD Dual core 64 bit ?? Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
Richard Phipps
Member #1,632
November 2001
![]() |
Comment out each line in the print_fps function and see how each line affects the FPS. |
piccolo
Member #3,163
January 2003
![]() |
I have an AMD Dual core 64 bit. dose it have something to do with the fps. I had some similar problem to what this person is having. wow |
Ariesnl
Member #2,902
November 2002
![]() |
I have a AMD Dual core 64 bit processor.And I had speed/ timing/framerate problems with my own games and with professional games. You should install AMD's Dual Core Optimizer!!! It fixed everything for me and al games run a lot smoother with much higher and more stable FPS Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
HoHo
Member #4,534
April 2004
![]() |
Quote: A few days ago I read an artickle about this it's a problem with timing (timestamps) and AMD Dual cores.. Actually it should be a problem with XP, not specifically with AMD (or Intel) dualcores. __________ |
Ariesnl
Member #2,902
November 2002
![]() |
It had something to do with correcting the timing for the fact you have 2 processors. but that optimizer is a true gem.. Oblivion runs like a dream now Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
Sylvarant
Member #7,886
October 2006
|
Ariesnl: said: Do you have an AMD Dual core 64 bit ??
|
Kauhiz
Member #4,798
July 2004
|
Quote: what makes this really strange is the fact I've never had these problems in allegro. Allegro and OpenLayer have little in common in this respect. --- |
Kris Asick
Member #1,424
July 2001
|
Try this... void print_fps(TextRenderer *var) { float fps = FpsCounter::GetFps(); string frame_string = "FPS : "+ToString(fps); var->Print(frame_string,20,20 ); } And call the routine with: print_fps(&arial); Just a wild guess, but it couldn't hurt. --- Kris Asick (Gemini) --- Kris Asick (Gemini) |
monkeyCode
Member #7,140
April 2006
|
// or by reference :P void print_fps(TextRenderer& renderer) { float fps = FpsCounter::GetFps(); string frame_string = "FPS : " + ToString(fps); renderer.Print(frame_string, 20, 20); }
|
piccolo
Member #3,163
January 2003
![]() |
thanks for the link i'm going to try it out now. when i had a fps problem it was because i did not completely separate the update from the drawing edit: wow |
HoHo
Member #4,534
April 2004
![]() |
Quote: i need more. With what HW and how many details? I wouldn't worry about speed bofore betatesting and when it is too slow with all the details. With empty gameworld any kind of benchmarking is meaningless __________ |
piccolo
Member #3,163
January 2003
![]() |
i want it to run faster on slower computers im thinks that my main cpu load is the tile animation and layers world 100*100 32bit tile. 4 layers wow |
HoHo
Member #4,534
April 2004
![]() |
You think or you profiled? Never ever think anything. Profile! __________ |
Ariesnl
Member #2,902
November 2002
![]() |
Quote: You think or you profiled? Never ever think anything. Profile!
Assumption is the mother of all fuckups Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard) |
Fladimir da Gorf
Member #1,565
October 2001
![]() |
Quote:
void print_fps(TextRenderer& renderer) Yeah, use a reference (or a pointer) to a TextRenderer, otherwise it'll regenerate all the character images and reload them to the video memory every frame... Quote: I already do that in the setup function I'd recommend starting the FpsCounter right before the game loop, or otherwise it'll think that the first frame takes a long time to render and adjusts itself accordingly... Which means that you'll get a hiccup at the start of the game if you use the delta time. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
|