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 / why dbLoopObject make game slow

Author
Message
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 4th Jul 2008 18:19
1. why dbLoopObject make game slow
dbLoopObject (ObId, startframe , endframe);

if there are more object using dbLoopObject ( ObId, startframe , endframe) it will more slow down..

but if use dbSetObjectFrame ( ObId, iframe );
or dbLoopObject ( ObId, 3, 3) // play only one frame
game will fast..

more animation frame more lag...

2. how to fix this....


3. why using dbLoopObject (1,5,5) why it not display same acting as using dbPlayObject ( 1,5,5)
mouness
16
Years of Service
User Offline
Joined: 21st Mar 2008
Location:
Posted: 4th Jul 2008 19:11
maybe u have wrong thing in ur code. post it here
thanks

http://www.nvidia.com/docs/TEMPLATE/482/nv_logo_footer.gif
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 6th Jul 2008 20:02
for(i=0;i<50;i++)
{
dbLoopObject (i,0,30)
}
// very lag fps lowerthan 30

then i change to this
for(i=0;i<50;i++)
{
dbLoopObject (i,30,30)
}
// fps = 59!

and when use
dbPlayObject (i,30,30) it not play like frame 30 as dbLoopObject (i,30,30)
it act like frame 29.5 or 30.5 o.O

if post all code it more than 1000 line o.O
but the high cause is using dbLoopObject
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 6th Jul 2008 20:08
Don't loop it yourself...

Codger
21
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 7th Jul 2008 06:33
Quote: "for(i=0;i<50;i++)
{
dbLoopObject (i,0,30)
} "


This causes the object to start the loop 50 times that is why the FPS is so low

You need to call the section of the loop only once upon some action such as a key press
for example
within your main loop do a check for a keypress such as "r" then call the section of the animation that equates to run

System
MacBook Pro
Windows XP Home on Boot Camp
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 7th Jul 2008 13:22

thx you.. my game a bit faster.

and question 3
3. why using dbLoopObject (1,5,5) why it not display same acting as using dbPlayObject ( 1,5,5)

i know the answer...i have to stop object and set to frame 5...
and to will acting same as dbLoopObject (1,5,5)

Login to post a reply

Server time is: 2024-09-30 01:36:21
Your offset time is: 2024-09-30 01:36:21