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 / DarkDGK 2.+; C++; Darknet Questions

Author
Message
Timidon
14
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 17th May 2013 03:23
Working with Visual Studio 10. I used a earilier version of darknet a few years back, now I am looking at working with the library again. So I am doing some upgrading. I got the plugin installed via compiler and engine as per instruction off of the DGK2.0 documentation (rebuilt the .dll). Looking for some working examples, not all the commands from mikenet have been wrapped into the library. So is there some working examples lurking about?

There are many answers but just one question" ~ Jerilith the Mad
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 17th May 2013 14:04 Edited at: 17th May 2013 14:05
Is DarkNet not entirely separate to DGDK 2.0?

Also - where are these instructions, couldn't find them anywhere.

[edit] tried installing DGDK 2.0 but says 'trial period expired', downloaded RC4 from website.

Timidon
14
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 18th May 2013 01:39 Edited at: 18th May 2013 02:41
Quote: "Is DarkNet not entirely separate to DGDK 2.0?"


Yes, from what I have seen, it can function without DarkDGK. I have had success from using this product before, just not recently, (compiler errors, the ide and compiler not being able to find the resources).

I have always had problems adding pluggins and additional resources into the IDE's and compilers. After watching the video, TGD have made it pretty easy to add the existing plugins into the game engine, with the build engine .dll, and compiled into one .dll. So I decided to give the library another try. I was thrilled after it got installed, and my idea could find commands again. So I started relearning the darknet code.

Quote: "Also - where are these instructions, couldn't find them anywhere. "


I am using the tutorial "how to use darkbasic pluggins" which also Darknet is referenced. I am using a licensed version of the darknet.

http://forum.thegamecreators.com/?m=forum_view&t=196868&b=22

After recompiling the engine, the command changes the Darknet commands from mm::start() to NET_start(), its just using a wrapper for the commands, but looks like some of the commands are missing.

I was tring to convert on of the tutorials off of the darknet website, by via replacing the mm:: with NET_ when some of the commands where not in the dgk header version.

One of the missing commands was CreateInstanceProfile(); I had to stop at this point. I could not port the example.

]![ As I am writing this I am figuring the person who is doing the wrapping for the Darknet may have a few more commands to add to the header for the pluggin. I also understand Darkdgk 2.0 is in beta (which is the way 1.0 always felt). TDG Team Keep plugging away at it. I also understand these folks do this part time.

[@] I figure I will see about installing Darknet without the plug in helper to the engine. I have always had trouble linking new .dll to the ide's and compilers (my lack of understanding). So I was very excited to see how TGD did this.

I have not used Darknet for a bit, I had it workign with the old 1.0 version, learning more about class's and the "using" commands.

]?[ Got a good turtorial on Installing Mikenet onto MsVisual C 2010?

Thanks for your work on it. Thanks for sticking aorund.

PS: This is the current header for ddgk_darknet.h pluggin 2.0 RC4, note: you still got to have the MikeNet.dll installed or the commands won't even show up, they get compiled into the engine.dll



I was looking for a C++ version of the CubeWorld. I can't seam to find my old version (was a few years ago and on another computer, thought I hada back up). So I was looking at trying to rewrite it.

I liked Mikenet because I could run a "Server" and a "Client" on the same system, I had one running for a while, until the game crashed on a memory leak, which I could not resolve - my bad.

There are many answers but just one question" ~ Jerilith the Mad
Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 18th May 2013 12:44
Don't use the DGDK 2 wrapper functions for DarkNET; it runs just fine on its own, all you would accomplish is to add unnecessary calling overheads and issues like what you are having where most but not all functionality gets properly wrapped up.

Quote: "I also understand Darkdgk 2.0 is in beta (which is the way 1.0 always felt). TDG Team Keep plugging away at it."

Sadly DGDK 2 was some kind of outsourced hobby project (it's actually supposed to be the latest version of PureGDK). For reasons unknown the sole developer haven't been seen for half a year or more and it's starting to look like abandonware :/

Quote: "I have always had trouble linking new .dll to the ide's and compilers (my lack of understanding)."

I know that feeling, I have just recently come to grips with resolving those 20+ pages of linker errors that always seem to arise when doing this in the last two years. The problem for the most part is that you need to include additional libraries and / or include them in a certain order for things to work.

I can't remember off the top of my head (Michael P should be able to answer it explicitly I figure though) but I think for DarkNET you simply include the .lib file found in <DarkNETRoot/lib> and the .h file (as an include) from <DarkNETRoot/includes>. I think it is required to also manually include WinSpool.h and Windows.h in your project in that order.


"Why do programmers get Halloween and Christmas mixed up?"
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 18th May 2013 19:50 Edited at: 18th May 2013 19:57
Agree with Rudolpho.

If you are using C++ I can't see a good reason to use this plugin interface that comes with DGDK 2.0. From my limited understanding the purpose of it is to combine other DLLs into a single DLL and to make DLLs work with PlayBasic?

Combining into a single DLL isn't very useful, and I would say is counter productive because you lose the ability to upgrade plugins without rebuilding.

I advise just using the libraries as Rudolpho said. This should be trivial, although occasionally people get linker errors if their project isn't setup properly. Also, there is an issue with order of includes, due to a bug (I think) in winsock includes. To solve you just have to include windows.h before or after DarkNet (I forget what the correct order is).

DarkNet comes with an installer which should do all the work for you. And it also comes with demo projects which work out of the box. You can get the demo projects here.

Quote: "I can't remember off the top of my head (Michael P should be able to answer it explicitly I figure though) but I think for DarkNET you simply include the .lib file found in <DarkNETRoot/lib> and the .h file (as an include) from <DarkNETRoot/includes>."

True, DarkNetRoot/includes/FullInclude.h - something like that I think, FullInclude.h is the header file you want. The header file should also include the correct libraries for you, but you may need to configure the project so that library directories point at the directory containing DarkNet libraries.

Quote: "I think it is required to also manually include WinSpool.h and Windows.h in your project in that order."

If you use FullInclude.h everything you need should be included so this shouldn't be necessary. But if you want to use windows.h (and probably other windows headers too like WinSpool.h) you might need to watch out for ordering as I mentioned earlier.

Rudolpho
13
Years of Service
User Offline
Joined: 28th Dec 2005
Location: Sweden
Posted: 18th May 2013 20:42
Quote: "From my limited understanding the purpose of it is to combine other DLLs into a single DLL and to make DLLs work with PlayBasic?"

I think the idea was that you could just rebuild that plugin yourself (there is a tool included for that; it supposely just packs them together) and as such it would always be as up-to-date as the DBP version you built it from.
Why they are combined into a single dll I'm not sure, supposedly to just have everything in one place. The resulting file probably contains some information about what PureGDK version built it and if you are a fully licensed user or if your plugin should be time-limited etc.


"Why do programmers get Halloween and Christmas mixed up?"
Timidon
14
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th May 2013 20:28 Edited at: 19th May 2013 20:30
Quote: "Combining into a single DLL isn't very useful, and I would say is counter productive because you lose the ability to upgrade plugins without rebuilding. "


It really was not hard rebuilding, drop your pluggin into one directory, drop your license in the other. hit the compile with plugs button, drop the new egine.dll into the directory where your program is. That was the apeal for me. BUT.. since not all the commands are present, making the turtorials work, there is a issue.


So it looks like I will be rebuilding the engine with the basic functions again and add the Darknet via the standard way. Well thanks for the input.

Quote: "Sadly DGDK 2 was some kind of outsourced hobby project (it's actually supposed to be the latest version of PureGDK). For reasons unknown the sole developer haven't been seen for half a year or more and it's starting to look like abandonware."


Thats not good, I just purchased the commercial version. I have always liked the Darkdgk library, mostly do this stuff on hobby basis anyway. Would be nice if TGD had more staff to do the additional work on it.

There are many answers but just one question" ~ Jerilith the Mad

Login to post a reply

Server time is: 2019-09-19 20:32:55
Your offset time is: 2019-09-19 20:32:55