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.

Author
Message
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 30th Mar 2009 14:00
A new plugin has been released today.

DarkNet is a multiplayer plugin specifically designed for use in game development. It uses both UDP and TCP protocol making it suitable for virtually any type of online game ranging from fast paced first person shooters to large scale massively multiplayer online games. It is very easy to use and well documented with several code examples. DarkNet is compatible with Dark Basic Professional, C++ and .NET compatible languages (e.g. C#, VB.NET).

For more details visit http://darkbasicpro.thegamecreators.com/?f=darknet
bergice
18
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 30th Mar 2009 15:04
You dont stop releasing stuff TGC

Good to have a official plugin for online for DBP ;D

NEW: Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40ghz 4gb ram 32-bit | OLD: 3.19GHz - 7600GT - 1GB - Windows XP
Visit my youtube profile: http://www.youtube.com/user/bergice1
KISTech
17
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Mar 2009 18:53
Ordered on the spot.

Fantastic plug-in.

AtomR
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Portugal
Posted: 30th Mar 2009 19:15
Sounds promissing and at a very afordable price. Just wondering how this mingles with green ear It probably doesn't.

KISTech, let us know how it is when u try it out

Take care
AtomR
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 30th Mar 2009 19:35
Ill be ordering soon. I have the money, but not the parent to buy it for me yet.

Your signature has been erased by a mod because it's larger than 600x120
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 30th Mar 2009 19:41
Looks interesting, but:

Quote: "Without DarkNet this would take hundreds of lines worth of complex code to create a basic server"


This is completely untrue, even using Winsock directly you can do a basic server in under 100(1 if you concatenate everything ), but if you used other libraries you could do anything in the same as this, or less.

mike5424
16
Years of Service
User Offline
Joined: 30th Mar 2009
Location:
Posted: 30th Mar 2009 20:13
hmmm..... seems good infact i like it cool

www.madninjas.co.nr we are mad and we are ninjas
Profit
19
Years of Service
User Offline
Joined: 19th Feb 2006
Location: United States
Posted: 30th Mar 2009 20:26 Edited at: 30th Mar 2009 20:27
What is the difference between "DarkNet" and "MikeNet"? (besides price)


Towfieee
19
Years of Service
User Offline
Joined: 5th Jun 2006
Location:
Posted: 30th Mar 2009 21:02
Sold
KISTech
17
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Mar 2009 22:03
@AtomR,

I've been using MikeNet for the last few months. It's been fantastic to work with. The commands are simple, and solid. I'll be able to pack 3-4 times as many players on my server using this over what I had before.

DarkNet, as I understand it, is the newer version of MikeNet. I think MikeNet is no longer free, and has been turned into DarkNet.

If you're doing any kind of multiplayer with DBPro, GDK, or GDK.Net, then you need DarkNet. It's well worth the price.

Todd Riggins
20
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 30th Mar 2009 22:38 Edited at: 30th Mar 2009 22:41
Would I be able to use MD5 encryption?
Would I be able to create secure logins?

If so, does the above two questions have built in functionality in DarkNet to create in a few simple lines? Or will I have to be a network programming wizard to figure that out?

I know RakNet has this capabilities I want, but I'm a noob to all this networking stuff. I would like to have these capabilites because of an online venture that deals with MMO's and not having to deal with finding your own server to host them on. I would like to help bring that option to the TGC community.

Current Specs: Intel Core2Quad 2.66 GHz, 8 GB RAM, NVidia Geforce 9800 GX2, Vista Ultimate 64-bit
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 30th Mar 2009 22:51
Yep, MikeNet does support encryption. So you can have secure logins.

Your signature has been erased by a mod because it's larger than 600x120
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 31st Mar 2009 01:22
Quote: "Looks interesting, but:

Quote: "Without DarkNet this would take hundreds of lines worth of complex code to create a basic server"

This is completely untrue, even using Winsock directly you can do a basic server in under 100(1 if you concatenate everything ), but if you used other libraries you could do anything in the same as this, or less."

If you include code for connection management, TCP data management and support for clients behind a NAT enabled router you are already at several hundred lines of code. The only additional libraries used by DarkNet are Winsock and the Microsoft Universal Plug and Play interface.

Quote: "Just wondering how this mingles with green ear It probably doesn't."

I'm not sure but in theory it shouldn't interfere with green ear so long as you use different ports.

Quote: "What is the difference between "DarkNet" and "MikeNet"? (besides price)"

They are the same thing. The last version of MikeNet that was available for free was v1.1.1, DarkNet is v1.1.2 of MikeNet. MikeNet is no longer available for free. You can use the names DarkNet and MikeNet interchangeably, the plugin has a central thread here which contains a little more information.

Quote: "Would I be able to use MD5 encryption?
Would I be able to create secure logins?"

You can use MD5 by directly manipulating the contents of a packet by using mnGetString and mnAddString to first get the contents of the packet, then encrypt it and then put it back into the packet again.

DarkNet has in built encryption/decryption functions which use the Advanced Encryption Standard. These are easy to use and so you may prefer to use them. It is simply a case of using mnEncrypt on the sending end and mnDecrypt on the receiving end.
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 31st Mar 2009 02:12
Congratulations on getting this sold by TGC, you deserve it! *gritted teeth*

Quote: "If you include code for connection management, TCP data management and support for clients behind a NAT enabled router you are already at several hundred lines of code."

Well, it depends on your definition of a basic server I guess.

Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 31st Mar 2009 19:41
Quote: "Congratulations on getting this sold by TGC, you deserve it! *gritted teeth* "

Cheers

TechLord
22
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 1st Apr 2009 04:21 Edited at: 1st Apr 2009 04:57
I'm very interested in Network Lib that has features to compensate for network lag specifically for twitch action games i.e: Dead Reckoning, Prediction, smoothing algorithms. I did not notice such features listed for DarkNet. Are they available?

jasonhtml
21
Years of Service
User Offline
Joined: 20th Mar 2004
Location: OC, California, USA
Posted: 1st Apr 2009 04:39
Quote: "Congratulations on getting this sold by TGC, you deserve it! *gritted teeth*"


don't worry benjamin, i still use multisync! at the moment i don't have a reason to switch... the only things DarkNet has over MulitSync is encryption, UDP, multiple instancing, multi-threading, and broadcasting.

has anyone compared multisync to darknet speed-wise?

C0wbox
19
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 1st Apr 2009 16:38 Edited at: 1st Apr 2009 16:49
EDIT:
Nevermind, replaced what I wrote with:
I bought it and intend to put it to good use
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 1st Apr 2009 17:50 Edited at: 10th Apr 2009 11:47
Quote: "I'm very interested in Network Lib that has features to compensate for network lag specifically for twitch action games i.e: Dead Reckoning, Prediction, smoothing algorithms. I did not notice such features listed for DarkNet. Are they available?"


DarkNet does not include a set of commands to do this. However, DarkNet supports UDP which is ideal for quickly sending/receiving updates to player positions and angles.

Take a look at the attached demo (advanced cube world.exe). Player positions are updated each time a new packet is received, based on data contained within the packet. There is no movement smoothing or prediction and despite this the movement is still smooth due to the large number of UDP packets being quickly transferred.

KISTech
17
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 1st Apr 2009 18:37
Quote: "has anyone compared multisync to darknet speed-wise?"


As far as TCP I think they are close. DarkNet may be a bit faster. I used Multisync for quite a while and it worked ok, but not having UDP was going to limit my game to about 25-50 players.

Now that I'm using DarkNet and UDP, I suspect (haven't been able to test it yet) that I'll be able to handle up to 100 players. Once I've got the beta a little more stable and performance tuned, I need to organize a stress test. It will be interesting to see how much it can handle.

TechLord
22
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 2nd Apr 2009 04:06 Edited at: 6th Apr 2009 06:57
Hi Michael P,

Thanks for the reply. Yes, the advanced cube world.exe runs fantastic locally, however, I would like to connect to remote host to really test it over the internet.

I've written a Server/Client with TCP/UDP using Ian M's Matrix1 Util #28. It handles HTTP, FTP, and I'm preping to use SIP/SIMPLE, and my own flavor of a RealTime Protocol.

I'm developing a FPS MMORPG upto 512 players per server and I'm fairly certain Dead Reckoning, Prediction, and Smoothing Algos will come into play. I'm simply too lazy to code it and would rather purchase a Net Lib with most likely better coded, higher performance algos.

Heck if there was a Black Box Lib just for adding these features to my existing Net Lib I would be the first in line to purchase it.

Towfieee
19
Years of Service
User Offline
Joined: 5th Jun 2006
Location:
Posted: 2nd Apr 2009 13:21
HINT: I think the documentations needs to be improved a little. It has a "command list" but the examples are what teach us how to use them really.

And thanks in advance.
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 2nd Apr 2009 17:59
There are several examples which cover most of the DarkNet commands; there are versions of these written in DBP, C++, C# and VB.NET. The PDF (DarkNet General Information.pdf) details some of the more complex parts of DarkNet such as UDP modes.

Using a combination of the examples and the documentation, you should find it fairly easy to use DarkNet. If you have any problems with DarkNet I am happy to help you debug them

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 2nd Apr 2009 20:22 Edited at: 2nd Apr 2009 20:23
Other than threading etc. does DarkNet do anything of use internally in regards to send/receive frequency? (e.g. limiting throughput to a sensible amount and queuing) Or is that an exercise left to the user of the plugin?

Also, considering networking is inherently timing-based, surely using this with C++ (with its "complex threading model") makes for a debugging nightmare?

EDIT: On top of those questions, surely using MS UPnP makes this completely useless to cross-platform use with C++?


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 2nd Apr 2009 20:48
I doubt that this will run on anything but windows anyway. It uses Winsock.

Your signature has been erased by a mod because it's larger than 600x120
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 2nd Apr 2009 21:21
Winsock is very similar/identical to standard sockets used on UNIX/Linux, barring a few event related async routines.

That said though, it uses threading, so unless it uses pthreads (extremely unlikely) platform neutrality is out of the window any way


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 2nd Apr 2009 21:33
Quote: "Winsock is very similar/identical to standard sockets used on UNIX/Linux, barring a few event related async routines."

Right, but these 'few' routines dictate the entire structure of the server, so it's not like we're talking a few minor changes here and there.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 2nd Apr 2009 22:04
He will also have to change the Winsock lib files to the UNIX/Linux ones, and rewrite alot of code.

Your signature has been erased by a mod because it's larger than 600x120
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 3rd Apr 2009 01:18
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 3rd Apr 2009 01:30 Edited at: 3rd Apr 2009 01:31
Quote: "Other than threading etc. does DarkNet do anything of use internally in regards to send/receive frequency? (e.g. limiting throughput to a sensible amount and queuing) Or is that an exercise left to the user of the plugin?"

It is left to the user of the plugin, DarkNet will transfer as much as it can as quickly as possible.

Quote: "Also, considering networking is inherently timing-based, surely using this with C++ (with its "complex threading model") makes for a debugging nightmare?"

DarkNet can be a pain to debug, but so can bugs in any code. To aid debugging and bug finding the code is well commented and well structured. As well as this, the error reporting system provides detailed information to help determine the cause.

Quote: "I doubt that this will run on anything but windows anyway. It uses Winsock."

Correct, DarkNet is designed solely for windows.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 3rd Apr 2009 11:01
Seems cool. I'm already sold to Multisync though, unfortunately.

NightX
16
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 3rd Apr 2009 15:44
Im a noob at this stuff and dont know much about it but do you need to run your progam over internet throught your website?? if yes, how??

thanks
Omen
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 3rd Apr 2009 16:33
Bought it.

I've been using IanM's Matrix Utils for my UDP needs for World of OMEN, the multi-threading capabilities of DarkNET should give me yet another big performance boost.

KISTech
17
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Apr 2009 18:15
@Uncle Sam,

Multisync is great. If it meets the needs of your game, there's no reason to switch.

If your game is the type that requires fast updates of other player's movements, or other time sensitive data, then UDP gives a huge performance boost.

It all depends on the requirements of the game. I started mine with Multisync and it worked fine. My game outgrew it's capabilities as a TCP only library though.

@Benjamin,

You're still listed in the credits, because I learned so much using Multisync.

David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 3rd Apr 2009 19:25 Edited at: 3rd Apr 2009 19:28
Quote: "Right, but these 'few' routines dictate the entire structure of the server, so it's not like we're talking a few minor changes here and there"


That completely depends upon how you design the code. You're not forced to use the event or async routines - the basic UNIX/BSD style functions suffice

Quote: "He will also have to change the Winsock lib files to the UNIX/Linux ones, and rewrite alot of code."


Nah, because socket and its associated types are primitives in UNIX like OSes. But it's irrelevant any way, considering it uses UPnP and threading in a Windows-centric manner.


09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 3rd Apr 2009 20:34
Quote: "You're not forced to use the event or async routines - the basic UNIX/BSD style functions suffice"

They 'suffice' but for larger scale applications they aren't very efficient. Anyway, this conversation isn't exactly the point of this thread...

Quote: "You're still listed in the credits, because I learned so much using Multisync."

Thanks, that's nice.

EdzUp
22
Years of Service
User Offline
Joined: 8th Sep 2002
Location: UK
Posted: 6th Apr 2009 01:03
Is this a wrapper for DBPro's commands or seperate stuff

-EdzUp
Valle
19
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 6th Apr 2009 01:40
This sounds great!


Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 6th Apr 2009 15:20
Quote: "Is this a wrapper for DBPro's commands or seperate stuff"

This is separate and uses winsock, it doesn't use any DBP/DarkGDK specific things so the .NET and C++ version can work without DarkGDK.

C0wbox
19
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 7th Apr 2009 00:34 Edited at: 7th Apr 2009 00:36
Well, we're stumped.

I bought DarkNet, thinking it would be better than the DBP commands, but I can't host something as simple as Cube World (in the demos) and have someone join me.

Yet, we can get original DBP net applications working.

Our method for getting the original DBP applications working is via Hamachi (VPN (Virtual Private Network)) and we just enter the mask IP of the host (me).

But with DarkNet, nothing we tried would work: Blobby 101 was just sat there timing out and getting "no servers" returned on the Advanced version of Cube World as he tried to connect to me. (First using just the ordinary net then using Hamachi.) Nothing worked.

What are we doing wrong? - Can someone give us guidance as to how we should go about actually using this plugin for playing across the net?
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 7th Apr 2009 13:22
If you run the application twice on the same computer, host a server and connect to it then are you able to connect? If so then it is unlikely to be a bug in DarkNet. If you want the application to work through Hamachi then you need to select Hamachi's local IP when starting the cube world demo.

I haven't tested DarkNet through hamachi so it is possible that it is not compatible; I will get back to you on that. DarkNet does definitely work over the internet as I have tested this and there are projects on these forums that use DarkNet successfully over the internet.

The problem could be due to: router configuration i.e. you may need to setup port forwarding, or firewall configuration i.e. it may be blocking DarkNet.

C0wbox
19
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 7th Apr 2009 15:05
@ Michael P
Yeh, I first tested it with the server and clients open on my computer.

It could very well be that Hamachi isn't compatable with DarkNet, in which case, it does make sense that nothing we tried worked (as I know the port I was using isn't open, and I'm behind a router).

Do you know if there is a way to make DarkNet compatable with Hamachi? - As that would greatly aid our testing procedure (as it means I can host our projects, rather than relying on one of the people on our team to open their ports and do it for me).
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 7th Apr 2009 21:06
I can confirm that DarkNet has problems with Hamachi, I have the same problems you are experiencing. I don't know why this is but since DarkNet works fine on normal LAN's and over the internet I would suggest that it is a bug in Hamachi or a Hamachi configuration issue.

Quote: " As that would greatly aid our testing procedure (as it means I can host our projects, rather than relying on one of the people on our team to open their ports and do it for me)"

If you setup port forwarding (both UDP and TCP) then you should be able to host a server even though you are behind a router.

If you are unable to directly configure port forwarding on your router then you could use DarkNet Universal Plug and Play (UPnP) which allows you to programatically setup port forwarding on your router. You may need to enable UPnP on your computer, and possibly your router, but normally routers have UPnP default enabled.

Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 7th Apr 2009 21:28 Edited at: 7th Apr 2009 21:29
I haven't used DarkNet/MikeNet myself so I'm not sure how it works under the hood, but I assume the network interface is automatically picked? If so this would be why Hamachi doesn't want to work.

Quote: "but normally routers have UPnP default enabled"

I wouldn't have thought so, as shipping routers with UPnP enabled brings about a potential security flaw. I may be wrong though...

Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 7th Apr 2009 21:51
Quote: "I haven't used DarkNet/MikeNet myself so I'm not sure how it works under the hood, but I assume the network interface is automatically picked? If so this would be why Hamachi doesn't want to work."

It does automatically pick the network interface by default, but you can use mnSetLocal to change it, as is done at the start of the advanced cube world demo based on user input.

Quote: "I wouldn't have thought so, as shipping routers with UPnP enabled brings about a potential security flaw."

I wouldn't have thought so either, but I've tested UPnP on several different routers that all had UPnP enabled by default which lead me to that assumption.

C0wbox
19
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 7th Apr 2009 22:06
So what you're saying is that either way, I need to forward a port somehow (either manually or via UPnP) to host using DarkNet without Hamachi?

And are you saying that Hamachi doesn't work under most circumstances with DarkNet because of the automaticly choosing a network interface, but I could set it to something else with mnsetlocal and it may work with Hamachi then?
Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 7th Apr 2009 22:09
Quote: "So what you're saying is that either way, I need to forward a port somehow (either manually or via UPnP) to host using DarkNet without Hamachi?"

Yes (if you are behind a router).

Quote: "And are you saying that Hamachi doesn't work under most circumstances with DarkNet because of the automaticly choosing a network interface, but I could set it to something else with mnsetlocal and it may work with Hamachi then?"

No, it is not because of this. Based on my tests, even with the correct interface selected DarkNet still does not work with Hamachi. I'm not sure why it doesn't work but will look into it .

C0wbox
19
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 7th Apr 2009 22:34
@ Michael P
Quote: "will look into it"

thanks, I did like what I saw when I bought DarkNet, and figured it would be perfect for our project. So I do intend to use it in the final version (which should theoretically run on a server) but for testing purposes, we really don't have any other option than Hamachi when we want to quickly check if some online part of the project works or not with other testers.

KISTech
17
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th Apr 2009 23:43
I've run across a problem concerning threads.

I use mn Start(1, 0) on a Core 2 Duo 3.16 GHz system and then
print to the screen "mn Start : "+str$(mn Get Threads())+" threads started."

It reports starting only 1 thread.

Michael P
19
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 8th Apr 2009 12:50 Edited at: 9th Apr 2009 01:45
Quote: "I've run across a problem concerning threads.

I use mn Start(1, 0) on a Core 2 Duo 3.16 GHz system and then
print to the screen "mn Start : "+str$(mn Get Threads())+" threads started."

It reports starting only 1 thread."

In this case mnStart uses mnGetPhysicalCPU to determine how many threads to create. I will run some tests on mnGetPhysicalCPU to see if this is a one off incompatibility. mnGetLogicalCPU should work so you can use mn Start(1,mn Get Logical CPU()) to get the desired results.

[edit]
I can confirm that there is a problem with mnGetPhysicalCPU. I have fixed this for the next version

Login to post a reply

Server time is: 2025-08-08 18:33:38
Your offset time is: 2025-08-08 18:33:38