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.

DarkBASIC Professional Discussion / Is the Dark Net plugin worth it?

Author
Message
Alaror
15
Years of Service
User Offline
Joined: 9th May 2011
Location:
Posted: 28th Feb 2012 16:21
Hey all, I'm trying my hand at multiplayer this week and have found the Dark Net multiplayer plugin. For those that have used it, what benefits does the plugin provide compared to using the default commands that come with DarkBasic Pro? The idea right now is to have a player host a game on their computer for 2-4 players.

Please keep in mind that I know virtually nothing on the subject of multiplayer.

MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 28th Feb 2012 17:47
I would say give the internal system a go and then buy DN I have it... just because I want the functionality of nNumber of users with virtually no restrictions...

Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 28th Feb 2012 18:17
can't say i've used darknet but A LOT of people on here use multisync or one of the other 3rd party plugins. I've found multisync to work great once you understand how it works
JRNTexas
15
Years of Service
User Offline
Joined: 24th May 2011
Location: Austin, Texas
Posted: 28th Feb 2012 18:49
I've used it quite a bit and it's flawless.

I've been writing a two player space shooter game (although it supports multiple players), using darkNet to do the communications. The only problems I've had have been caused by me, not darkNet.

If you take the demo that comes with the package and expand on it, you will be way ahead of the game (pun intended).
Alaror
15
Years of Service
User Offline
Joined: 9th May 2011
Location:
Posted: 29th Feb 2012 01:16
Thanks for the feedback everyone. I'll probably try my hand with the default commands that come with DBP. I've started another topic looking for direction and input on what I'm trying to achieve if anyone's interested in giving their two cents.

Thanks again!

Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 29th Feb 2012 05:41
had a quick look over the inbuilt commands (again i've never actually used them in practise) and the only major problem I can spot is no ability to specify port number? this is crucial over the internet, as hosts must forward a port. If it's predefined ok not so bad but what is it? if it's random, forget the idea completely

Additionally it doesn't have much documentation on how it actually works. For instance is it TCP or UDP? packet size? in a client/server scenario, when a client specifies to send to another client, does the server automatically forward this data or do clients need to send to the server, and the server manually forwards the information on? if it's automatic, does the server also receive these messages in the queue?

I'm inclined to think that multisync and other 3rd party multiplayer commands were created for dbpro, because the build in system isn't as efficient as it should be. I've never used the dbpro ones, but my experience with db classic showed the built in commands were not 100% reliable and not as fast or efficient. Sometimes jittery even over a LAN connection
Alaror
15
Years of Service
User Offline
Joined: 9th May 2011
Location:
Posted: 29th Feb 2012 17:42
Those are some great points. I've looked into Multisync and it seems to be simpler to understand and well documented. I've switched to that for the time being

basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 2nd Mar 2012 03:48
multisync plugging uses TCP commands only. this is not desireable for multiplayers games.
multiplayer games use UDP commands because it is faster to implement and sent by the system.

Quote: "I've looked into Multisync and it seems to be simpler to understand and well documented. I've switched to that for the time being"

I think (politely) you don't know anything about networking. so,spend some times understanding Darknet because it's the best.

before reading, have a look into the meaning of TCP and UDP.

Quote: "I can spot is no ability to specify port number"

this is a technical issue. usually LAN players don't have many busy ports. so any port will do the job. if you have a server (busy one), then you have to look for the free port manually. don't worry much as you have 65535 ports. simple software can configure that.
Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 2nd Mar 2012 06:01 Edited at: 2nd Mar 2012 06:02


Not entirely accurate my good sir.

Game's typically use UDP where data is not important, such as unit position, since it's updated constantly anyway a few lost packets don't matter
And they use TCP for crucial data that MUST be there and must occur within order, such as text messages, death events, event triggers, damage dealt, player/ai spawned etc

It is significantly less efficient when using UDP to handle these events, as you need to check timestamps and manually order them (no good receiving an event trigger 10ms before the players death trigger, if they were supposed to die first, preventing the event)
And especially when losing game critical events, such as a player dying. If that player didn't receive their death notice, they could still be running around killing people. If the packets never arrive there's no way the client knows it should happen, and must periodically check with the server what has been happening and what it has received
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 2nd Mar 2012 12:24
I agree with what you said but, when the player is dying the computer will send a single TCP message. but position, shooting and current event better off with UDP.
Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 2nd Mar 2012 18:42
right but to say that TCP is not suitable for multiplayer games is not accurate. Very few games 'only' use UDP, the majority use both UDP and TCP. There is nothing really wrong with using only TCP, it does induce some slight overheads but until you are comfortable in dealing with reliable and ordered packets, it's probably better not to dive solely into unreliable unordered packets.

The biggest problem is ordering, ping's fluctuate and UDP packets can arrive out of order, if this is happening then it would cause a massive headache to a new programmer. And as I mentioned it actually requires a lot more overhead to keep them in check, therefore TCP is preferable, and UDP can be implemented later on to optimise
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 2nd Mar 2012 19:04
ordering wouldn't be a problem as a single UDP message is sent every loop. so, you're expecting 30 to 60 messages every second and this is the secret of udp is that you're able to send plenty of messages while the player have moved very few units.
Millenium7
21
Years of Service
User Offline
Joined: 13th Dec 2004
Location:
Posted: 2nd Mar 2012 20:45
30 to 60 sets of packets per second, those packets can still arrive out of order. The message is not necessarily sent as a single packet

Login to post a reply

Server time is: 2026-07-10 12:34:22
Your offset time is: 2026-07-10 12:34:22