I was thinking, which is the best way to use for multiplayer games... use sockets or one centralized server with a database and a table holding all the info (for example the x,y of the player etc) and the clients will always get that data.. i know it might be slower, but isn't that worth it.. because that way you will not have to design a server side, because the db will have everything, so you will concentrate on the client side only.. is that better or worse?
Network Gaming, use sockets or SQL?
Started by TcM, Oct 21 2009 04:42 AM
11 replies to this topic
#1
Posted 21 October 2009 - 04:42 AM
|
|
|
#2
Posted 21 October 2009 - 07:44 AM
I think it depends on the type of game. A lot of LAN games simply have a "master" client and a bunch of other clients. I'm thinking of StarCraft/WarCraft as an example. Other games lend themselves well to the Client/Server model.
#3
Posted 21 October 2009 - 02:45 PM
But do you think it will lag a lot because of the queries and such?
#4
Posted 21 October 2009 - 04:22 PM
It depends on the optimizations and size of the database. Network traffic is more likely to cause lag than DB access.
#5
Posted 21 October 2009 - 04:28 PM
So basically the DB approach is more feasible in most scenarios? Hmm.. good, I thought it was the other way round.
#6
Guest_Jordan_*
Posted 21 October 2009 - 04:45 PM
Guest_Jordan_*
I've found that client-to-client often lag more than client-to-server games. Many of the XBox 360 games (IE: Gears of War) use a client-to-client connection model. If the user that is the server suddenly starts downloading something on another device in the house, the entire game lags for everyone.
#7
Posted 21 October 2009 - 05:00 PM
Yeah, but you can still make a dedicated server client, and the clients connect to that.. to avoid the problem you are stating.
#8
Guest_Jordan_*
Posted 21 October 2009 - 05:24 PM
Guest_Jordan_*
You mean client-to-server or you mean make a player a server?
#9
Posted 21 October 2009 - 05:33 PM
Uhm, I forgot the exact terms, but one is the server software that 'listens' and the client is the one that will connect to that software... so in order to overcome your problem just make a dedicated server (hardware) as a server (using software)
#10
Posted 21 October 2009 - 11:00 PM
Keep scalability in mind. In a client-to-server model, the performance often depends on the server which can become expensive. However, in a peer-to-peer model, that cost is handed off to the client. If the software engineer is clever enough when designing the application layer protocol, one laggy peer should not effect the entire network.
#11
Posted 21 October 2009 - 11:05 PM
But what if the laggy peer is the server? What can you do bout that (except finding a better peer)?
#12
Posted 21 October 2009 - 11:16 PM
In a peer-to-peer model, we assume there are multiple peers. Every peer is both a server and a client. If one peer is slow, the software should find a faster one - which can be implemented in numerous ways. This is what a decent BitTorrent client usually does.


Sign In
Create Account


Back to top









