Hi,
I was testing this issue, that Zealous posted at the DBPro forum:
- Objects with high ID (=object number) run SLOWER that objects with low ID.
I translated his sample code, and the numbers:
LOW ID:
DBPro = 1200 FPS
DBSDK = 320 FPS
HIGH ID:
DBPro = 80 FPS
DBSDK = 70 FPS
Here are the code samples:
DBPro:
sync on: sync rate 0
make object cube 1,10
do
set cursor 0,0
print "fps = ";screen fps()
`***
`Try both high and low number ranges
`I get a difference of about .29 on low range and .35 on high range
`***
objmin = 2: objmax = 100
`objmin = 1000002: objmax = 1000100
for objnum = objmin to objmax
instance object objnum,1
next objnum
for objnum = objmin to objmax
delete object objnum
next objnum
sync
loop
And DBSDK:
#include "windows.h"
#include "DarkSDK.h"
#include "stdio.h"
void DarkSDK ( void )
{
/*
Try both high and low number ranges
*/
int objmin = 2;
int objmax = 100;
//int objmin = 1000002;
//int objmax = 1000100;
char text[256];
dbSyncOn();
dbSyncRate (0);
dbMakeObjectCube (1,10);
while ( LoopSDK ( ) )
{
if ( dbEscapeKey ( ) )
return;
dbSetCursor (0,0);
sprintf (text , "fps = %d", dbScreenFPS());
dbPrint (text);
for (int objnum = objmin; objnum < objmax; objnum++)
{
dbInstanceObject (objnum,1);
}
for (int objnum = objmin; objnum < objmax; objnum++)
{
dbDeleteObject (objnum);
}
dbSync();
}
}
Am I doing something "wrong"? If not, why DBSDK is slower? Also, I think that the high ID issue should be fixed. That is a strange behaviour, isn't it?