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 / Some info about GDK Please!

Author
Message
Dragon slayer
17
Years of Service
User Offline
Joined: 3rd Nov 2006
Location: Bourbonnais Illinois
Posted: 14th Aug 2012 01:29
I bought this program when they first released it. I have been away from programming for quite a while and just recently started having some time to get back into it and have been learning DBP.

I have a basic understanding of programming and understand some C++ very basic stuff and still have a whole lot to learn. I do want to learn C++ above all and would like to use this also so I have a few questions.

What actually is this? I have heard it is a DBP wrapper for C++. Is it that or is it a library like the alerago library. I know you can use DBP commands with C++ with this. What's it all about?

Should I continue learning DBP and get good with that then learn C++ before start using this?

Is there a way to do both at the same time?

I really don't want to learn DBP just to jump to C++ which I know I would do so what should I do here. If this uses DBP commands then I will have to learn the language but I am really more interested in learning C++ without learning all the directX stuff which is what I understand, GDK cuts that out by using the DBP commands.

Do programs run faster with this and C++? I think I probably know this answer but asked anyway!

Can you use classes and function overloading and pointers and polymorphisim? All stuff I have a ton more to learn about!!!

I think that does it! THANKS for any info

Dragonslayer
Rudolpho
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 14th Aug 2012 01:52
Quote: "What actually is this? I have heard it is a DBP wrapper for C++. Is it that or is it a library like the alerago library."

DGDK 2 is a pure DarkBASIC Professional wrapper. DGDK 1 is also a wrapper but it is a bit more distanced from the (current) DBP version; it is basically the source code for the core DBPro dll's from ~2 years ago compiled into static libraries that you can use with C++. The upside is that they give you core access to the internal data structures of DarkGDK / DarkBASIC which isn't available directly in DBPro or DGDK2. With some work you can access the very same function in DGDK2 but you'll have to include additional structure definitions and do some funky typecasting that can blow up in your face if you do it wrong.

Also DGDK2 is slower than DGDK1 and DBPro alike (note: this only goes for calling the functions themselves; the standard elements of C++ are faster than DBPro). For one thing it uses 2 main function calls per function and then some on top of that for security. This is all well with functions like dbLoadObject(), etc. but it does induce a noticable performance hit with ie. dbGetVertexPosition().


You can probably skip DarkBASIC and go straight for DarkGDK if you want to. There are more examples around for DarkBASIC though I believe.
As for learning C++ first, sure, why not. It's quite different from BASIC so it won't be very much easier to have learned that first except for knowing your general way around programming (which you say you already do anyway).
It might be an idea to start with Java to get used to the syntax and object orientation that is found in C++ as well; Java is much more forgiving with memory management; in C++ you have to handle that yourself and errors often result in hard to trace crashes in a completely different part of your program than where the memory transgression actually ocurred.


Quote: "Can you use classes and function overloading and pointers and polymorphisim?"

Yes.
Although not with DarkGDK, as it's a direct wrapper for DarkBASIC it is just as procedural. You can make your own wrapper classes to make an object oriented system however.


"Why do programmers get Halloween and Christmas mixed up?"
Seppuku Arts
Moderator
19
Years of Service
User Offline
Joined: 18th Aug 2004
Location: Cambridgeshire, England
Posted: 14th Aug 2012 13:43 Edited at: 14th Aug 2012 13:44
Think of it this way. Dark Basic Pro commands inside of C++.

You don't have to learn Dark Basic Pro first, because C++ actually handles things differently to Dark Basic and is more complicated. Chances are, if you're going to learn C++ you'll end up using a library of some description and it's good to learn to use them. Dark GDK I think is actually a nice start because it's actually quite simple to use and could potentially make learning C++ easier. I can't speak from experience because my progression of tools has been DBP -> C# -> C++ & Dark GDK, so I've found it very easy to get into with only a handle of new things to learn in order to make a working project as many of the programming concepts of C# translate into C++. I've not done it that way on purpose just to learn Dark GDK & C++, I've done it that way because I started out as a DBP user and wanted to challenge myself and try new things.

3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 14th Aug 2012 14:06 Edited at: 14th Aug 2012 19:10
About your question does it run faster a little faster not a hole lot faster. It is about the same speed both the programming languages. Some people still insist c++ is faster but your not going to know the difference unless it is a massive game.

Try to make a simple text based game first.
The commands you will use include dbtext.
The save commands.
A array for inventory
This may sound silly but making a text based game is actually the basis for a threed game.
graphics just dissplay visually what a text based game can't do.

Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.

Login to post a reply

Server time is: 2024-04-19 19:44:50
Your offset time is: 2024-04-19 19:44:50