Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / increase frames per second

Author
Message
Mychal B
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 20th Aug 2010 10:16
Alright,here's the deal. I finally got myself all psyched up because I got dark A.I. working and sparkys collison working to!!! Yay for me....well now my game is running between 35 and 55 frames per second. The level Has a large number of polygons, I'm trying to recreate a small reasturant, with people attacking me inside. I used the ai ass obstacle from level to setup the avoidance for ai, and i have about 10 entitys trying to find my player. Any help to point me at how to make my program run more efficently would be much obliged. Thank you very much for the help
Bigsnake
15
Years of Service
User Offline
Joined: 7th Apr 2009
Location: England
Posted: 20th Aug 2010 20:40
Did you try using the sync rate command ?

I would reccomend using


It could also be your PC specs if there too low to render what your rendering. Try the sync command first if you havn't already used it.

Windows 7, Amd Athlon 7750 Black Editon (64 bit,3ghz + Dual Core), ATI Readon HD 4870 1gb Edition, 4gb Ram.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 20th Aug 2010 21:10
That might help a little but probably not. If Sync rate is already set to 60 and he's getting 35-55 then it's not likely to change.

The best setting for sync rate is 0.

In most games there are things that you do that take up a fair amount of processor time. CREATE BITMAP, PASTE IMAGE, GET IMAGE are just a few that I use to put together HUD elements. However it's not necessary to recreate the HUD image every frame, so I have that inside an if statement that only allows it to run every 5th loop.



If you take this concept one step further, and separate all the elements that don't need to run every frame and put them in their own subroutine, then you can save a lot of CPU processing time and increase your FPS considerably.

Set Sync Rate to 0 and in your display mode command turn OFF VSYNC and your program will run as fast as it possibly can. Using Timer Based Movement to control the speed of objects that move is critical any time, but especially when you do this.

Mychal B
14
Years of Service
User Offline
Joined: 21st Jul 2010
Location: Coos bay, rainville
Posted: 21st Aug 2010 21:57
Thanks for the help guys Time to go try and implement them!!!

Login to post a reply

Server time is: 2024-11-23 11:07:22
Your offset time is: 2024-11-23 11:07:22