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 / A question to all Dark Basic Gods and Godesses

Author
Message
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 17th Mar 2012 00:12
Hello,

A question to all Dark Basic Gods and Godesses - are there any limit of polygon count that Dark Basic pro can endure ? What is your experience ? And what FPS rate do you call a workable good score that should be maintained while building and developing a shader intensive high poly game ?

Thanks,
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 17th Mar 2012 00:16
I don't think that there is a limit on polygon count. FPS = 60. Although you are not supposed to make the game too intensive.

WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 17th Mar 2012 00:28
30FPS is usually a respectable rate for any game written. As for the polygon count, then DBP doesn't have the limit, it's the setup that will have the limit on that. Older GPU's won't handle lots of polygons.

Shaders can be GPU intensive also on older cards, if you can work around an effect then you can increase your poly count.

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
revenant chaos
DBPro Master
19
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 17th Mar 2012 00:59 Edited at: 17th Mar 2012 01:00
I don't believe there is any predefined limit to the number of polygons DBPro can handle in a scene other than your GPU's available memory, but when you are using shaders you need to be careful as those extra rendering instructions can quickly add up (more work=less polygons). You really just need to experiment and use that to come up with a plan for how you are going to manage objects in an efficient manner (culling, recycling, etc...). I usually suggest people go with a grid style system

As always, its a good idea to cut back in places where nobody will notice (goes for polycounts and shader usage).

edit: took waaay to long posting...
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Mar 2012 01:54
Lee!!! where for art thou Lee

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 17th Mar 2012 04:55
There is a limit of around 20k triangles per mesh, since DBPro uses 16-bit indices, but you can have many meshes in an object so it's not really an issue.

[b]
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 17th Mar 2012 08:02 Edited at: 17th Mar 2012 08:09
There is a few nasty limits.

You should know these at least:
1. 15k triangles max per object, and there were crashes even at 15k
2. One limb per object. DBP hates limbs. Have 100 objects with 10 limbs each? Get an extra perfomance hit up to 1000% (depending on your effect system)! You can ignore this issue only if your effects is like in DB Classic (yeah, ghosting is my favorite )
3. Bones are pain in the ass.
4. Follow advice №2 wisely - DBP hates lots of objects too.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Mar 2012 08:18
Quote: "4. Follow advice №2 wisely - DBP hates lots of objects too. "




Dark Occlusion



mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 17th Mar 2012 09:17 Edited at: 17th Mar 2012 09:18
@MrValentine

Hell no. What if you need a lots of objects to SEE? A city from bird's eye, or forest, or grassy field.
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Mar 2012 09:19
Quote: "Hell no. What if you need a lots of object to SEE? A city from bird's eye, a forest, a grassy field. "



Dark Imposters



mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 17th Mar 2012 09:28
@MrValentine

Consider yourself a winner. Btw, did you read first post carefully?
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Mar 2012 09:31
Quote: " a shader intensive "




missed that bit... however DI and DO should still function...

time for me to hit the sack its 07:30am here... could not sleep all night...

Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 17th Mar 2012 16:09
Hello Everybody,

Thank you for sharing your experience and giving advice.

Now regarding the poly count limit and performance - I think the Dark side is not that bad - please see the code - pasted below -



The code loads 2000 sphere meshes each having 100 rows and 100 colums - no doubt a pretty intense polygon count to simulate a high poly character environment and then rotates each of them along their x,y and z axises. On an Windows 7 x64 pc with 4GB RAM and iCore3 processor, I am getting an average FPS count between 11 and 12. Please run code in your pc and let us know what FPS you people get out of it.

I wish I could find/measure the exact polygon count ineach sphere or the in the whole scene. Does anybody know how to do that ? If you do, will you please share it with us ?

Thnaks,
Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 17th Mar 2012 16:25
99 ^ 99 (~9800) Boxes -> ~ 12 FPS.

Dark Basic is not an engine for high poly stuff i think.
Dimis
15
Years of Service
User Offline
Joined: 12th Jun 2011
Location: Athens, Hellas
Posted: 17th Mar 2012 16:56
I don't think that you will find an easy answer for that. It all depends on what type of game you are making how efficient your code will be and generally things like that. You just have to experiment and see how your game works on many computers.
Keep in mind that you may try a basic game setup with your shaders and high or low poly objects, test it, and get a good frame rate (30 or 60 fps will be more than fine). But as you progress with your game's code, your fps may fall. Also you could have a problem with older CPUs and graphic cards. You should work your models in a way that you will be able to reduce their poly count in case you have performance problems in the future.

Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 17th Mar 2012 18:01
The performance trade off is worth it, imo. Just yesterday I knocked together a test app for the new limb dismemberment system in Carnage. It took a few functions, less than 100 lines and about 30 minutes. If I was doing that in OpenGL, it would've taken a lot longer, and I would've been thinking about rendering orders and which texture to switch too when, and setting up rendering threads etc etc.

Simple fact is, hobbiests rarely get anything finished because making games takes so much effort and such a long time. Nobody fails to make a game because the engine just can't render all the amazing media they've put together.

So yeah, it's slower than native coding and self optimisation, but it's worth it for raw simplicity and speed with good results.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Mar 2012 21:31
@Juggernaut

changed sync rate 60 to 0

it stayed between 70-72 fps

urm my specs in Banner ^^

Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 17th Mar 2012 22:28
Gunslinger , Dimis, Fallout and MrValentine - thanks all of you for doing the testing and giving your comments ...

So the bottom line is - reduce the poly count as much possible without degrading the character appearance and then use shaders for wow effect ..... and lots and lots of coding effort (adding physics, AI etc.) and then maybe someday some thing will get produced from the dark side - which is worthy looking at ...... but something like HALO 4 is just a dream for now .... Am I right ?

Still I ask all of you pros ..... have you been able to create anything that is at par commercial grade and was able to find publishers to sell that ?

Thanks,
Gunslinger
19
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 17th Mar 2012 22:33 Edited at: 17th Mar 2012 22:35
You have to think about that you need people who are creating that high poly models...

It's not just a dream if you have a skilled team for all that stuff.

But alone... forget it. Start small if you have no team. Sounds mean, but thats the reality
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Mar 2012 22:35
TEXTURES

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 18th Mar 2012 12:03
Example is wrong. To truly "test your might" you should texture every object with individual texture and at least apply simple pixel-lighting shader.

I must admit, that DBP renders 4096 texture just as fast as 1024, dramatically fps drops when you have several 4096 - but this is memory lack issue.
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 18th Mar 2012 13:17 Edited at: 18th Mar 2012 13:20
I have never had much problems with the poly count. I have had scenes with 100.000.000 (100 million) polygons and it still ran fine. You just need to apply good culling and level of detail.
Quote: "15k triangles max per object"

Never had problems with more, had up to 200.000 triangles per object.
The biggest problem of DarkBASIC is a lot of objects, a thousand cubes can kill your framerate, but 1 object with a few thousand triangles is still fast.
edit
If you need a lot of objects, try instancing them if possible.
edit2
If you make everything timer-based you can create a playable game with 20-25 fps.

Quel
17
Years of Service
User Offline
Joined: 13th Mar 2009
Location:
Posted: 18th Mar 2012 16:20
I've never ever heard this "DBPro hates limbs" crap before.

Not only i use objects with hundreds of limbs a lot, but some Pro's using Dark BASIC also highlight using limbs everywhere you can as their primary advice for everybody.

-Mental Hybrid: A unique heavy story based shoot'em ~40% (primary project)
-CoreFleet: An underground commander unit based RTS (canned) ~15%
Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 18th Mar 2012 17:27
Quote: "I've never ever heard this "DBPro hates limbs" crap before.

Not only i use objects with hundreds of limbs a lot, but some Pro's using Dark BASIC also highlight using limbs everywhere you can as their primary advice for everybody."


+1 wtf!?

sounds like rubbish to me. I see some people even recommend creating levels with 'players' and 'units' as limbs, and moving the limbs, rather than having them as seperate objects

I refuse to use a character model with less than 15 limbs and I also have no problem pulling FPS in the thousands
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 18th Mar 2012 19:48
@MrValentine-

Did you really get an FPS of 70-72 by changing SYNC from 60 to 0 ?

Or was it a joke ? I tried it out and my FPS varied between 12 and 13

@MrHandy - I agree with your opinion that 4096 textures , appropriate lighting and shaders should be applied in that piece of code - if we want to get a realistic estimate of what what the dark side is capable of enduring.


Thanks,
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 18th Mar 2012 20:07 Edited at: 18th Mar 2012 20:19
@Max P
Quote: "Never had problems with more, had up to 200.000 triangles per object."


Umm... 15k is limitation of some editors like Giles. Sorry!

Tried to load 64k .3ds file - DB just hangs. Only 64k .X was loaded quite fast, 200k .X file was loaded in 5 minutes.

Btw, 200k per object - is it ULTIMATE PERFECT TEAPOT?

Although, made a little test to show you how DB hates limbs:
Quote: "Stats: 25 objects, 1 limb per object, 10k polys per object."

Quote: "Stats: 25 objects, 10 limbs per object, 10k polys per object."

This test is just loading same object for 25 times, sync off. No shaders, 1 texture 256x256 for all, nothing more. But there is already huge difference.

Quote: "Did you really get an FPS of 70-72 by changing SYNC from 60 to 0 ?"

SYNC RATE just set maximum FPS for your game. 0 means no limit. But don't forget, that your monitor (unless it is an expensive TV) has refresh rate approx 60-75 fps. Although max rate means that your game will always run at 75 FPS maximum, even if PC can do 1000 FPS, so that is game timings safety, if your game events based on sync loop, not timer itself.
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 18th Mar 2012 21:00
I have different results here (1001 objects, 12012 polygons):
Objects: 283 fps
Limbs: 363 fps
One object: 3215 fps

Here is the test code:


mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 18th Mar 2012 22:15 Edited at: 18th Mar 2012 22:59
@Max P
Are you sure that your results are correct? Thank you for providing another proof of my statement.

OP said:
Quote: "a shader intensive high poly game"

Every camera based effect will increase draw calls. So if you have 1000 trees - it will be as 4000 with shadows, water and refraction.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 19th Mar 2012 00:05
Quote: "I've never ever heard this "DBPro hates limbs" crap before.

Not only i use objects with hundreds of limbs a lot, but some Pro's using Dark BASIC also highlight using limbs everywhere you can as their primary advice for everybody."

It's not dbpro it's directx.

DirectX hates lots of draw calls so it isn't the same if you render 1 object with 1000 polys and 10 objects each with 100 polys. That one object will be rendered much faster.

and also it isn't the same when you render 10 limb object with the same texture on every limb and rendering the same object when every limb has different texture. Every texture/effect/vertex buffer change costs much more than actual rendering

Quote: "Umm... 15k is limitation of some editors like Giles. Sorry!"

Dbpro has the limit of around 21000 polys per limb, there's no limit per object

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 19th Mar 2012 06:36 Edited at: 19th Mar 2012 06:37
yup my fps rate was not a joke... I did not bother posting a screenshot as I like to host on my own server... darn I forget I can use my gallery server

anyhow... I bought an NVidia 430GT instead of a 450GT as I wanted that all awesome power cap ^^ so more fps is certainly possible dependent on your hardware...

@ mrHandy
Quote: "Quote: "Did you really get an FPS of 70-72 by changing SYNC from 60 to 0 ?"
SYNC RATE just set maximum FPS for your game. 0 means no limit. But don't forget, that your monitor (unless it is an expensive TV) has refresh rate approx 60-75 fps. Although max rate means that your game will always run at 75 FPS maximum, even if PC can do 1000 FPS, so that is game timings safety, if your game events based on sync loop, not timer itself. "


no offense but... do you understand FPS at all? I can not understand why you posted that statement...

Brendy Boy help me out here ^^

EDIT

mrHandy - or were you trying to identify whether he understood frame rates? ^^ eitherway

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Mar 2012 09:42
Quote: "no offense but... do you understand FPS at all? I can not understand why you posted that statement..."

FPS - frames per second.
Wiki says: Refresh rate or the temporal resolution of an LCD is the number of times per second in which the display draws the data it is being given.

Quote: "mrHandy - or were you trying to identify whether he understood frame rates"

Err... I've read my post, and I can't answer you what I've meant. Just accident mind stream about FPS

Quote: "Dbpro has the limit of around 21000 polys per limb"

I've loaded object with one limb with 65000 polys...
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 19th Mar 2012 10:17
Quote: "I've loaded object with one limb with 65000 polys... "

are you sure it only has one limb because i wanted to make a change in dbpro source code that would allow that but my request for change was denied because it would break the compatibility with some hardware. Last time i checked dbpro's index buffer had the limitation of 2^16 indices which is around 21 000 triangles

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Mar 2012 10:49 Edited at: 19th Mar 2012 10:50
I've made two teapots: 65000 and 200000, both are .x files. second one loaded in 5 MINUTES
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 19th Mar 2012 10:56
Quote: "I've made two teapots: 65000 and 200000, both are .x files. second one loaded in 5 MINUTES"


What are you complaining about? That's the perfect amount of time to make a cuppa!!

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 19th Mar 2012 11:01 Edited at: 19th Mar 2012 11:04
@Fallout
Hmm, I think you just invented a new game genre - a hardcore meditative loading game. gameplay, graphics - pfff, the LOADING itself is a pleasure

Chester A. Bum says: «I've loaded 9 bazillion polys teapot once!»
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 19th Mar 2012 19:52
So, the number of objects is the main factor on how good is the frame rate and not the number of polygons per object ? Please keep the shaders, textures, the limbs/bones out of this context for now.

Number of polygons per object vs number of objects present on screen - what really slows down the game ? What should I be careful about while coding ? Any thumb rule ?

Thanks,
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 19th Mar 2012 20:12 Edited at: 19th Mar 2012 20:14
Polygons are the main factor, but number of objects plays a huge part. Just give the GPU and engine as little to do as possible.
- Use LOD (level of detail) on anything with lots of polys
- Cull everything hidden
- Trim all your back faces off models where they'll never be seen and model intelligently in general
- Use the minimum number of separate objects/meshes/limbs
- Use imposters and billboards
- Use 1 texture per object where possible
- Switch shaders off when objects are too away for the effect to be seen or noticed
- Dont perform CPU intensive processes (e.g. AI) every loop
- Minimize your use of transparency

The list goes on. You just have to design your game to be efficient from the word go and in everything you do, and then the slow decrease in FPS as you add more detail will be much more reasonable.

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 20th Mar 2012 00:24 Edited at: 20th Mar 2012 00:25
Juggernaut:
Quote: "Number of polygons per object"

Don't bother with that - your main perfomance hit will be post-processing shaders and large amount of draw calls.
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 20th Mar 2012 15:39
@Fallout:

Is there any community plugin available for applying LOD and CULLING ?

Thanks,
Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 20th Mar 2012 15:56
@ Mr. Handy: Thank you for your opinion.

Also is there any community plugins for applying LOD ?

Thanks,
Max P
16
Years of Service
User Offline
Joined: 23rd Jan 2010
Location:
Posted: 20th Mar 2012 16:34 Edited at: 20th Mar 2012 16:35
@Juggernaut
Dark Occlusion
Culling + LoD

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 20th Mar 2012 17:34
Max I failed you lol but he is looking for a free plugin... ahh

Juggernaut
Dark Occlusion has a time limited free version... I think lol

Juggernaut
14
Years of Service
User Offline
Joined: 12th Mar 2012
Location:
Posted: 20th Mar 2012 19:22
OK ...... I was browsing the forum and stumbled upon this -

(DAP - The DBPro Additions Pack - Antialiasing, HUD, Dynamic Objects, and a bunch more!)

http://forum.thegamecreators.com/?m=forum_view&b=8&t=103409&p=0

Has anybody used this one ? Looks old ..... about 5 years back..... don't know if it will work with the latest version of Dark Basic Pro. What are your opinions ?

Another question, is there an official IRC channel for Dark Basic Pro ?

Thanks,
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 20th Mar 2012 21:35
LOD is as easy as killing bunnies with axes (respect to those who get the reference!). Load in several versions of the same model, with different amounts of detail, and then display the one appropriate for it's distance from the camera (exclude the rest). Use alpha blending if you want to make transitions smoother. Bread and butter.

There are no free culling plugins I'm aware of. I code all my culling. It's good to learn these sort of techniques yourself though, as even though things like Dark Occlusion are great plugins, they wont always be the best solution for your game.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 20th Mar 2012 21:38
Quote: "
Is there any community plugin available for applying LOD and CULLING ?"

What exactly do you mean when you say applying lod. Do you want a plugin which creates different lod levels for an object or do you want a plugin that just switches different lod objects based on distance from camera. The first version doesn't exist, for the second search for object lod plugin (i believe it's made by kaedroho)

What culling you had in mind. If frustum culling then you don't need a plugin, dbpro already does that. for other types of culling there's no free plugins

Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 21st Mar 2012 01:35
I know Kaedroho released a free LOD plugin if you search the forums.

My signature is NOT a moderator plaything! Stop changing it!
zeroSlave
17
Years of Service
User Offline
Joined: 13th Jun 2009
Location: Springfield
Posted: 21st Mar 2012 08:44
Quote: "LOD is as easy as killing bunnies with axes"

So, definitely not as hard as french kissing a cobra?

Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 21st Mar 2012 10:19
Quote: "So, definitely not as hard as french kissing a cobra?"


No, that would be ridiculous. Good lad!

mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 21st Mar 2012 10:29 Edited at: 21st Mar 2012 10:30
Quote: "LOD is as easy as killing bunnies with axes"

Oh yeah?! C'mon, bring your axe here!
JRH
20
Years of Service
User Offline
Joined: 8th Jul 2006
Location: Stirling, UK
Posted: 21st Mar 2012 13:05
I got a steady 102 FPS in your demo.

Quick Specs (nothing massive):
GT 430
4GB DDR3 Memory
AMD Athlon II x4 620 (4 CPUs, ~2.6GHz)

Login to post a reply

Server time is: 2026-07-10 03:09:48
Your offset time is: 2026-07-10 03:09:48