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 / Huge 3D world working slow...

Author
Message
deathAngel
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 18th Apr 2003 01:18
Hi. i made a huge world that is: 4 plain object as walls, 2 matrix as floor and celling, and another 2 plain object(ghosted on) which divide the huge cube into 3 levels. the size of each and every one of them is 200000.
so far every thing was good, but when i load a same object 400 times (i put 200 objects, and 200 ghosted objects in random size and position) into the world, i get very lauzy fps. is there any way to make it work faster, maybe hide object that not in screen or something like this?

Thanks for any help. (Sorry for the bad English).
The Wendigo
23
Years of Service
User Offline
Joined: 13th Sep 2002
Location: A hole near the base of a tree in the US
Posted: 18th Apr 2003 01:33
Well, I'll tell you first off that ghosting and alpha blending cut frame rates into tiny pieces so I would use those sparingly. One Idea is to hide ghosted objects if they are too far. You could use the Pythagoris (sorry mr math scientist if i miss spelled your name, don't haunt me!) therom for that. here it is:



1.00 GHZ processor, 256 MB RAM, GeForce 3 64MB, SB Live!, 8 cans of soda per day
Scorpyo
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 18th Apr 2003 01:34
60 fps here with 1 matrix 200000x200000, 60x60 and 400 random cubes,
but it may drop a lot with 3 or 4 matrices added..
deathAngel
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location:
Posted: 18th Apr 2003 02:06
Thnks guys. hiding the object that is far helps a bit.
Scorpyo i use two matrix and and six plain object all 200000 in size.
plus two of the plain objects and 200 other objects are ghosted and continuesly fading +/- to crate glow/fade effect in the dark. that is mostly the problem.

I was thinking using the object in screen insted of the distance formula, but i can't figure why any objects that are in screen return 0, unless i get the camera really colse to the object and only then i get rsult of 1. ?

(sorry for the bad english).

TheCyborg
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 18th Apr 2003 04:53 Edited at: 18th Apr 2003 04:59
Use this just before your sync command in the main loop. It had a very good performance boost in a game i once did:



You could also try lowering your camera viewing distance

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.

Login to post a reply

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