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.

Dark GDK / Bugged? game stuck at 30fps, even with nothing

Author
Message
Fatal Berserker
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 5th Jul 2010 02:11 Edited at: 5th Jul 2010 17:00
Ok, i was making my pathfinding program (as you do), i got my legendary 47.75mb or something array down to 177kb (thanks for the heads up about vectors Bran flakes91093, what i do now is i store the previous paths in a long string, then when i need to i split it up into a temp vector <string>, which ill clear after use.)

But i was suprised to see, that on a 15x15 plain, my fps (previously capped at 30 it seemed) could still struggle to go beyond 30.
So, i decided to go through each part of the code finding what was causing this lagg (i only pathfind when the nodes are regenerated, so that happens only when i press R, and it takes around 5-20 ms to generate the path, after that it doesnt look at pathfinding). I then got kinda frustrated at remmed out EVERYTHING, except for the core bits.
(without the remed code my game basically reads):


PS: i know you can combine FPS and ScreenFPS into one string, im just not really that fussed to do that atm.

I run that, and my fps is still capped at 30 it seems, even tho on the screen its just white text on a black background.

However, i dont know if this means anything, most likley not, but if i minimize my 'game' (showing fps on a black screen is hardily a game), and reopen it, itll read 60fps for a second or so, then go back to 30.

I have asked a few other people to look at my game to see what fps they got, and they all say they can only get 30fps, (even tho some have pretty darn good computers).

So can anyone please answer me why this is happening, or what i should do?

Thanks in advance.

---I included the app---

Attachments

Login to view attachments
Marsh0
15
Years of Service
User Offline
Joined: 18th Mar 2009
Location:
Posted: 5th Jul 2010 04:47
FPS is capped at 60 and unchangeable. As for it being 30 are your running more then 1 dark gdk project at once?

Always cuts it in half for me when i am.

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 5th Jul 2010 11:02 Edited at: 5th Jul 2010 11:03


Might not do nothing, but try that. As it might be your screen refresh rate.

Fatal Berserker
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 5th Jul 2010 16:56
doesnt exist for me, im going to try and update GDK but apparently it came out in 08 and im pretty sure i reinstalled GDK this year. :S.

Quote: "FPS is capped at 60 and unchangeable. As for it being 30 are your running more then 1 dark gdk project at once?"


No, like i said i also had a few mates look at it and they had same thing.

Mireben
15
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 5th Jul 2010 22:01 Edited at: 5th Jul 2010 22:09
The last version of Dark GDK is not the 2008 upgrade. Unfortunately that's the last one you can find on the download page, but on the forum, you can find the 7.3 and the 7.4 versions as well which are later. Using at least 7.3, if you apply the dbSetDisplayModeVSync or the dbSetDisplayModeAntialias command and switch off the vertical sync, you can get FPS values into several hundreds. In any case, if you want to run as fast as possible, then write dbSyncRate(0) instead of 60 into the code.

As to your slowing down even below 60: The dbInk command can slow down the program tremendously, although I experienced that only if the colour changes within the main loop and for you it does not change. Anyway, try moving the dbInk before the main loop and execute it only once instead of every update, or comment it out entirely. See if that helps.

By the way, don't use dbStr like this because it causes a memory leak. You should either delete[] the returned string, or - better - use sprintf.
Apfelsosse
13
Years of Service
User Offline
Joined: 5th Jul 2010
Location:
Posted: 5th Jul 2010 22:55
Had you already tried a blank solution with nothing but "dbText(10,10, dbStr(dbScreenFPS));" in your DGDK Loop?

Maybe it's any funktion u used in ur projekt. Just try to comment out every line step by step until your FPS reach 60.

If you dont get 60 FPS with a blank solution there are any other issue except DGDK.
Fatal Berserker
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 6th Jul 2010 04:47
Quote: "By the way, don't use dbStr like this because it causes a memory leak. You should either delete[] the returned string, or - better - use sprintf."


Thanks man, to be honost i can do some nice things in gdk but i missed out on some good practices because i came up from dbpro and i just cracked on with that, so could you give me an example of how i should do that please, and thanks.

Quote: "The last version of Dark GDK is not the 2008 upgrade. Unfortunately that's the last one you can find on the download page, but on the forum, you can find the 7.3 and the 7.4 versions as well which are later. "


Oh snap, i wish i knew that earlier, thanks alot man, someone should really update that page.

Quote: "Had you already tried a blank solution with nothing but "dbText(10,10, dbStr(dbScreenFPS));" in your DGDK Loop?"


I did indeed, everything commented out except for the code above, very odd, but if its true than my game is immense because i can do all this pathfinding etc and not waste 1 fps (lol).

Fatal Berserker
14
Years of Service
User Offline
Joined: 2nd Jul 2010
Location:
Posted: 6th Jul 2010 05:01
I would of edited my previous post but i cant yet, and im about to doze of so before i went to bed i thought id ask.

I downloaded this 7.4a patch, (not being an expert), i went to:
C:\Program Files\The Game Creators\Dark GDK
And pretty much lumbered the folders there (i think thats right), i then compiled and there was no 3d, so i downloaded this other folder on the 7.4 patch which i guess is a fix, and put it in the same location, but i still got no 3d.
Text appears fine, '3d' dx lines appear fine, but no objects. Did i do something wrong or shall i just try 7.3?

Login to post a reply

Server time is: 2024-07-04 10:59:42
Your offset time is: 2024-07-04 10:59:42