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 / DarkGDK - Unofficial Updates

Author
Message
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 20:19
Well, I finally came to realize that the debugger can be a very powerful tool for debugging. I haven’t learned how to set up templates yet. Very cool!
The Tall Man
6
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 28th May 2014 20:29 Edited at: 28th May 2014 20:52
Just for inspiration... My template has 3 main files. Compiled, it will let you walk around a room:

DarkGDK.cpp


MainClass.h


MainClass.cpp


Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
JDforce
16
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Some rainforest
Posted: 28th May 2014 21:48
OK WickedX, am just starting, but when done will send it so you can add it to the release. Its a good idea, so the code doesn´t fragment a lot.

May the 3d force B with U
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 22:50
Thanks guys, I really appreciate all the help I can get.
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 14th Jun 2014 16:32 Edited at: 14th Jun 2014 16:33
I added header DarkGDKWindow.h and new initial display mode into my game. Very easy and usefull. Antialias and Anisotropic filtering work without changes. I am very satisfied.

Thanks!
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 16th Jun 2014 04:52
Thanks, s_i. It’s good to know everything is working as it should, though credit for that one go’s to IanM. I have been spending to much time lately working on other projects. This time was not wasted, I have found other functions missing from Dark GDK. I have been experimenting with the Nvidia PhysXSDK.

But, now it’s time to get back to work on the Dark GDK update. I will devote this week to seeing how much I can get done. I have already added a few functions. Hopefully I will have an update by the weekend.

Thanks again.
GreenDixy
12
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 16th Jun 2014 06:17
@WickedX Take your time to get it right. We are very greatfull, For the updates.

.:: Http://DeanWorks.Ca ::.
My software never has bugs. It just develops random features.
MadBit
Valued Member
11
Years of Service
User Offline
Joined: 25th Jun 2009
Location: Germany
Posted: 18th Jun 2014 10:03
I am very happy that someone continuing to work on DGDK.
I would have to make some suggestions that are fairly simple to implement.
There is for example the use of D3DXVECTOR3 structures and the other D3DX Math's.

Here is an example what I mean.

from

become


and from

become


so you can write for example


instead



I mean that these functions are added and not replaced.


good work, keep up

Share your knowledge. It's a way to achieve immortality. (Tenzin Gyatso)
Pixie-Particle-Engine
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 18th Jun 2014 22:55
MadBit, glad to see you in this forum!
Quote: "I mean that these functions are added and not replaced."

Of course "add", not "replace", because I will have to change too much existing code...
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 30th Aug 2014 02:19 Edited at: 30th Aug 2014 02:21
Hi, guys and gals. Needed a little break from working on this for a while to work on other projects and clear my head. Thanks to the help from the forum, we should be able to add memory safe string functions using the string streams library.

@MadBit - Added the functions you requested. Let me know how they work out for you. I will be working on the obvious extensions to this idea. Thanks.

@s_i - I replaced the existing square root function with your fast square root function. It functions just the same so, existing code will still work. For 10,000,000 iterations I’m getting an average of 0.3415648 seconds using the performance timer. I also added dbProjectPoint() (AKA - dbFind2DCoordinatesFrom3DScene() ). This function works with the current camera. Let me know if this functions as you intended. I have a working prototype of the function - db3DPointOnPlane() (AKA - dbFind3DCoordinatesOn2DScreen() ). I will work on implementing this into the source. Thank you.

Dragon slayer
13
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 30th Aug 2014 04:51
I have version one and the original updates, I have 2008 express. Do I install this version over the old one or delete the old version?
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 30th Aug 2014 05:23 Edited at: 30th Aug 2014 05:25
Hi, Dragon slayer.

The source and release builds are complete. You can extract the files over your existing copy or extract them to a new folder. If you prefer the latter you will need to change the include and lib directories in the 2008 express IDE for the release build.

Dragon slayer
13
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 30th Aug 2014 15:32
thanks!
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 31st Aug 2014 00:29
1) dbProjectPoint() -- Tested, all OK
2) float dbRnd() -- Tested, all OK
3) dbSetDisplayMode() -- Tested, all OK
4) dbPerformanceTimer(), dbPerformanceFrequency() -- I don't understand meaning of this functions. Please, give example of using.
5) ShaderData.lib, ShaderData.h -- We don't need them, they are from "Dark Shader". You can delete them from "r114 full release".

Good work, WickedX, thank you. And thank you for publication of "r114 sourse code", it is very important and useful for me.
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 31st Aug 2014 02:48 Edited at: 31st Aug 2014 02:53
dbPerformanceTimer() is a more accurate timer. This is the source I used to test your optimized dbSqrt() function.



ShaderData.lib and ShaderData.h are part of the original DarkGDK library. So, I have been including them in the release.

Thanks.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 31st Aug 2014 13:34 Edited at: 31st Aug 2014 13:38
@WickedX
1) I compared the precise timers that I use and you use. Your more stable. Why? And what timer truer?

Here is my code:


Here are my results: look at the attached picture.

Here is my test bed: CPU i5-4670 3.4GHz, Win 7 x64, VC2008 Express.

2)
Quote: "ShaderData.lib and ShaderData.h are part of the original DarkGDK library. So, I have been including them in the release."

Strange. I have not used them for years, and now I delete them as well, and all works perfectly well without them. I think they do not need, because they are not part of DarkGDK, bat part of Dark Shader (someone on this forum wrote about this for a long time).

Attachments

Login to view attachments
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 31st Aug 2014 21:21 Edited at: 31st Aug 2014 21:42
1) To answer that question read this thread on the msdn social network.

2) Attached is a full screen bloom shader example that requires these files.

Edit: Examined the DarkGDK installer using 7-Zip. ShaderData files are included.

Attachments

Login to view attachments
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 1st Sep 2014 01:07
Oops! Example does not work! See attached picture. (ShaderData.lib and ShaderData.h was included correctly)

Attachments

Login to view attachments
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 1st Sep 2014 01:46 Edited at: 1st Sep 2014 01:57
I get the same warnings when compiling a debug build. It still compiles and runs fine for me. The file may not have downloaded correctly and corrupted the file. If not try copying the media files to the executables directory and change the load strings in the source.

If that doesn't work, I really don't know what the problem could be.

Bloom.dbs


s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 1st Sep 2014 01:57
OK, copying the media files to the executables directory helped. Thanks!
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 1st Sep 2014 02:02
Sweet!

The Tall Man
6
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 11th Sep 2014 06:18
If those debug warnings are the same cause as before, here's how I fixed it then. This is a portion of the changelog from r106 in the repository:

Quote: "Replaced strmbasd (debug) with strmbase (release) for debug builds (to fix vc60.pdb linker warnings).

Note: Since the DirectShow library (strmbase) is and always was imported into animation.lib, it has never been necessary to include the strmbase & strmbasd libraries with the DarkGDK compiled libraries. Within DarkGDK projects, adding them to the library ignore list in project settings eliminates any need for them during linking."


From my research, I'd say chances that anyone would need to debug into the strmbase code are somewhat microscopic.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Sep 2014 04:36
I'm not using strmbase.lib(release) or strmbasd.lib(debug) in either directories. Here are the warnings.



shaderdata.lib does not include a debug build.

Thanks.

WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 4th Oct 2014 08:47
Added six new functions. Two of which will allow you to change or add/subtract from the render cycle. This is another feature from the brain of Ian Mold. Info for the usage is available in the PDF file in the download from his thread - Guide To Writing Plug-ins - and the Dark GDK source. This demo illustrates one possible use.



NOTE: Since camera 1 is rendered last you will not be able to get the objects angle. This bug is easily fixed. To keep the demo simple, I didn’t bother.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 4th Oct 2014 19:23 Edited at: 4th Oct 2014 19:25
@WickedX -- Good news, thank you! Some questions:

1) Please, give "full source" too.
2) There is hidden "vssver2.scc" in "DBO Format" folder. Is it needed? (I think: no.)
3) Where is "DarkGDKLib.lib" from "VS9Debug" folder?
4) dbAddLODToObject() -- please, give some more info about arguments of this function. Because this function is not from DBPro (I can not find...), and because there are different ways for LOD implementation in Computer Graphics.
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 4th Oct 2014 20:30 Edited at: 4th Oct 2014 20:32
Thank you! s_i

1) Ok, it will take more time. But, I will continue the source updates.

2) Now, how did that get in there. Probably from copying the folder from the source.

3) DarkGDKLib is one of those prototyping libraries that got past me. Most of the functions have since been added to the source. Is there another function from this lib you would like me to add?

4) Look in the GameFX Commands in the DBPro help file.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 4th Oct 2014 23:52
1) After uploading "full source" file, please, change the label "Last updated - 08.29.2014" to new.
2) OK
3) OK
4) Found! Thank you!
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 6th Oct 2014 00:16 Edited at: 6th Oct 2014 00:22
Quote: "1) After uploading "full source" file, please, change the label "Last updated - 08.29.2014" to new."


How would doing that distinguish is from the next or previous update.

Attached is the source and compiled lib's for DarkGDKLib. So as not to break existing functions, I am prototyping helper functions. These will remove the necessity to delete the memory associated with functions returning a character pointer and allow the use of the standard string class instead.

I need to compile a list of these such functions. If you can help with this or have a helper function you would like to share, I would really appreciate it. Also, if you have any feedback on something I may have got wrong or can do more efficiently. Please, do tell.

Attachments

Login to view attachments
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 6th Oct 2014 21:19 Edited at: 6th Oct 2014 22:33
1)
Quote: "How would doing that distinguish is from the next or previous update."

I do not understand this, and GoogleTranslate can not translate this correctly too, and YandexTranslate too.

2) I am a bad helper for you with this functions in your DarkGDKLib, because I am very afraid of strings and memory leaks: You do usefull work, but my level with strings is too low. Excuse me, please...

3)
Quote: "...or have a helper function you would like to share..."

I have another functions, maybe you find them usefull for you and others.
Lets talk about Anisotropic Filtering. After reading this... forum.thegamecreators.com/?m=forum_view&t=209081&b=6
...in my game I successfully use this block of code and 2 functions:

Code block:


Functions:




If you want, you can include this functions with your changes into DarkGDK (into 3D section). But in this case before my using your AF-functions I need carefully read your source code of this functions. So please, upload this new ''full source'' into http://forum.thegamecreators.com/?m=forum_view&t=209827&b=22&msg=2507267#m2507267

Example: spaceship's engines, top view


dbSetObjectFilter(object,2) (as I understand, this is default for DarkGDK) and MyAnisotropicFunction2(,,,2) gives DIFFERENT effects.
.

Attachments

Login to view attachments
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 7th Oct 2014 10:08 Edited at: 7th Oct 2014 10:48
1) By using the date, if the date is more recent the the version you last downloaded, you can tell it is new. Changing it to read new you will not know how new, next time I update.

2) This is new territory for me too. Using Task Manager the functions appear memory safe.

3) Thanks. Under further investigation. Will have to get back to you on this.

Edit: Could you please explain further what each of the images depict and are the results what you desire. Sorry, I’m a little confused.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 7th Oct 2014 22:08 Edited at: 7th Oct 2014 23:49
Here ...
http://forum.thegamecreators.com/?m=forum_view&t=209081&b=6
... TheTallMan wrote about "dbSetObjectFilter(,2)", but I found that this function is absolutely NO help with anisotropic filtering. This feature can help only when you need to completely remove the bluring filtering (pictures #3,4 -- you can see there the grain without blur if use dbSetObjectFilter(,0)). Picture #4 is very interesting: no texture's blur (look at the horisontal surfaces), but anisotropic filtering works (look at the vertical surfaces).

And what to do now? We need a special function for anisotropic filtering, because dbSetObjectFilter(,>=2) does not help -- and I wrote it on the basis of TheTallMan's function. My functions work, and work good. Thanks to TheTallMan.

Can you insert two my functions into DarkGDK? If yes, you need to give them correct names (for example: dbMaxAnisotropy() for first function, and dbSetAnisotropy() or dbSetAnisotropyLevel() or dbSetAnisotropyForObject() for second).
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 8th Oct 2014 06:29 Edited at: 8th Oct 2014 08:18
Hmmm, Ok. I looked into this and how it relates to Dark GDK's internal operation. dbSetObjectFilter(iID, iFilter) will set the object texture to use a D3DTEXTUREFILTERTYPE of iFilter+1. So if you pass an iFilter value of 0 it will set the minificationFilter and magnificationFilter to use D3DTEXF_POINT on texture stage 0. By default it's set to D3DTEXF_LINEAR.

D3DTEXTUREFILTERTYPE:
D3DTEXF_NONE = 0
D3DTEXF_POINT = 1
D3DTEXF_LINEAR = 2
D3DTEXF_ANISOTROPIC = 3
D3DTEXF_PYRAMIDALQUAD = 6
D3DTEXF_GAUSSIANQUAD = 7
D3DTEXF_CONVOLUTIONMONO = 8

Your first function can only be used as an availability expression. Look at the class; CObjectManager Member PreSceneSettings(). It makes using - SetSamplerState(Sampler, D3DSAMP_MAXANISOTROPY, Value) somewhat redundant, as Dark GDK will use the maximum available regardless. So, with that in mind do you still want your first function added?

Thank you, The Tall Man and you, s_i for bringing this function to my attention. I really like the idea of having full control of object texture filtering and the ability to affect multible objects and texture stages with one function. I will work on this and post a prototype for your evaluation, before adding it to the source.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 9th Oct 2014 00:49 Edited at: 9th Oct 2014 00:59
??? I can not understand you, or you can not understand me?......
Quote: "By default it's set to D3DTEXF_LINEAR."

I know this. But I want Anisotropic Filtering (AF) for my objects. What I need to do for this?......
My decision: I took the TheTallMan's function and divided it into two parts:

1) in 1st part I find out the maximum level of videocard's AF. I use this 1st part ONLY 1 TIME (in the beginning of the game).

Quote: "Your first function can only be used as an availability expression."

No, for "availability" DarkGDK has dbAnistropicfilteringAvailable(). But my 1st function gives MaxAnisotropy, for example "16" for NVidia GTX660.
Quote: "Look at the class; CObjectManager Member PreSceneSettings(). It makes using - SetSamplerState(Sampler, D3DSAMP_MAXANISOTROPY, Value) somewhat redundant, as Dark GDK will use the maximum available regardless."

I've looked. You want to say that AF really will be only MAX (16 in my case), and the number (2,4,8,16) in my 2nd function is not important?.. If "yes", this is a reason why my eyes can not see any difference between using 2 or 4 or 8 or 16 for AF. This is bad news, because what if I want only 4 instead of 16 for the sake of FPS? However, AF has little effect on FPS.

2) 2nd part of TheTallMan's function is my 2nd function MyAnisotropicFunction2(). I need to ask 2 questions:
2a) what number now I have to be substituted into the function as "anisotropy": 2 or 16 or... ? Or any greater than zero?
2b)
Quote: "I really like ... the ability to affect multible objects ... with one function."

After many months of using AF in my game I advice you to make function for ONE object, not (or "not only") for multiple. For example:

... instead of ...

Because, for example, I almost always use this AF-function after creating one object and applies only to this one object. Then create another object and applies the AF-function only to that one object, etc.
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 9th Oct 2014 02:32 Edited at: 9th Oct 2014 02:35
I understand you perfectly and it appears you understand me, as well. I also fully understand your functions as well as The Tall Man’s.

1)
Quote: "No, for "availability" DarkGDK has dbAnistropicfilteringAvailable(). But my 1st function gives MaxAnisotropy, for example "16" for NVidia GTX660."


I know, but dbMaxAnistropicFilter() would be an addition to the availability expressions, if added. This is all it could be used for.

Quote: "I've looked. You want to say that AF really will be only MAX (16 in my case), and the number (2,4,8,16) in my 2nd function is not important?.. If "yes", this is a reason why my eyes can not see any difference between using 2 or 4 or 8 or 16 for AF. This is bad news, because what if I want only 4 instead of 16 for the sake of FPS? However, AF has little effect on FPS."


This is exactly what I’m saying and why you see no difference. I really don't think FPS will be affected much.

2a) Since Dark GDK will use the maximum available, this parameter is not required.

2b) My intension is to make it multi-functional as The Tall Man did. Overall the function does more then just setting the anisotropic filtering. So, my idea is to make this a variant of dbSetObjectFilter(). Here is the function declaration prototype.



WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 9th Oct 2014 04:52
Ok, good news. Looks like it's possible to set D3DSAMP_MAXANISOTROPY to a lower value then the maximum available. By adding g_iAnisotropyLevel to globstruct.h and changing the object manager to use this value after initial setup. Nothing broken, problem solved.

WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 11th Oct 2014 11:02
After careful consideration, I decided not to make it multi-functional and add 4 separate filter functions. Since it was necessary to modify the source just to code the prototypes, I have updated the source and release. I feel the functions need a little explanation. Since 0 is not valid for MagState and MinState, the filter functions conform with the existing dbSetObjectFilter() function.

s_i; using dbSetObjectFilter(objID, -1, 2) should give you the same result as your best for 3D.

int dbMaxAnisotropicLevel(void);


void dbSetAnisotropicLevel(int iAnisotropicLevel);


void dbSetObjectFilter(int iID, int iMagState, int iMinState);


void dbSetObjectFilterStage(int iID, int iStage, int iMagState, int iMinState);


void dbSetLimbFilter(int iID, int iLimbID, int iMagState, int iMinState);


void dbSetLimbFilterStage(int iID, int iLimbID, int iStage, int iMagState, int iMinState);


s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 11th Oct 2014 21:50
1) Can not fully compile source code: in Debug & Release have 2 errors:
..\..\..\..\Projects\Expansion Packs\Nature\Shared\utility.cpp(19) : fatal error C1083: Can not open file include: ..\..\..\..\Dark Basic Pro SDK\Shared\Core\globstruct.h: No such file or directory
and
LINK : fatal error LNK1181: Can not open file "..\..\..\..\Dark Basic Pro SDK\Shared\BaseClasses\strmbase.lib"
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 11th Oct 2014 22:29
Try downloading the source again. I just successfully compiled the source download in debug and release with no problem.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 11th Oct 2014 23:26
OK, but where I can get this files? (after compiling I can not find them) --

include: DarkGDKWindow.h, ShaderData.h

lib: ShaderData.lib
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 11th Oct 2014 23:35
Check the release download has those files.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 11th Oct 2014 23:51 Edited at: 11th Oct 2014 23:52
No, no, I meant another. As I understand it, you take this 3 files from somewhere and put these three files in the proper directories on your own (manually)?
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Oct 2014 00:55
ShaderData.h and ShaderData.lib I got from the original Dark GDK download. Since ShaderData is part of the original Dark GKD, it is included in the release. There is no source code available. It is not include in the google code source download. It is not included in the source release. I have these file in my Dark GDK folder. I just compress my Dark GDK folder, this is were these files come from. I have been working on duplicating the functions from ShaderData to include in the source. DarkGDKWindow.h is an alternate header replacing DarkGDK.h to compile your Dark GDK apps and games with. It is also not part of the source. Also I have this in my Dark GDK folder.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 12th Oct 2014 03:19 Edited at: 12th Oct 2014 03:32
I have converted the source code of my game. After many tests... I'm tired. Deep night, and I want to sleep.

1) I have 5 stages:
0 = base texture
1 = normal texture
2 = normalizer
3 = emissive texture
4 = projShadow
I desided to implement dbSetObjectFilterStage() only for stages 0(hull) and 3(engines) of my spaceships. Hope I was right.

2) I'm surprised, because the difference in FPS between different levels of filtering is VERY small. For example: the default (D3DTEXF_LINEAR) == 1000 FPS, AF 16 == 990 FPS. Why so small? -- I don't know.

3) This is test ship, top view. Look at the red engines (vertical surfaces). You can see the difference between different levels of AF. Level 8 and level 16 are almost identical. Thank you for coding. All works fine.

Attachments

Login to view attachments
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 12th Oct 2014 23:28 Edited at: 12th Oct 2014 23:31
Found a strange bug.
If I use dbExcludeObjectOn() on original, it hides, but instance-copies are not hidden. <-- this is right.
If I use dbExcludeObjectOn() on instance-copy, it hides, but original hides too (other instance-copies does not hide). <-- but I need that the original was not hidden.

Founded this in source code CObjectsC.cpp:


Now I need to use dbHideObject() for instance-copies instead of dbExcludeObjectOn() because of this problem. But dbExcludeObjectOn() saves more FPS than dbHideObject().

Question: is it right to comment or delete last line in "DARKSDK_DLL void ExcludeOn()"? WickedX, if "yes', can you do this in r114?
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 13th Oct 2014 05:40 Edited at: 13th Oct 2014 05:46
Given the other circumstances, I would call this a bug - fixed.

Quote: "
2) I'm surprised, because the difference in FPS between different levels of filtering is VERY small. For example: the default (D3DTEXF_LINEAR) == 1000 FPS, AF 16 == 990 FPS. Why so small? -- I don't know.
"


Could have to do with the multi-core parallel processing ability of the video processor.

The ship looks really good, I think you got it right.

s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 13th Oct 2014 22:40
Tested, all works correctly.

P.S. ...this bug lived 7 years!..
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 20th Nov 2014 20:29
Ok, I have added a few more functions and fixes to Dark GDK. I converted and modified the ODE Physics library based on DBPro v7.4 (as a starting point) and added it to the Dark GDK source. I not happy with it yet, but I thought I would upload this update in the mean time. I have made several new changes and still going through the functions one by one. I have fixed and added a couple 3DMath function and I finally got around to adding s_i’s function - dbFind3DCoordinatesOn2DScreen(); named dbGet3DPointOnXZPlane(). Hope this is what you had in mind. Attached to this post is some demo projects featuring some of the new function in this update.

I found the source code for the Newton Physics Wrapper v1.53 for DBPro on my harddrive. This should be simple to convert to Dark GDK. I will be working on this as a separate module from the source.

cheerios.

Attachments

Login to view attachments
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 22nd Nov 2014 12:39
All your projects works correctly on my computer with new r114 update.

Now have test with my real game... Oops! Error! This update conflicts with "Box2D phisics engine" in my game: look at attached picture.
"int8: redefinition; different basic types ... see declaration 'int8'".
I use a lot "Box2D phisics engine", I even slightly altered it for my needs, it bolted to my game and I can't abandon him. I rolled back to the previous r114 update.

So, I'll wait. I understand the situation: you spend experimenting with physical engines, but you haven't decided yet, you did not make the final choice. Also I see that you use very old versions of these engines. So, I will not yet make changes to the Box2D source code, and will wait until the end of your searchings. I wish you success.

Attachments

Login to view attachments
WickedX
11
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 27th Nov 2014 22:10
You can remove or remark the int8 typedef and any others that may conflict in config.h in the ODE include folder. I have already removed the int8 typedef from the source and release. Please inform me on any other conflicts.

I have been testing several physics engines and have decided to go with ODE Physics. I just started with TGC ODE wrapper to test its functionality. I just looked over the ODE_SetBodyRotation() function and discovered it will only rotate on the y axis. I have shorten the function and now it will rotate on all axis. As you can see from this comparison the code will require a total rewrite. I now have the current 2014 version of the ODE library in place and working. I plan to add limb functions in addition to the object functions for better joint functionality. With proper implementation ODE Physics should be a great addition.

ODE_SetBodyRotation(): Before


ODE_SetBodyRotation: After
s_i
11
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 29th Nov 2014 14:26
I've commented //typedef char int8; in config.h in the ODE include folder in r114. Now my game compiles fine.
dbGet3DPointOnXZPlane() -- tested, OK.
I can not test ODE because I use Box2D engine.

Login to post a reply

Server time is: 2020-10-20 23:13:44
Your offset time is: 2020-10-20 23:13:44