[gameprogrammer] Re: Networking for games
- From: Vince <uberneen@xxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Mon, 9 May 2005 14:21:10 -0700 (PDT)
I'll certainly be using SDL and net2 with the client
GUI, but for the server it's proven impractical unless
I'm missing some console magic that SDL has.
Right now my server forks and can take up to 10
connections by design. What worries me is that this
framework will have architectural flaws when it comes
to higher traffic games. The main loop cycles every
10ms polling select and once it forks we poll the new
connected socket and process client commands.
Vince~
--- Olof Bjarnason <olof.bjarnason@xxxxxxxxx> wrote:
> You don't need threading if you use NET2 from Bob
> Pendleton - it
> builds ontop of the SDL event system. It's well
> documented too, all
> you need to do is add two extra source files
> (fastevents.c and net2.c)
> to your project (and of course the corresponding .h
> files). (but I'm
> not sure you are using SDL at all..?)
>
> I agree - threading makes a project a whole lot
> more complex and
> harder to debug. I've built a net-text-game
> (client-server) and it
> worked fine with only one thread until I realized I
> wanted the server
> to respond nicely to other clients trying to
> connect. But then again,
> the result with only one thread was not worse than
> client getting
> timeouts trying to connect.
>
> /Olof
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- References:
- [gameprogrammer] Re: Networking for games
- From: Olof Bjarnason
Other related posts:
- » [gameprogrammer] Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- » [gameprogrammer] Re: Networking for games
- [gameprogrammer] Re: Networking for games
- From: Olof Bjarnason