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 / Particles / Native C++ commands / better command documentation?

Author
Message
MayoZebraHat 1979
16
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 3rd Apr 2008 03:43
Why do snow and fire particles not work with the dbColorParticles() function? Also, can I have particles always face the camera when rotating particles rather than acting like they are all on individual planes?

Are functions like dbSin the same as the native counterpart or can I get more optimization out of using native commands? I get an ambiguous call when I try...

Is there a help file or place with more informative command syntax? I've also found that certain DarkBASIC commands actually do have dbCounterparts but aren't documented in the DarkGDK chm.

Thanks!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 3rd Apr 2008 06:40
Quote: "Are functions like dbSin the same as the native counterpart or can I get more optimization out of using native commands? I get an ambiguous call when I try..."


I can't speak to the advantage of one over the other. I'd be inclined to go with the native functions because of what I perceive to be optimization issues that probably have no basis in reality. I do prefer to use the native functions when it comes to files since I'm more familiar with their behavior and trust them to work as I expect. The only difference is that pack files may have some advantages and don't have any native equivalent.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
MayoZebraHat 1979
16
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 4th Apr 2008 05:37
Well, I don't know what I'm missing but I'm getting an ambiguous call to functions like these. I think all I would need is to include math.h and use as I usually do.

The basis in reality you are looking for is that all the internal C++ commands "should" compile to machine language as optimized as it can be and still maintain the ability to take int and float numbers. I would hope that they are simply wrapped, either to make the help file documentation easier and/or to make sure all the functions from DarkBASIC have a DGDK equivalent. No one wants to re-invent things.

Still looking for info on the particles and documentation.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 8th Apr 2008 01:23
I don't know if this is true or not - but someone told me that the REAL optimizations for VS2008 are only implemented in teh "Pay for" version.

MayoZebraHat 1979
16
Years of Service
User Offline
Joined: 21st Dec 2007
Location:
Posted: 10th Apr 2008 03:17
A friend suggested some profiling for a previous project so I figured that would also be the best way to solve this question.



This is one of my most used and basic ways of comparing function speeds. You'll have to uncomment the functions you want to test against each other. You could use this for other functions too.

I found that the base cos, sin, tan functions are slower than their DB counterparts in most cases. But it's not the same for atan, acos, asin... they are faster when using the math.h version. You may get different results though... this somehow doesn't seem like the best way to test them what with different processors all over the place.

Login to post a reply

Server time is: 2024-11-20 07:15:43
Your offset time is: 2024-11-20 07:15:43