SDL Net and General Network Gaming

Hi Peeps! :slight_smile:

I was just wondering if someone could give me some pointers on how you use SDL
Net for network game programming… I mean… what’s the general principle
behind it.

What I’d really like is an example of how to write something simple like a
networked Pong so I can see how data is transferred, how a client and server
talk to each other and stuff like that.

Anyone got some examples?

Cheers,

Stevie :slight_smile:

Hi Peeps! :slight_smile:

I was just wondering if someone could give me some pointers on how you use SDL
Net for network game programming… I mean… what’s the general principle
behind it.

What I’d really like is an example of how to write something simple like a
networked Pong so I can see how data is transferred, how a client and server
talk to each other and stuff like that.

Anyone got some examples?

Cheers,

Stevie :slight_smile:

There are console-based chat program examples at:

http://jcatki.no-ip.org/SDL_net/

If you specifically want to see code in a game, then you could just go to
the Linux Game Tome, look for a simple (or not so simple) game with
network support, and look at the source. The only issue is there is no
guarantee the code you’ll find is an example of good coding
practice.

An example that comes to mind is GAV, as it isn’t far off networkable
Pong, and it does use SDL_net - see
http://www.happypenguin.org/show?GPL%20Arcade%20Volleyball
though the warning stands that I have no idea if that’s an example of how
it should be done.

JamesOn Sat, 17 Apr 2004 11:16:02 +0100, Stephen Sweeney wrote:

I’d recommend you to you NET2 ontop of SDL_net, as it is higher
level/easier to use: it simply uses the SDL-event system to
send events when some packages arrive etc. Also, I think it
is at least as fast as the SDL_net library, due to his replacement
of the SDL_event structure & routines. Best of all, it has
great documentation:

http://gameprogrammer.com/game.html

good luck,

/Olof

Stephen Sweeney: “[SDL] SDL Net and General Network Gaming” (2004-04-17…

#Hi Peeps! :)#
#I was just wondering if someone could give me some pointers on how you use SDL
#Net for network game programming… I mean… what’s the general principle
#behind it.

#What I’d really like is an example of how to write something simple like a
#networked Pong so I can see how data is transferred, how a client and server
#talk to each other and stuff like that.

#Anyone got some examples?

#Cheers,

#Stevie :slight_smile:

#_______________________________________________
#SDL mailing list
#SDL at libsdl.org
#http://www.libsdl.org/mailman/listinfo/sdl