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 / Summary of PureGDK features and how it compares to DarkGDK

Author
Message
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 11th Aug 2011 03:13 Edited at: 11th Aug 2011 03:14
I know I may be somewhat of a broken record for you guys, but I just put together a summary of features provided by PureGDK with some comparisons to DarkGDK and would like to share it with you.

If you don't know what PureGDK is yet, if you've been unsure what it is or what it can do compared to TGC's port of DBP to C++, or if you've been unable to piece together all of the little details, here it is in one place:

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

There are also several beta tester testimonials at the bottom. You can find a direct link to them here:

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

If any of you are using PureGDK now and have anything to say on the subject, I'm sure DarkGDK users would appreciate hearing a voice other than mine!

I also wanted to give a big thanks to those of you who have been testing PureGDK do far. The comments and reports you've made have really helped improve this product.

WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 11th Aug 2011 03:47
Dark Basic Pro has a lot of support for plugins, a lot for free, and there's absolutely loads of them. I left DBP to move onto GDK because I had issues with DBP lack of variable assignments and C++ I can do almost blindfolded. Unfortunately GDK was missing something I really was after for sometime and asking for help in the forums for some time to build an object up from scratch. DBP had that solution with IanM's Matrix1 Utils.

I kept up with all the updates on PureGDK, following its progress. Mistrel had been putting together support for the DBP plugins.

Matrix1 Utils had a command "Make Object New". Not available in GDK and no-one was able to help.

And because I had come to a halt with my project, nothing to do but twiddle my thumbs, I decided it was about time to make the jump.

Thinking it would be a big jump I started early. The video was quiet and long but the help file documentation helped me a lot easier to install and setup. I transferred my current project over, making a few changes to some of the function calls. Nice to find I didn't need to find a free object when creating objects. A little bit of fiddling using the help docs and it worked. Also with a nice speed increase too, even in debug mode, and it does compile in release mode too.

So, I posted a message asking about the Matrix1 Utils. Mistrel had these done and ready within an hour.

Finally I could move on with my project, any longer and I'd probably would have give up.

Needless to say, I'm impressed and glad for the decision to make the jump to PureGDK. My project has moved on with the help of the addition of the Matrix1 Utils and I can now make my game.

So for me: Speed increase over GDK, DBP plugin support and all the rest of the stuff you can do from a WinMain() or main()...

Happy me...

Warning! May contain Nuts!
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Aug 2011 17:53
Is the speed increase due to the optimization of the DBP code? I noticed in the post you linked to it said you can use VS2008 C++. Is that correct? What kind of differences would I have to my current project if I took the plunge to PGDK?

The fastest code is the code never written.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th Aug 2011 17:55 Edited at: 19th Aug 2011 17:55
Some of the actual GDK function names have changed, ie dbMakeObjectCube(ID, size) would be dbCreateObjectCube(ID, size) or ID = dbCreateObjectCube(size) which will return a free ID...

Warning! May contain Nuts!
Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 19th Aug 2011 18:13
Quote: "ID = dbCreateObjectCube(size) which will return a free ID"

That's actually cool. At first, I was very tight with the sequence of IDs, but I have realized that the order doesn't actually matter (I think). I REALLY want to use PGDK, but I don't want to spend hours--if not days-- hunting down command differences. But, for my original question, is there an actual difference in performance or is it just perception/opinion?

The fastest code is the code never written.
WLGfx
17
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 19th Aug 2011 19:28 Edited at: 19th Aug 2011 19:30
My same piece of code was directly ported over from DarkGDK to PureGDK and it ran so much faster on frame rates. As to why I haven't a clue but I was very pleasantly surprised with it. Even though to call a DBP function (or GDK) it seems a function call, calls another function, and so on but still I got miles better frame rates. Maybe it's because you're not stuck within the default loop the GDK wizard gives you.

It was a tad fiddly to setup a project but once it was there after about 5 to 10 minutes it was up and running. The chm help file was easier to follow than the video. I'll be back onto PureGDK in a few days.

The change of functions names are quite easy to do, unless you've got 50k+ lines of source code.

EDIT: I started on beta 9 and was worried bout changing to another beta. I just changed everything over to beta 12 and didn't have to make a change to a single line of source code...

Warning! May contain Nuts!
Mistrel
Retired Moderator
19
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 20th Aug 2011 02:02 Edited at: 20th Aug 2011 02:06
Quote: "dbCreateObjectCube(ID, size) or ID = dbCreateObjectCube(size) which will return a free ID..."


Optional parameters are always at the end and *never* change their order.

The correct parameter order is:

int dbCreateObjectCube(float size.f [, int objectID])

Quote: "My same piece of code was directly ported over from DarkGDK to PureGDK and it ran so much faster on frame rates. As to why I haven't a clue but I was very pleasantly surprised with it."


There is a significant difference in the underlying code between PureGDK and DarkGDK, so it's hard to tell where it's coming from.

I also did a quick comparison of DBP and PureGDK using the camera demo. PureGDK, despite using the same function calls, was noticeably faster there too.

Quote: "I REALLY want to use PGDK, but I don't want to spend hours--if not days-- hunting down command differences."


There will be some growing pains but I hope that you will find the new documentation extremely helpful in this area. There is even full-text searching.

See dbSetErrorCallback() in the documentation. It will help alert you of any error thrown by an invalid parameter. The biggest headache I have when converting code is just reordered parameters. The advantage is that it allows support for non-polymorphic languages as well as making the code cleaner and easier to understand like this:

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 PureGDK 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.

Login to post a reply

Server time is: 2024-11-19 08:46:45
Your offset time is: 2024-11-19 08:46:45