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 2.0 is coming

Author
Message
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 8th May 2012 21:38 Edited at: 9th May 2012 13:02
See here for more information:

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


Features at a glance:

DarkGDK 2.0 is coming alone well and is rapidly approaching release candidate status. A lot of work has been put into not only porting the DarkBasic Professional engine, but also improving it along the way.

There is a whole lot more to DarkGDK in the detail. This is just a summary of the changes to give you a taste of the improvements you can expect from it:

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38

DarkGDK currently comes with support for C++ and PureBasic, with experimental support for Java. One of the key features of DarkGDK is that it is very easy to port to other languages; all of the code and documentation is automatically generated by language plugins (source available in the DarkGDK SDK). Ideally we'll see full support for Java, C, Delphi, Python, and Perl in the future as well.

The new engine is extremely lightweight and highly customizable. Now you can enjoy the power of DarkBasic Professional from your favorite language. And if you have multiple favorites-- no problem!

Feature highlights:

All of DBP compressed down into a single DLL
Engine customization; basic 3D in less than 800 KB!
Future support is anticipated for additional programming languages.
Language agnostic interface; all exports are C function calls
Internal multithreading support. Go thread crazy!
Enhanced commands including true support for structured parameters
Potential support for rendering in a web browser
Rewritten, extremely fast 3D math library
Improved documentation for all DarkBasic Professional commands
Superior runtime error support that is thread-aware
Easy to use command line tools for automated compiling
Plugin-based parser. Adding support for your own language is a breeze!

Over 250 new commands plus complete integration and documentation of:

Advanced Terrain
Cloth and Particle Physics
Light Mapping
Constructive Solid Geometry (CSG)
Static Collisions
Dynamic Cube Maps
Camera Shader Effects

Projects supported by DarkGDK out of the box:

Visual Studio 2010
Visual Studio 2008
Visual Studio 2005
Visual Studio .NET 2003
Visual Studio .NET
Visual Studio 6
GNU make/GCC g++
Nmake/VC++
PureBasic 4

This list is not finite! DarkGDK will "just work" with any standards-compliant C++ compiler. This includes any version of Visual Studio Express, g++, Borland, Watcom, Intel, Comeau, etc.

DarkGDK is 100% compatible with DarkBasic Professional plugins and supports a plethora of commercial and user plugins out-of-the-box, adding more than 3500 additional commands to an already elaborate command set:

2D Plugin Kit
A* Pathfinding
Advanced Audio 1.55
Advanced Sprites
Blitzwerks Terrain
Box2D
Cloggy's D3DFunc library
Dark A.I.
Dark Clouds
Dark Data
Dark Imposters
Dark Ink
Dark Lights
Dark Net
Dark Physics
Dark Video
DarkSide Starburst particles
DBP Collisions (Sparky's collision)
Enhancement Pack
Enhanced Animation
Extends
EZ Rotate
EZ Rotate Basic
Green-Ear
IanM's Matrix1Util libraries 09
IanM's Matrix1Util libraries 12
IanM's Matrix1Util libraries 18
IanM's Matrix1Util libraries 20
IanM's Matrix1Util libraries 26
ImageKit Version 2
Intel AppUp Helper Plugin
Multisync
Netwon Game Dynamics (Physics)
Object LOD
Quadtree
STYX
Texture Max
Unity
zParticles

Program using your favorite IDE. Any IDE. Any language!

DarkGDK: Project Setup in Visual Studio 2008



Screenshot of DarkGDK and the PureBasic IDE:



Screenshot of DarkGDK and the Qt Creator C++ IDE:



Here is a video of a C++ example project being run and debugged from the Qt Creator IDE. It also demos the flexibility of DarkGDK by compiling from a UNIX (cygwin) command line using Make and the GNU g++ compiler. It should work with most any C/C++ compiler.

http://puregdk.com/files/upload/TGCForum/pgdk_cpp_demo_xvid.avi

DarkGDK can even run in Java. Here is a link to a prototype on the WIP forum to demonstrate the available cross-language flexibility:

http://forum.thegamecreators.com/?m=forum_view&t=187752&b=8



Brand new language-specific documentation! Everything is in the excellent .chm format with an index and full text search.





Here is a screenshot of the DarkGDK documentation for a comparison:



Here is an example project converted from one of EVOLVED's superior shadow shader examples:

http://forum.thegamecreators.com/?m=forum_view&t=187923&b=38



Many of the commands have been renamed for clarity and others have had their parameters reordered to support default parameters and function polymorphism.

Here is an example of a function which will have its parameters reordered for automatic ID allocation:

Quote: "
dbLoadSound(string fileName [, int soundID])"


The "soundID" parameter is optional and therefore appears at the end of the function. If no ID is specified, one will be returned as the result.

For functions which take advantage of default parameters, the header might look like this:

Quote: "
dbLoadSound(string fileName, int soundID = -1)"


And for others which use function polymorphism, for example:

Quote: "
dbLoadSound(string fileName)
dbLoadSound(string fileName, int soundID)"


Another example where a command might be different is "dbSetDisplayMode".

In DarkGDK you can use these commands to change the resolution:

Quote: "
void dbSetDisplayMode (int iWidth, int iHeight, int iDepth)
bool dbSetDisplayModeEx(int iWidth, int iHeight)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth, int iMode)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth, int iMode, int iVertexProcessing)
bool dbSetDisplayModeEx(int iWidth, int iHeight, int iDepth, int iMode, int iVertexProcessing, int iLockable)
bool dbSetDisplayModeVSync(int iWidth, int iHeight, int iDepth, int iVSyncOn)
bool dbSetDisplayModeAntialias (int iWidth, int iHeight, int iDepth, int iVSyncOn, int iMultisamplingFactor, int iMultimonitorMode)"


In DarkGDK the same command with optional parameters is:

Quote: "
dbSetDisplayMode(int width, int height[, int depth [, int vSync [, int multiSampling [, int multiMonitor [, int backBufferWidth [, int backBufferHeight [, int vrMode]]]]]]])"


In this function each parameter after width and height can be optionally specified.

DarkGDK has built-in support for multithreading by providing function-level critical sections for your convenience behind the scenes as well as thread-aware error handling. Each function can have several possible error codes which can be detected are caught at runtime for you to examine and respond to.

For example, dbCreateMatrix() can throw any of the following errors for you to catch with dbGetLastError():

Quote: "
kGDK_Error_3D_Matrix_ID_Invalid
kGDK_Error_3D_Matrix_Exists
kGDK_Error_3D_Matrix_Segment_Invalid
kGDK_Error_3D_Matrix_Dimension_Invalid
kGDK_Error_3D_Matrix_Too_Large"


dbGetLastError() will return the last error to occur in the current thread. It can safely and accurately be used across multiple threads.

DarkGDK uses structures to instead of IDs to pass vector and matrix data between functions. Please refer to your language documentation for instructions on how to pass a structure by address.

In C++, to pass a vector to a function it must be passed by address using the '&' operator. The following example will create two variables with Vector2 structures and then add them together.



Another difference that some of you might not be aware of is that DarkGDK does NOT use "DarkGDK()/LoopGDK()". You can use whatever entry point you want, be it main(), WinMain(), _tWinMain(), etc:



Unlike DBP and DarkGDK, in DarkGDK, the renderable area is separate from the actual window. As you can see from this example code, dbOpenScreen accepts a target window handle "hWnd" which tells it where to render the output. This allows DarkGDK to render to "any" window owned by the process and is not limited to any one implementation, for example: you can use DarkGDK with GLUT, Qt, Win32, wxWidgets, etc.

Some quotes from beta testers that really personify the DarkGDK experience:

Rampage:
Quote: "I've been working on a small DarkGDK game for some time now. .. for the last month I've had a extremely bad bug that just stopped my whole game from working altogether, and I could not find out what was causing it. Once I merged the code to the latest PureGDK. The problem seemed to fix itself.

There is really no denying this is by far superior. And it has brilliant support."


(PureGDK provides bug fixes and enhancements under the hood where possible)

http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38&msg=2239590#m2239590

Rampage:
Quote: "I was EXTREMELY impressed with the documentation. It didn't miss anything and I had next to no problems as it covered everything I needed to know perfectly. I got a level of my game running on the second compile!"


http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38&msg=2239623#m2239623

Mireben:
Quote: "It's great that you return std::string from functions that used to return char* in Dark GDK."


http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38&msg=2240734#m2240734

Mireben:
Quote: "The [documentation] is GREAT"


http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38&msg=2240734#m2240734

Mireben:
Quote: ".. the automatic ID allocation is another GREAT feature which I will definitely use."


http://forum.thegamecreators.com/?m=forum_view&t=177817&b=38&msg=2240737#m2240737

Dodga:
Quote: "So far I'm getting more than double the frame rate [compared to DarkGDK], this is awesome!"


http://forum.thegamecreators.com/?m=forum_view&t=187749&b=22&msg=2239575#m2239575

Rampage:
Quote: "With my short time working with the latest build of PureGDK, I was able to port my DGDK game over, have massive performance increases, numerous bugs fixes, and start experiencing with a massive range of DBPro plugins.

PureGDK, in other words, is nothing short of the best product on TGC at the moment.

Props to Mistrel. His dedication and helpful support is delivering a product with ten times the capability of Dark GDK."


http://forum.thegamecreators.com/?m=forum_view&t=187749&b=22&msg=2239655#m2239655

WLGfx:
Quote: "I made the jump over today and after porting my project over I was surprised at the speed increase between [DarkGDK] and PureGDK.
..
I also like the freedom it gives you. Start a new 'Blank' project from Visual Studio. Getting used to being in the open environment now with full access to the WinApi."


http://forum.thegamecreators.com/?m=forum_view&t=187749&b=22&msg=2240015#m2240015

WLGfx:
Quote: "I like the speed increase, and I've just checked, it was in debug mode and not release either.

So far a big thumbs up..."


http://forum.thegamecreators.com/?m=forum_view&t=187807&b=38&msg=2239903#m2239903

Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 9th May 2012 11:49
This is good news Mistrel. I look forward to trying it out. Perhaps you could clear something up for me though. I've not used PureBasic before, but my understanding is that it uses the same DB libraries behind the scenes, in the same way GDK does. I'm wondering how users are reporting double frame rates on this new incarnation? Is it an enhanced or totally rewritten version of the DBP engine?

McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 9th May 2012 12:22
I'll wait and see.

Am heavily into a project with DarkGDK which I chose because it was free and familiar. Stayed away from PureBasic and PureGDK due to cost.

It's not my fault!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 9th May 2012 12:59 Edited at: 9th May 2012 13:08
Quote: "I've not used PureBasic before, but my understanding is that it uses the same DB libraries behind the scenes, in the same way GDK does."


First of all, DarkGDK 2.0 will not only work will C++ but it will be compatible with MORE C++ compilers than ever before! Where DarkGDK 1.0 was only compatible with Visual Studio 2008, DarkGDK 2.0 is compatible with any standards-compliant C++ compiler. There are out-of-the-box example projects for several different editions of Visual Studio included with DarkGDK.

Secondly, I'm anticipating that there will be a free version as well. I'll be making a separate thread about this.

Quote: "I'm wondering how users are reporting double frame rates on this new incarnation? Is it an enhanced or totally rewritten version of the DBP engine?"


DarkGDK 2.0 takes a different approach to supporting the core engine including many enhanced functions, hundreds of new commands, and 100% compatibility with ALL DarkBasic Professional plugins.

The reason frame rates are faster can be attributed to the different approach taken towards porting the engine. Many functions have been completely rewrtitten for improved speed such as the matrix and vector math library.

The Zombie Killer
13
Years of Service
User Offline
Joined: 27th Mar 2011
Location: Gold Coast, Australia
Posted: 20th May 2012 09:53
WHOA!
Can't wait for this!
FPS Creator will really benefit from a compile with DGDK2, especially CorVus mod!

-TZK

Mister Fuzzy
13
Years of Service
User Offline
Joined: 27th Feb 2011
Location: XNA
Posted: 20th May 2012 19:13
I died. I died, and this is heaven.

ALIEN(S)!!!!!!!!1!! (and sausages)
MickeyIII
18
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 27th May 2012 08:02 Edited at: 27th May 2012 08:15
That's great news...however, will I have to pay again for this
when I payed for the commercial version of the original Dark GDK
and Dark GDK.NET??? I can't use that because it was used in older
compilers, 2003 and 2005 MS VC++, which I have both, but the
libraries themselves were outdated! The free Dark GDK had the most
up-to-date version available.

This is turning out to be a rather long post, so I will put code
snippets around different topics and questions to make it easier
to read, and to highlight my thoughts in an organized way...sorry.

Question 1 - Do I need to pay for Dark GDK 2.0 or do I get an
upgrade?



Again, Sorry for this long post but I don't like double posting as
that's poor forum etiquette.

Question 2 - What do I need to do in order to get DGDK to
compile, build, and execute in MS VC++ 2010 Ultimate or Premium



Anyway, I've looked at many forums and I Googled since VS 2010
came out off and on, and found some very important, almost working
for me, documentation and tutorials on this, but still can't
successfully build a release form of a project set up just
like
the way it was set up in 2008 Professional. I may have
missed some things sense it has to be setup from scratch in 2010.
I barely got it working in my 2008 Pro sense it's not the Express.
So some help on that would be nice as well. And yes, I used the
VS10 folder's libraries, still to no avail!

Thanks,

MickeyIII



Edits:


"We do what we have to do so that we may do what we want to do!"

-Denzel Washington-
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 27th May 2012 09:30
Quote: "Question 1 - Do I need to pay for Dark GDK 2.0 or do I get an upgrade?"


Users who have already purchased DarkGDK 1.0 will receive a free upgrade so you will not have to pay anything more for version 2.

Quote: "Question 2 - What do I need to do in order to get DGDK to compile, build, and execute in MS VC++ 2010 Ultimate or Premium"


Just DarkGDK 2.0 and Visual Studio. Example projects are provided for:

Visual Studio 2010
Visual Studio 2008
Visual Studio 2005
Visual Studio .NET 2003
Visual Studio .NET
Visual Studio 6
GNU make/GCC g++
Nmake/VC++

I expect it will work with Visual Studio 2011 as well out-of-the-box. However, I don't have it yet so there won't be any example projects to compile. But setting up a blank project will be the same.

You can use Code::Blocks, Dev-C++; or whatever else you want. I use Qt Creator and GNU g++ with DarkGDK.

Don't forget that most commercial plugins for DarkBasic Professional and many popular user plugins also work with DarkGDK out-of-the-box.

How's that for an answer.

MickeyIII
18
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 27th May 2012 19:54 Edited at: 27th May 2012 19:56
Great answer! Because Dark GDK 2.0 is compatible with 2010 and others as well, I don't need to worry about Dark GDK 1.0 commercial not working with 2010 or 11...cuz GDK 2 does, and it's a free upgrade! Thanks.

I noticed that a favorite plugin of mine isn't in the compatibility list yet for GDK 2, as it was in GDK 1...XB360CL_1_3 libraries. I'm sure it will work with this as is, but just in case, I would like eventual confirmation on this. All my other "plugins" or libraries are thankfully in the list.

If XB360CL 1.3 is not included and does not work, I will have to make my own, which I did before for C++, just never really used it and I no longer have it due to computer crashes in the past and stupidity from not backing it up.

Thanks again!

Edit: Oh yeah! Other than the tutorials and samples, will the GDK 2.0 documentation be more elaborate and complete than the other? If not, I can just find something online as it comes out from other users.

"We do what we have to do so that we may do what we want to do!"

-Denzel Washington-
FlexiCat
14
Years of Service
User Offline
Joined: 15th Jun 2010
Location:
Posted: 27th May 2012 22:23
The docs are based on the PureGDK docs which are quite nice.

I swear to the programmers bible that I shall not harm the FPS.
Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 28th May 2012 02:53 Edited at: 28th May 2012 03:11
@ MickeyIII

Mistrel has some kind of method in which he has provided instruction on how to convert/port DBPro plugins to be used with the new GDK 2.0. So that is something anybody should be able to do to get the DBPro version of the XBOX360 controller library to work.

The XBOX360 controller library for the Original Dark GDK should still be able to be used with new Dark GDK 2.0 as it's just a basic library made in C++ for C++ programs. Should be able to use it the same way. It has no dependency for DBPro internals.

EDIT: sry forgot that the XBOX360 CL GDK version does have dbpro dependency for memblocks in using the audio functions. So that might have to be something for me to look at when I get the New GDK 2.0 non-beta commercial version after when I get notified of the upgrade for download.

EDIT2: Wow, I just noticed that in the html setup documentation for both XBOX360 CL DBPro and Dark GDK versions are messed up after all this time.

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
DarkDISCUSSION
13
Years of Service
User Offline
Joined: 6th Jul 2011
Location: Ft Madison, IA
Posted: 28th May 2012 03:30 Edited at: 28th May 2012 03:34
Mistrel, Will the engine be faster and more stable?

<EDIT> Will it be cross platform? (Linux/MacOS)
MickeyIII
18
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 28th May 2012 21:01
Yeah, I found out quickly how to convert the dll to a useable Dark GDK 2.0 plugin...however, I'm doing something wrong when making the extracted string table useable by the compile headers and the compile engine with plugins batch files...

Yes, I converted the file to .gdt simply by renaming the extension.
Yes, I added the name of the dll to the beginning of each entry.

It seems to work with the compile engine with plugins.bat file, but the compile headers detects errors on most of the lines in that file as follows:



and my string table, well now it's a .gdt template file, looks like this in the "templates\libraries\plugin-users\" directory:



Also, the dll is in the "engine\plugins-user" directory.

I've been at this for hours and have been reading the docs as well. This is frustrating!

Some help, please.

"We do what we have to do so that we may do what we want to do!"

-Denzel Washington-

Attachments

Login to view attachments
Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 29th May 2012 04:23
Hi MickeyIII,

Trying to skim for an idea, comparing the source with the ImageKitV2 library, I don't see why my DBPro version of XBox360 CL would be any different. Specially since it works with DBPro itself. I do have my string table set up right.

After looking through the other *.gdt files in the DarkGDK v2's template->libraries->plugin's user, I do see one difference in the supplied .gdt template that you have, which is: The command names don't have an underscore between each name.

Mabie, hopefully, Mistrel can suggest something on why it does that.

ExoDev.Com - A Game Development Tools Website! Featuring: XBOX360 CONTROLLER LIBRARY
MickeyIII
18
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 29th May 2012 16:02 Edited at: 30th May 2012 08:43
@Todd Riggins:

Yeah, I've been doing some comparing, too. And I added the spaces, because all the others seemed to not have any spaces, so I was doing that for safe measure...then I realized that it doesn't matter when I was looking through the source codes for the buildlibs.exe, Compile Headers.bat, and the other .bats under the "src\" folder. Plus I really don't think the part where I added underscores are what gets typed in C++ code, as that, after looking at it again, is what was typed in the DBPro IDE.

I looked at your decorated functions and the way they matched the parameters as compared to the other .gdt templates, and although yours don't seem to be a problem, they do not match some of the conventions used in the others. Plus, the ones I don't get errors on are the ones that don't pass any parameters and
don't return any values...?Function@@YAXXZ

Also, if someone could provide to me details and/or documentation on the 'proper' way to list the parameters and return values both before the decorated function and in the decorated function, I would appreciate it so that I can try to figure this out on my own. The list of what the various errors mean when running the Compile ... batch files, not just the ones I got, that would be very much appreciated. Because an irregular number of parameters could mean a few things to me, one-not enough in comparison to the dll, two-too much in comparison, or three-the decorated function doesn't match the expected parameters before the function.

Thanks

Edit: Woohoo!!! I figured it out! The return descriptions at the end of each string entry was the culprit...one too many that is! Any function with a return value are not supposed to list that return value at the end of the string. That explained the "irregular number of parameters" error.

These errors need to be more descriptive or at least say it in an error log.

So that means after running the Compile Headers.bat and Compile Engine With Plugins.bat files, it finally successfully created the source files in the plugins directory in the App Data under my User Name...sorry for any annoyances my questions might have caused.

For those who are curious, or just want to have the template file on hand, I am hereby uploading it in that nice, wonderful bottom-right corner where you'll of course see that cool red button that has the letters virtually engraved in it.

Yaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyy!!!


"We do what we have to do so that we may do what we want to do!"

-Denzel Washington-

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-19 01:20:04
Your offset time is: 2024-11-19 01:20:04