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 / Networking

Author
Message
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 22nd Apr 2008 01:43
I know this is probably simple, but how do I do it? I know all the functions and commands for it, and how to find them, but how do I pick who hosts it and everything? Is it possible to have a permanent server?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Apr 2008 04:58
First - Don't bother with Direct Play Internet - GDK native IP stuff... Try Benjamin's Multisync lib or use windows Sockets Directly. there is some other package I hear about - ratnet or some thing... but Multisync I'm a fan of just because of the good reports I've heard about it and WinSock is good if you want to go straight to the OS.

Core2uu
16
Years of Service
User Offline
Joined: 15th Mar 2008
Location: Saskatoon, SK, Canada
Posted: 22nd Apr 2008 05:02
So does the GDK networking not work that well?

~~Core2uu~~
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 22nd Apr 2008 05:57
I'm doing an MMOFPS/RPG type game, so I need a permanent server. Does this stuff support large-scale permanent servers?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 22nd Apr 2008 06:21
It's the same as the basic networking in DBPro, which is ok for a few players but isn't meant for heavy lifting.

If you're making something that you want to support up to 100 players then Multisync is a breeze to use, and it's very reliable. If you need more than that, you'll want to go directly to using Winsock yourself and use a combination of TCP and UDP connections.

Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 22nd Apr 2008 09:32
Quote: "If you're making something that you want to support up to 100 players then Multisync"


Out of interest, does multisync have an in built limit of 100 or is this just a general number that we would guess things will start to slow down?
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 22nd Apr 2008 18:00
Multisync may support more than that, but to support a major amount of players (100+) you'll probably want something coded in C++.

Multisync is TCP only, which means all packets are guaranteed to arrive, and in the correct order. It makes it easier for you as a programmer because all of the error handling is done for you. It makes it difficult because one guy with a bad connection can slow down the entire server.

The ultimate solution (IMHO) would be to use the RakNet library. This gives you TCP for packets that need to be guaranteed, and UDP for less critical stuff. It also provides encryption, compression, and some other things that make it really nice for this sort of thing. If it can be used with GDK for your client, and incorporated into a straight C++ project for your server, that would be able to handle whatever you want to throw at it.

@jason - "ratnet" ??

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 22nd Apr 2008 18:22
Thanks, everyone. I'll look at Multisync. I guess I could just do a couple different universes.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Apr 2008 22:13
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Apr 2008 01:13
Quote: "I guess I could just do a couple different universes. "


You mean like WoW's "Realms"??

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 23rd Apr 2008 01:33
Kind of. If you want to see what I'm aiming for, theres another game which just happens to be like the one I'm working on, though it doesn't do 'out of your ship, walking around' type stuff:

http://infinity-universe.com/

No, I did not copy it. I found out about it AFTER I came up with the idea for my game.

My game is going to be named 'Void Galaxy', but that might change. I'm not too sure if its 'cool' enough.
Michael P
18
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 23rd Apr 2008 09:27
That sounds like eve online . If you are new to programming and/or networking then I wouldn't try and make an MMO just yet. Pretty much everyone's dream is to make an MMO but everybody fails if they attempt this with no experience. If you really want to make an MMO then you should learn some advanced networking using the winsock libraries; multisync just isn't powerful enough for an MMO. If I were you, I'd start with a smaller game to gain some experience.

Winsock 2.0 link:
http://msdn2.microsoft.com/en-us/library/ms740673(VS.85).aspx
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Apr 2008 19:45
I'm not saying Michael P is wrong, but the project I'm working on right now is also a space based MMORPG. For the moment I'm using DBPro with MultiSync for both the client and server. It will be scalable up to a point with the server architecture I have in mind.

The basic idea is a Master server, and several secondary servers. All the servers have their own connection to the MySQL database for READ only access. The secondary servers connect to the Master server as special clients and relay their information about their client connections, and any information that needs to be updated in the database. The Master server accepts client connection requests, and then directs the client to the secondary server with the fewest connections providing load balancing.

So the Master server is the only one able to WRITE to the database, solving any problems with multiple WRITE requests. It also relays any information it receives from one secondary server to all the other secondary servers. The secondary servers will only send the updates to the clients if that information pertains to something within a certain distance of them, so unneeded information isn't transmitted.

There is of course a point where this configuration will become saturated, but it should be able to support a few hundred clients. As long as they don't all arrive in the same town at the same time.

Spindiggy
16
Years of Service
User Offline
Joined: 22nd Apr 2008
Location:
Posted: 23rd Apr 2008 21:13
Hello,

Since DarkGDK seems to really be nothing more than a DirectX Wrapper, why not use some other standard C++ networking library?

Rakknet is great for large scale client / server games. It's not meant for running clients / servers on the same computer but you may want to check it out. http://www.jenkinssoftware.com/

If you need networking simular to Quake 3/4 style games, check out openTNL. http://www.opentnl.org/

Chris
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 23rd Apr 2008 21:28
@KISTech - FYI in case you aren't aware. MySQL has a VERY slick way to keep multiple databases in sync, so you could in theory maybe get a bit more load off that main server. The way it works is in a replication set up, one server tells the next of a record to update, then that server tells the next etc etc until it goes full circle and arriaves back at the "record origin" server who recognizes the message and stops the chain. Efectively... you can have 100 servers all reading and writing and they will not be all that lagged!

The really cool thing I like about mysql is that the way the logs are done, you can "REPLAY" them to get a server "Caught up" if it went offline for any reason.

Kinda neat. MySql is really cool IMHO.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 23rd Apr 2008 22:53
@Jason,

Yeah I was weighing the benefits of MySQL and MS SQL when I started this. My database background has always been MS SQL tying web applications (using IIS) with the database, but my wife told me that everything they're using in her section at work is MySQL and I'll get MUCH better performance out of it.

I'm really looking forward to getting this first public Alpha done. I can't wait to see what it will do with a few dozen clients. Hopefully others will find it as fun as I'm hoping it will be.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Apr 2008 00:57
I get into some MS "brawls" with the MS zealots - (usually because they don't really listen to me) BUT this is one of those "BASH JASON opening... Ready?

Not only is MySQL FASTER.. but .. SOMETIMES.. running a few versions back with the right MYODBC connector, or better still the DIRECT to MYSQL DLL - will BLOW the DOORS off the newer stuff.. its a game - not a financial institution you know? The older versions are simply leaner and usually faster. Just worth benchmarking.

your wife might say - yeah thats true but the newer version has a faster replication.. then go for that! Whatever can work best for ya you know!?!?! LOL Good Luck! I'm routing for you on this one bro!

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 24th Apr 2008 01:01
I know how to do pretty much everything but the actual online part. Maybe someone could join my team and do it for me?

I don't need an oven to make my cookies.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 24th Apr 2008 03:16
If you know how to do everything else, even pretty much, then the networking should be very simple. Just take a look at the MultiSync demos. Unless of course you want to access Winsock directly.

I've not gotten into the guts of that. Probably never will. Version 2 of my stuff will probably be written in C++ using RakNet.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Apr 2008 03:44
It's worth the challenge - I recommend Winsock becuase its direct
The only thing I would recommend OVER winsock is an API that is cross platform so once you write your networking code - its in stone more or less.

Of course - if you aren't interested in the mechanics of it all, MultiSync or RakNet will be just fine!

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 24th Apr 2008 03:49
So, from what I've seen, this is true?

Normal direct networking packaged with Dark GDK is crap.
MultiSync is okay for servers under 100 players.
RakNet can handle a little bit more.
WinSock stuff can handle... how much?

Is this stuff free?

I don't need an oven to make my cookies.
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 24th Apr 2008 03:57
There was something else I was worrying about, too.

Are the Dark GDK commands and stuff (like camera movement) all client local? Could they interfere with other users?

I don't need an oven to make my cookies.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Apr 2008 04:11
Winsock = Windows Operating System Networking Interface... not free.. but you already paid for it when you got your operating system.

(Headers for it are free in Platform SDK, downloadable from Microsoft.)

FRankly, MultiSync, RakNet and WinSock... PROBABLY can do more than 100... depending on hardware. FRANKLY... 100 simultaneous connections is a lot of work for ANY SOFTWARE... and hardware. You need to start thinking powerful hardware... Or how to break it up so you have multiple servers handling "some of" the load to share the work as it were.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Apr 2008 04:11

Login to post a reply

Server time is: 2024-09-29 17:25:20
Your offset time is: 2024-09-29 17:25:20