SDL 1.3 screen handling

i have been working on a multi player game, right now it has a screen
created then plotted to the main screen for each player, i assume this is
basically all i need to do to make the game easy to convert to SDL1.3, i
really want to make the thing networked, so, er, as the screens are
currently really small (200x100 ish) whats the possibility of using SDL to
send the sceens it makes about the network from a central server… to like
an SDL client… so both the users brain nor mine has to melt at making
networking work for this game.

here is the code for the current version
http://www.cloudsprinter.com/random/blobobot-0.2.zip snapshot not set up to
display more than one player. and very messy in the working copy.

Do you mean send the actual graphics over the network? That takes a lot of
bandwidth… 400x200 x 24 bits x 30 fps for example, is ~57Mb per second
(800x600 is ~350Mb/s). I don’t think there’s a good way to shortcut
networking… Make your program work as both the server and the client,
send state changes, and use dead reckoning (sounds so easy!). Let the
brain-melting begin!

Jonny DOn Mon, Jan 5, 2009 at 9:38 AM, Neil White wrote:

i have been working on a multi player game, right now it has a screen
created then plotted to the main screen for each player, i assume this is
basically all i need to do to make the game easy to convert to SDL1.3, i
really want to make the thing networked, so, er, as the screens are
currently really small (200x100 ish) whats the possibility of using SDL to
send the sceens it makes about the network from a central server… to like
an SDL client… so both the users brain nor mine has to melt at making
networking work for this game.

here is the code for the current version
http://www.cloudsprinter.com/random/blobobot-0.2.zip snapshot not set up
to display more than one player. and very messy in the working copy.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

2009/1/5 Jonathan Dearborn

Do you mean send the actual graphics over the network? That takes a lot of
bandwidth… 400x200 x 24 bits x 30 fps for example, is ~57Mb per second
(800x600 is ~350Mb/s). I don’t think there’s a good way to shortcut
networking… Make your program work as both the server and the client,
send state changes, and use dead reckoning (sounds so easy!). Let the
brain-melting begin!

Jonny D

well the idea was is to have the game create levels if you go out of any
existing areas, when the engine will create a new graphic for that level
area, so at some point the client could possibly want more graphics

This sounds like an off-the-beaten-path idea. Can you explain it any more?
If you’re just sending a set of graphics as part of a level loading/switch
to a client, then you can ignore my estimate. You would still need to
update player positions and such, which is the more involved task (i.e. If
you’re already sending data, then sending graphics is trivial). If the
graphics are randomly generated, then you might look into Perlin noise to
make it consistent but non-networked (though hardware might become a factor
for exactness).

Jonny DOn Mon, Jan 5, 2009 at 1:36 PM, Neil White wrote:

2009/1/5 Jonathan Dearborn <@Jonathan_Dearborn>

Do you mean send the actual graphics over the network? That takes a lot
of bandwidth… 400x200 x 24 bits x 30 fps for example, is ~57Mb per second
(800x600 is ~350Mb/s). I don’t think there’s a good way to shortcut
networking… Make your program work as both the server and the client,
send state changes, and use dead reckoning (sounds so easy!). Let the
brain-melting begin!

Jonny D

well the idea was is to have the game create levels if you go out of any
existing areas, when the engine will create a new graphic for that level
area, so at some point the client could possibly want more graphics


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Just so you are prepared: people will call you absolutely crazy. In
fact I’m among them. Writing your first networked low-latency game can
be hard, but the only good shortcut route for you is to find an
existing game platform which provides the network functionality for
you.On Mon, Jan 5, 2009 at 9:38 AM, Neil White wrote:

i have been working on a multi player game, right now it has a screen
created then plotted to the main screen for each player, i assume this is
basically all i need to do to make the game easy to convert to SDL1.3, i
really want to make the thing networked, so, er, as the screens are
currently really small (200x100 ish) whats the possibility of using SDL to
send the sceens it makes about the network from a central server… to like
an SDL client… so both the users brain nor mine has to melt at making
networking work for this game.

here is the code for the current version
http://www.cloudsprinter.com/random/blobobot-0.2.zip snapshot not set up to
display more than one player. and very messy in the working copy.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


http://codebad.com/

there was talk of doing it over xserver, the more mental the better

but if i’m not careful its gonna turn into xpilot right now :wink:

the game wants to be a platform shooting game there you run around shooting
each other in a platform game esque world with some of my bad (as in bad)
ass fake physics going on, but i have this fixation of making a game run
infinitley, and have made this game to create levels from whataver graphics
i send it for basic running around stuff, so new areas can be created using
combinations of images , running of a server for people to join in networked
mode, having time to send pixel data in some from then decode the other end
and build the level. say sending 500k png before the player leaves the level
area. assuming i have some kicksas server.

would there be any way to get sdlimageload to load from a rwops stream?

or use webget into sdlimgload?

i’m thinking i should probably learn how to use threads i am a slacker
programmer

Looks like somebody already mentioned something like this on the SDL
mailing list:

http://article.gmane.org/gmane.comp.lib.sdl/33327

But it looks like they didn’t quite understand how libcurl’s data
ready callback was supposed to work :frowning:

You’ll need an image decoder that can decode one chunk at a time if
you don’t want to have to deal with (logical) threads. Maybe a worthy
upgrade for SDL_Image?On Mon, Jan 5, 2009 at 5:16 PM, Neil White wrote:

would there be any way to get sdlimageload to load from a rwops stream?

or use webget into sdlimgload?


http://codebad.com/