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 Discussion / object quanity help, please

Author
Message
Mikada
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location: Kentucky
Posted: 18th Jul 2004 16:13 Edited at: 18th Jul 2004 17:15
Hey does anybody know how to code objects in DBC so when you have a lot of stuff 25 or more objects the program doesn't slow to a stop. I have a really big program on a 2.4 gig machine and its running like its on a 486 other games with much more stuff in them run ok but DBC just drags after you pass a certian object number, is there some special way that you have to turn the objects off if you get out of sight from them so the program will free up? The hide object doesn't help, and the delete object just deletes them, what am I missing. And No before you post get DBpro, I want to run DBC.

Mike

P.S. I have read the sticky at the top of this forum and already done most of that before I posted here and it still don't work. There has to be a way that can work that is clearly can be defined as "hide object 123" or "show object 123" or you are just spinning your wheels.

Mike

POST UPDATE OR EDIT

I just relooked at Axis of Evil a db game, how come this program works at regular speed, someone needs to post a little demo source code of how each kind of object is handled in that program. Right now I am playing with a little program I made of a railroad, it is 100,000 wide 2000 deep, two locomotives no cars 3 stations, 2 counters and 10 trees when I look at the locomotives the game speed cut by 75% and I am being kind. If I turn away from the locomotives they speed back up, so the post at the top is wrong about painting everything even if its behind you. Also anything in the game further than 6000 from you hides, this didn't help any. All of the trees use one image, the locos use one image, the stations use one image, and they are 256X256 in size and I even made them JPG to cut file size, I have even deleted the images all together and no change, I really need some help.

Mike Cohoon
Arkheii
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 18th Jul 2004 17:53
Quote: "Right now I am playing with a little program I made of a railroad, it is 100,000 wide 2000 deep"


Suspicious... try taking that out and see what happens. It's better to use multiple small objects than a behemoth like that.

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Jul 2004 19:20
Actually, several ppl in another thread said 1 large object runs faster than several small ones. And 100,000x2000 doesn't mean anything. The size is irrelevant, its the number of polygons. It could also be the way your game is programmed, and not actually the models. But dbc is overall just plain slow.

"eureka" - Archimedes
Arkheii
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 18th Jul 2004 21:44
I mean, with objects like your level cut up, more objects can be hidden manually. A gigantic object would stay in the screen almost all the time, so the number of polys rendered won't be different...

@Mikada, use "print statistic(1)" and tell us what number it prints out when you're facing the tracks, locomotives, trees, nothing, etc. and maybe we'll get a better idea of what's happening. If you're getting fairly low numbers (like under 1000) then the problem might really be in the way you handle your code.

Mikada
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location: Kentucky
Posted: 19th Jul 2004 03:15
You miss understood or I just didnt write it correctly, the locomotive travels a distance of 100000, its actual size is only 500 and there are two of them, they meet in the middle and they are on opposite sides at the same time so 100000 wide. The locomotives have about the same poly count as a character and they are not that big about 3,000 polys. The stations are milkshape cylinder size, thats what I made them from. The trees are meshes for trees in the tank game so they are 8 polys. When I add one more item, tree or station or anything the program almost stops no matter what size the item is, I am beginning to think its an amount problem and not size related, if thats the case dbc needs to be fixed or a solution posted.

Mike Cohoon
Xander
23
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 20th Jul 2004 12:09
I have no problem in DB Classic, that is what I am using for Firewall. On my 1 ghz computer with 256 MB RAM and 64 MB video I usually get about 30-40 fps, with about, oh, 100 objects on the screen. Say, 10 robots with 300 polys each, 20 posts, 2 bases, 30 lights, 10 ammo, 12 shadows, and 10 thrust objects. That is altogether about 6,500 polys.

That is just on the screen, though. There are usually at least a thousand objects existing at once, but most are hidden, like explosions and debris that are only shown when they need to be.

What is your fps? 40 is pretty good, if it gets below 20 that is considered sort of slow.

In Firewall, I check every object to see if it is in the screen. If it is not, I hide it. If it is, I show it. It did speed it up a little.

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
Arkheii
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: QC, Philippines
Posted: 20th Jul 2004 21:40
Best advice I can give is to post your code and media, if any, so others can help pinpoint your problem. DBC doesn't need a fix and probably never will be, so the problem may be in your code. Have you even tested different methods of narrowing down the cause of the problem? Try replacing every object with standard DB cubes or plains. Or maybe you have some crazy loop inside that does a lot of nonsense. Really, I've had lots of dynamic objects on-screen before (as in on-the-fly object deleting and making to make for better flexibility later on, which should be damn slow), but it never suffered as bad as your program. DBC isn't _that_ slow, it just doesn't forgive inefficient coding or design very well.

Just post your code. We'll go out of our way to help you.

bibz1st
23
Years of Service
User Offline
Joined: 2nd Jan 2003
Location:
Posted: 24th Jul 2004 01:10
Is collision turned on for each object, that would slow it down a lot, try turning collision on only when it's needed for each individual object and off when it's not
BearCDPOLD
22
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 25th Jul 2004 05:46
You could also check the speed-up tips in the sticky at the top.

Another thing to check out is "forced timing". Somebody brought up a post which described how to actually do it in DBC not too long ago. Basically if your game is running half as slow as it should be you make everything run twice as fast to compensate for the lag.

Crazy Donut Productions, Current Project: Project Starbuks
Sony stole our name!
Mentor
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 25th Jul 2004 18:12
sounds like either a bad attack of Graphicus Cardicus Cruddicus, or modelicus exissivcus elabartium, or maybe codus convulutus et clunkus, without an example I am unable to reproduce the effect you mention on my setup, I get a slowdown with several thousand objects, not a dozen , nobody else has mentioned this to the degree you have (we all suffer from slowdown to a small degree in LARGE projects), so I assume either your PC has an integrated crudix chipset, or your models are insanely elaborate, large and have dozens of individual textures at 512x512, or your code has serious issuse, like drawing the same scene several times before the sync, or getting stuck in loops that should exit way before they do etc, CODE Watson! CODE! , I need something to work with

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster.
Mikada
22
Years of Service
User Offline
Joined: 28th Jan 2004
Location: Kentucky
Posted: 26th Jul 2004 16:23
UPdate,

My motherboard was going out, I didn't know, it finally totally fried, it was an elite k7sem just got a new replacement and all problems cleared up instantly with the speed problem. I thought I was going crazy and had forgot how to code but my motherboard lost something important in reguards to the cpu and must have been running at 486 speed, not very fast.

Thanks everbody for the attempted help, but the yo-yo here had other problems, I also probably pissed the people off at DBC so sorry to them also.

Mike

Mike Cohoon
3beth
22
Years of Service
User Offline
Joined: 13th Feb 2004
Location: Good ole Kentucky
Posted: 26th Jul 2004 16:29
So Mikie,

Is it safe to get back in the forum again or is everybody still throwing rocks at us from Game Creator. -LOL- And let me write the e-mails to them next time, I think I can do a better job than you did.

Beth

Beth=The ditsy blonde. I like men and programming, but mainly programmed men!

Login to post a reply

Server time is: 2026-07-26 16:49:28
Your offset time is: 2026-07-26 16:49:28