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.

DarkBASIC Professional Discussion / Too many objects???

Author
Message
KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 14th Mar 2003 23:29
Hello Everybody!. I have a problem with my game (who not?, hehe).

I am loading lots of objects. These objects are boxes with just 12 faces, 8 vertices. The problem is that i load 100 of these objects. But although they are not in screen the fps goes down.

i can't understand what's the problem with this. Is it a bug? is it normal?. I have tried lot of thins, like reescaling texture, using the function hide object, but anything works.

So, anyone can help me please? Thanks!
KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 14th Mar 2003 23:54
After lot of experiments i have notice what is the problem.
There are some object that can collide with these boxes (all objects in my game use make object collision box), and these objects (enemies) perform a object collision test every frame.

The more boxes, the less Fps. But i think 100 object are not too many, and make object collision box is supposed to work very fast!.

:_(

MrTAToad
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: United Kingdom
Posted: 15th Mar 2003 00:06
Wait for joy that is known as Patch 4.

Good news everyone! I really am THAT good...
http://www.nickk.nildram.co.uk/ for great plug-ins - oh my, yes!
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 15th Mar 2003 00:06
This is a big issue with Retail to Patch 3.1 - it really chokes with lots of objects on screen.

Patch 4 is a rewrite of the 3D pipeline and greatly improves DBP's ability to handle lots of objects (ie. get 2000 objects on screen at 30FPS instead of 2FPS)

Current Project: Retro Compo. Entry.
KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 15th Mar 2003 00:22
But the problem is that those 100 object are not in screen at the same time!, but the collision is checked anyway of course, and that is the problem (not really a problem cause those collisions must be checked)...

PiratSS
23
Years of Service
User Offline
Joined: 18th Oct 2002
Location:
Posted: 15th Mar 2003 01:19
Hello KuRi,
You might want to use "set camera range 1,1,300" the default is: "set camera range 1,1,3000". This will not render anything after 300 units. It really helps. try it with a fog combo.

Cheers.


Toughest line of codecol$=asc(left(Pcol$)),1+str$(rev)+chr(80)+left(right(mid(name$),1),1)
KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 15th Mar 2003 01:48
I try to change camera range from 100 to 10000, and always get the same FPS.

The problem is not the render speed, is the collisions check speed.

Every Enemy check the collision with every box in the game, and 8 enemies with 120 boxes drop down from 55 fps to 38. Perhaps i should change my game to work around 30 fps and speed up the object movements...

Thanks Anyway!

Necrym
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: Australia
Posted: 17th Mar 2003 12:37
You will see a massive speed increase in the 3d pipleine in patch 4 when using multiple objects.

Watch the bouncing cursor - now in 3d
Shadow
23
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 17th Mar 2003 16:12
In classic DB, you could create "static collision boxes" and use sliding collision. Is it the same in DBPro, or is that no longer possible?
I made a program with many cuboids and static collision boxed on DB classic and got a respectable fps (and my computer is not very good).
Beta1
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 17th Mar 2003 17:59
kuri - there does seem to be an issue in dbpro where having large numbers of objects causes slowdown even if they are hidden or offscreen, apparently patch 4 will fix this. I ran into this problem when writing the terrain engine for my latest project, (I wanted lots of trees and even if I hid them I got slowdown when I passed around 150). You can get around this problem by only having say 10 trees and rearranging them to whereever the camera is - Pneumaticdryll's holiday scenery/terrascape threads show this in action.

Hope that is a workaround that might help you untill P4 arrives

Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 17th Mar 2003 23:11
Try this..it has math collision on..you can change the object number by setting the objnum value
i get 97 fps with this with 100 objects , checking character collision with all of them at each frame
what do you get?



KuRi
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location:
Posted: 17th Mar 2003 23:36
Thanks Everybody for responsing.

I tried math collisions, but the problem is that i really need the slide collisions.

what i don't understand is why ~100*8 = 800 check box collision is so slow...

Anyway i have solve this using some math collisions (distance pure collision) and some slide collisions and reducing the number of boxes (simply scenery).

Cheers

Login to post a reply

Server time is: 2026-07-11 09:30:10
Your offset time is: 2026-07-11 09:30:10