[gameprogrammer] Re: Multiplayer networking advice
- From: Shaun Simpson <shaun_simpson_@xxxxxxxxxxx>
- To: <gameprogrammer@xxxxxxxxxxxxx>
- Date: Mon, 28 Jan 2008 09:10:43 +0000
Hey Taylor,
For the network low level side, you may wish to have a look at the samples and
documentation listed in the links below, they are not game oriented but give
you an indication of how to implement a multithreaded server and client in c,
for establishing a TCP or UDP connection ( as talked about by Alan). The site
is based about Winsock v1.1 and v2 which as far as i am aware only work on a
windows based operating system. However, it is designed to operate in a similar
manor to Berkeley sockets which are "standard".
http://www.sockaddr.com
http://www.sockaddr.com/ExampleSourceCode.html
( in particular stream.zip, which looks at a very simple server client system
and HTTPmt.zip demonstrating a multithreaded server)
If you have any further specific queries feel free to fire them my way. i have
worked with both berkeley and winsock sockets before.
Best regards,
Shaun
> Subject: [gameprogrammer] Re: Multiplayer networking advice> From:
> greyhill@xxxxxxxxx> To: gameprogrammer@xxxxxxxxxxxxx> Date: Mon, 28 Jan 2008
> 00:40:43 -0500> > If you're just starting with C/C++ databases, you might
> want to take a> look at SQLite ( http://www.sqlite.org/ ). It's really fast,
> not hard> to use, and doesn't require an extra daemon/lots of configuration.>
> > On Sun, 2008-01-27 at 21:33 -0500, Taylor Peterson wrote:> > > Would this
> be for security reasons, to know what IP's have logged in> > > for each
> account? If you know how to use a database (or feel like you> > > want to
> try!) that may be a good place to log the ip address info> > > since it
> handles the storage in memory / to files issue for you. You> > > could also
> store login information and even maybe player data in the> > > database
> tables, which would give you a neat interface to be able to> > > quickly
> update or search through your data.> > > > Well.. I meant to keep a list of
> IPs to send data too with it. Like> > whenever data is sent, the server looks
> at that list then sends the> > data to each IP on that list. But I see what
> your saying with> > threads, although my knowledge of threads is a bit
> limited; I'm heard> > of them but have not really gotten into using them.> >
> > > I know databases, but I've never used them with c or c++ only php.> > > >
> So I guess I'll go into looking up threads.> > > > On Jan 27, 2008 8:07 PM,
> Chris Nystrom <cnystrom@xxxxxxxxx> wrote:> > >> > > On Jan 27, 2008 6:56 PM,
> Alan Wolfe <alan.wolfe@xxxxxxxxx> wrote:> > > >> > >> > > > TCP/IP vs UDP> >
> > >> > > > If you don't know the difference between TCP/IP and UDP, TCP/IP
> is> > > > reliable transmisions while UDP is not necesarily reliable, but is
> a> > > > lot faster with less overhead. If you have things in your game that>
> > > > if the information doesn't get to the player on a rare basis you'd be>
> > > > ok with it, you might want to check out using UDP for those thing, and>
> > > > using TCP/IP for the things that really really matter. You can> > > >
> squeeze a lot more network preformance out of your game that way.> > >> > > I
> have found that UDP is a little more difficult to work with. I think> > >
> going straight to UDP might be a premature optimization. I suggest> > >
> keeping it simple and start with TCP and then if you have performance> > >
> issues, try UDP to see if it helps.> > >> > > Chris> > >> > >> > >> > >> > >
> ---------------------> > > To unsubscribe go to
> http://gameprogrammer.com/mailinglist.html> > >> > >> > >> > > > > > > > >
> ---------------------> To unsubscribe go to
> http://gameprogrammer.com/mailinglist.html> >
_________________________________________________________________
Free games, great prizes - get gaming at Gamesbox.
http://www.searchgamesbox.com
- References:
- [gameprogrammer] Multiplayer networking advice
- From: Taylor Peterson
- [gameprogrammer] Re: Multiplayer networking advice
- From: Alan Wolfe
- [gameprogrammer] Re: Multiplayer networking advice
- From: Taylor Peterson
- [gameprogrammer] Re: Multiplayer networking advice
- From: Alan Wolfe
- [gameprogrammer] Re: Multiplayer networking advice
- From: Chris Nystrom
- [gameprogrammer] Re: Multiplayer networking advice
- From: Taylor Peterson
- [gameprogrammer] Re: Multiplayer networking advice
- From: Madison McGaffin
Other related posts:
- » [gameprogrammer] Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- » [gameprogrammer] Re: Multiplayer networking advice
- [gameprogrammer] Multiplayer networking advice
- From: Taylor Peterson
- [gameprogrammer] Re: Multiplayer networking advice
- From: Alan Wolfe
- [gameprogrammer] Re: Multiplayer networking advice
- From: Taylor Peterson
- [gameprogrammer] Re: Multiplayer networking advice
- From: Alan Wolfe
- [gameprogrammer] Re: Multiplayer networking advice
- From: Chris Nystrom
- [gameprogrammer] Re: Multiplayer networking advice
- From: Taylor Peterson
- [gameprogrammer] Re: Multiplayer networking advice
- From: Madison McGaffin