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 / A Few Concerns about Multiplayer

Author
Message
bloodmage2
15
Years of Service
User Offline
Joined: 14th Jun 2009
Location:
Posted: 12th Jan 2010 21:47
A game i am working on has been chosen to attempt ours (small team of mine) to implement multiplayer. one issue i see is, that when looking through the documentation, there is nothing to differentiate between one game and another. with this in mind, do you have any ideas on how one could limit the discovery of games to only that of the game the user is playing? the best i could come up with is when a new player joins,
1. (client) send string to host
2. (host) check string to see if it matches, or if it is sent at all
3. (host) send string to client
4. (client) check string to see if it matches, or is sent at all
5. (host) if string does not match, boot player
6. (client) if string does not match, disconnect

but that relies on actually connecting. is there any way to do this without connecting?

-to the optimist, the glass is half full. to the pessimist, it is half empty, to the engineer, it is twice as big as it needs to be.
RanQor
17
Years of Service
User Offline
Joined: 8th Jun 2007
Location:
Posted: 12th Jan 2010 21:53 Edited at: 12th Jan 2010 21:57
If you're looking for no "connection" overhead, use UDP instead of TCP.

You would need to have a SessionKey to validate and keep track of the user.


1. (client) Sends validation string (usually a login username/password, could also include the game's ID/name)
2. (Server) Validates the user, then sends back a unique Session Token string
3. (client) Sends request/data, but also sends the Session Token to validate the UDP packet
4. (server) validates the Session Token, then sends response

Perhaps I'm not understanding your question completely though.
bloodmage2
15
Years of Service
User Offline
Joined: 14th Jun 2009
Location:
Posted: 12th Jan 2010 22:09
uhh, wut?

sorry if i sound uneducated, but i have no idea what tcp, udp, or a session key is.

-to the optimist, the glass is half full. to the pessimist, it is half empty, to the engineer, it is twice as big as it needs to be.
prasoc
15
Years of Service
User Offline
Joined: 8th Oct 2008
Location:
Posted: 12th Jan 2010 23:34
What you are trying to do is basic login, right? What you have to do is when the player connects, put him in a "purgatory" where he can't do anything until the server checks the string.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 12th Jan 2010 23:37
Are you using the DarkGDK multiplayer command set?
If so, I don't think many peolple use that.

Search for multisync, I think that comes with examples, you will need to know about tcp and udp before you do anything.

I also think your question is a little confusing, would you be able to re-phrase it?
Cuddle Bunniezzz 12
15
Years of Service
User Offline
Joined: 14th Jan 2009
Location: Buffalo, NY
Posted: 13th Jan 2010 01:55
You could also try using an encryption key (to encrypt the data). So that no other games could use the data sent from the client to the host.

http://www.darkgdk.us/ <- You can now submit pages, upload images, yet were lacking content. We need your help!
MACRO
21
Years of Service
User Offline
Joined: 10th Jun 2003
Location:
Posted: 13th Jan 2010 02:08
Also remember you are working in c++ so you have other networking options open to you for example...

RakNet (http://www.jenkinssoftware.com/) - Fully featured with commercial licencing options.
ZiodCom (http://www.zoidcom.com/) - Good feature set and free for non-commercial.
enet (http://enet.bespin.org/) - Lightweight with good licence . Free.
and others...

If you have a solid understanding of c++ concepts and what you want to achieve these libraries can be extremely powerful!

MACRO

Login to post a reply

Server time is: 2024-10-01 20:21:20
Your offset time is: 2024-10-01 20:21:20