Learning SDL_net / network programming

high,

ive recently got the desire to learn network programming. i would like to
use SDL_net because i use the other SDL libs for the rest of the game, and i
would like to use SDL_net for the network part. SDL has been good to me =).

anyway, its sad but i cant find much info on SDL_net. anyway, heres my
question:

should i buy a book on winsock programming, learn how to do it with winsock,
then use what ive learned and teach myself SDL_net ? or, should i search
the net far and wide and teach myself net programming strait away using
SDL_net? what do you think? thanks for any help!>From: sdl-request at libsdl.org

Reply-To: sdl at libsdl.org
To: sdl at libsdl.org
Subject: SDL Digest, Vol 1, Issue 1160
Date: Wed, 12 May 2004 12:00:12 -0700

Send SDL mailing list submissions to
sdl at libsdl.org

To subscribe or unsubscribe via the World Wide Web, visit
http://www.libsdl.org/mailman/listinfo/sdl
or, via email, send a message with subject or body ‘help’ to
sdl-request at libsdl.org

You can reach the person managing the list at
sdl-owner at libsdl.org

When replying, please edit your Subject line so it is more specific
than “Re: Contents of SDL digest…”

Today’s Topics:

  1. granularity? (cmoibenlepro)
  2. starting with SDL on windows, worried about system (Joel)
  3. controlling audio card (Noss, Roger)
  4. SDL_FillRect() does nothing in fullscreen on WinXP (Nick Howes)
  5. Error encountered while making SDL in Cyqwin Environment…
    (Imran Zafar)
  6. Beginner problem linking with Linux/SDL
    (davin-libsdl4893 at mailblocks.com)
  7. Beginner SDL+MINGW: Where is sdl-config?
    (davin-libsdl4893 at mailblocks.com)
  8. Switching between SDL and OpenGL (mattn at talenos.com)
  9. Help needed to install SDL_ttf and others (Andr? Lanzer)
  10. Basic BMP Alpha Blitting (Brian)
  11. Re: Compiling SDL_draw & SDL_gfx (Alan Wolfe)
  12. Re: Compiling Problem: undefined reference to `main’ (Alan Wolfe)
  13. Re: dinamically linking problem (Mikkel Gjoel)
  14. RE: anyone else notice initial delay with Mix_PlayChannel?
    (Millaway, John)
  15. RE: granularity? (Gabriel Gambetta)
  16. Re: granularity? (Alan Wolfe)
  17. Re: Dynamical recoloring of tiles (Stephane Marchesin)
  18. Re: SDL_net threadsafe? should I look into SDL_Net2?
    (Benjamin Deutsch)
  19. Re: [SPAM]>> [SDL] visualCE +sdl exec in wince emulator
    (Tom?? Lamr)
  20. Re: How can I use SDL in my video project based on uCLinux
    and miniGUI without X11 support. (Stephane Marchesin)
  21. Re: Basic BMP Alpha Blitting (Stephane Marchesin)
  22. Re: OT: Dates on email? (Jeff)
  23. Re: mailing list (Patrick McFarland)
  24. Window in the center (NighTiger)

Message: 1
Date: Sun, 9 May 2004 18:41:12 +0000 (UTC)
From: cmoibenlepro
Subject: [SDL] granularity?
To: sdl at libsdl.org
Message-ID: <loom.20040509T203555-402 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

I don’t understand completly what the granularity concept means…

/*
quote:
SDL_Delay will wait at least the specified time, but possible longer due to
OS scheduling.

Note: Count on a delay granularity of at least 10 ms. Some platforms have
shorter clock ticks but this is the most common.
*/

Does it means that if I want to wait 22ms, I need to use SDL_Delay(12) ?
(because 12+10(the granularity) =22)


Message: 2
Date: Tue, 27 Apr 2004 17:20:49 +0000 (UTC)
From: Joel
Subject: [SDL] starting with SDL on windows, worried about system
To: sdl at libsdl.org
Message-ID: <loom.20040427T191817-85 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

I’ve started learning C++ and decided the best way to do that is to write
some
games. As such, due to my previous experience with Perl, I knew about SDL,
and
decided to use it. My problem is this site:
http://www.libsdl.org/intro/whatplatforms.html
It says there are two versions of SDL for windows, one of which is safe,
the
other isn’t. My problem is there is only one version of the dll and
development
files. Could someone please clarify what this statement means?

Thanks

Joel


Message: 3
Date: Mon, 26 Apr 2004 14:52:15 -0700
From: “Noss, Roger”
Subject: [SDL] controlling audio card
To: “‘sdl at libsdl.org’”
Message-ID:
<15689410B83B8E49B30990F85CC36A7404473F99 at sommail.som.ucsf.edu>

Before diving into SDL on WinXP, can someone tell me, to what extent can I
control the audio card with it? I want to be sure that only my app’s audio
comes out, and none from any other apps running concurrently, for as long
as my app is running. I also want to be sure of no delays greater than 20
ms.

If not, what can anyone suggest I use to achieve these goals?

Roger Noss
nossr at neurosurg.ucsf.edu


Message: 4
Date: Sun, 9 May 2004 13:16:34 +0100
From: “Nick Howes” <n.j.howes at warwick.ac.uk>
Subject: [SDL] SDL_FillRect() does nothing in fullscreen on WinXP
To: sdl at libsdl.org
Message-ID: <c7l7e2$er4$1 at sea.gmane.org>

Hi,
I’ve just started playing with SDL (in preparation for a final year
project for a Computer Science BSc) and it’s great. I made a quick app of
some floating objects, using SDL_FillRect to fill the screen with a color
at
the start of each loop, then drawing the rest on top, like this:

SDL_FillRect(screen, NULL, 0xCCCCCC);

This works great in a window, but if I change the SDL_setVideoMode 

call
to make it fullscreen, it’s as if SDL_FillRect is totally ignored; the
background is black and the objects on top leave trails as the background
isn’t being rewritten. I’m using Windows XP and Visual C++ 6; I guess it
might be something to do with DirectX being used in fullscreen? Or maybe
something with the screen buffers pointing the wrong way. I don’t know
really, that’s why I’m asking :slight_smile:

Thanks


Nick H


Message: 5
Date: Thu, 29 Apr 2004 20:49:40 +0000 (UTC)
From: Imran Zafar <imranzafar_tuhh at yahoo.com>
Subject: [SDL] Error encountered while making SDL in Cyqwin
Environment…
To: sdl at libsdl.org
Message-ID: <loom.20040429T223810-562 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

Hi,
I am new to SDL. I have tried to make the SDL in Cygwin environment but I
encountered the following error:

Creating library file .libs/libSDL.dll.a
/usr/lib/gcc-lib/i686-pc-mingw32/3.3.1/…/…/…/…/i686-pc-mingw32/bin/ld:
hermes/.libs/libhermes.a(mmxp2_32.o): bad reloc address 0x87 in section
‘.txt’
make[2]: *** [libSDL.la] Error 1
make[2]: Leaving directory ‘/home/IMRAN/SDL-1.2.7/SDL-1.2.7/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory ‘/home/IMRAN/SDL-1.2.7/SDL-1.2.7/src’
make: *** [all-recursive] Error 1

Kindly tell me what should I do. As it doesn’t successfully make, I cannot
run
the make install command. Any help will be appreciated.

Thanx in advance.

Imran


Message: 6
Date: Fri, 07 May 2004 19:34:06 -0700
From:
Subject: [SDL] Beginner problem linking with Linux/SDL
To: sdl at libsdl.org
Message-ID:
Content-Type: text/plain; charset=“us-ascii”; format=flowed

I am trying to compile the following file
under Linux with SDL: File name is t-sdl.cc

#include <stdlib.h>
#include "SDL/SDL.h"

int main()
{
    if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
        fprintf(stderr, "Unable to init SDL: %s\n",

SDL_GetError());

        exit(1);
    }
    atexit(SDL_Quit);
}

Here is the contents of my Makefile:

CXXFLAGS=-W -Wall -Wpointer-arith -ffast-math

-fomit-frame-pointer -O1 -fno-implicit-templates

SHELL=/bin/bash

%.run: %
	./$*.exe

t-sdl: t-sdl.cc
	gcc  `sdl-config --cflags` `sdl-config --libs`  -lSDL_image

t-sdl.cc -o t-sdl

Here is the linker error that results from calling
make t-sdl.run:

cd ~/sdl/mysdl/
make t-sdl.run
gcc  `sdl-config --cflags` `sdl-config --libs`  -lSDL_image

t-sdl.cc -o t-sdl

/tmp/ccGXlDLe.o(.eh_frame+0x11): undefined reference to

`__gxx_personality_v0’

collect2: ld returned 1 exit status
make: *** [t-sdl] Error 1

Please help me with the linker error.
What linker options should I specify to eliminate
the __gxx_personality_v0 error?

Thank you for your help…

Davin Pearson


Mailblocks - A Better Way to Do Email
http://about.mailblocks.com/info


Message: 7
Date: Sat, 08 May 2004 01:05:35 -0700
From:
Subject: [SDL] Beginner SDL+MINGW: Where is sdl-config?
To: sdl at libsdl.org
Message-ID:
Content-Type: text/plain; charset=“us-ascii”; format=flowed

I am trying to install SDL under MinGW.
I have followed the instructions located
at the following website:

http://www.libsdl.org/extras/win32/mingw32/README.txt

Here are the six steps mentioned in the above “README.txt” file:

      Step 1. Download the msys package, version 1.0.8 or newer, and

install it.
Step 2. Download the latest stable version of the MinGW
package.
Step 3. Run the msys shell. Further instructions assume
you’re in this shell.
Step 3. Unpack the MinGW package in the /mingw directory.
Step 4. Move /mingw/bin/make.exe to
/mingw/bin/mingw32-make.exe as directed.
Step 5. Extract the SDL source into a directory and run:
./configure && make && make install
Step 6. When you’re ready to build SDL applications, copy
SDL.dll from
/usr/local/lib to whereever your SDL application
source resides.

Here is the results of my attempt
to install SDL on top of MinGW:

(Steps 1,2,3): I downloaded the following files from www.mingw.org

    MinGW-3.1.0-1.exe   -> Installed to c:/msys
    MSYS-1.0.9.exe      -> Installed to c:/mingw

(Step 4) I moved c:/mingw/bin/make.exe → c:/mingw/bin/mingw32-make.exe

(Step 5) I downloaded SDL-devel-1.2.7-mingw32.tar and unpacked it to
d:/sdl-lib/mingw
When I tried to run ./configure there was no such file. However
there was a “configure” file in the test subdirectory so
I ran that. Here is the output of configure:

    checking build system type... i686-pc-mingw32
    checking host system type... i686-pc-mingw32
    checking target system type... i686-pc-mingw32
    checking for a BSD-compatible install... /bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output file name... a.exe
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables... .exe
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... none
    checking for an ANSI C-conforming const... yes
    checking for sdl-config... no
    checking for SDL - version >= 1.2.7... no
    *** The sdl-config script installed by SDL could not be found
    *** If SDL was installed in PREFIX, make sure PREFIX/bin is in
    *** your path, or set the SDL_CONFIG environment variable to the
    *** full path to sdl-config.
    configure: error: *** SDL version 1.2.7 not found!

Where is this file “sdl-config”? I found a file called
“i386-mingw32msvc-sdl-config” in my directory
“d:/sdl-lib/mingw/SDL-1.2.7/bin/” so I copied this file to
sdl-config in the same directory, added this directory to my
PATH variable (via the Start->Settings->Control
Panel->System->Advanced-> Environment Variables)
but when I ran configure, I got the
following error:

 checking build system type... i686-pc-mingw32
 checking host system type... i686-pc-mingw32
 checking target system type... i686-pc-mingw32
 checking for a BSD-compatible install... /bin/install -c
 checking whether build environment is sane... yes
 checking for gawk... gawk
 checking whether make sets $(MAKE)... yes
 checking for gcc... gcc
 checking for C compiler default output file name... a.exe
 checking whether the C compiler works... yes
 checking whether we are cross compiling... no
 checking for suffix of executables... .exe
 checking for suffix of object files... o
 checking whether we are using the GNU C compiler... yes
 checking whether gcc accepts -g... yes
 checking for gcc option to accept ANSI C... none needed
 checking for style of include used by make... GNU
 checking dependency style of gcc... none
 checking for an ANSI C-conforming const... yes
  checking for sdl-config...

/d/sdl-lib/mingw/SDL-1.2.7/bin/sdl-config
checking for SDL - version >= 1.2.7… no
*** Could not run SDL test program, checking why…
*** The test program failed to compile or link. See the file
config.log for the
*** exact error that occured. This usually means SDL was
incorrectly installed
*** or that you have moved SDL since it was installed. In the
latter case, you
*** may want to edit the sdl-config script:
/d/sdl-lib/mingw/SDL-1.2.7/bin/sdl-c
onfig
configure: error: *** SDL version 1.2.7 not found!

Where is the file sdl-config and why can’t I find it???

Help would be much appreciated :slight_smile:


Mailblocks - A Better Way to Do Email
http://about.mailblocks.com/info


Message: 8
Date: Thu, 22 Apr 2004 16:16:06 -0500
From:
Subject: [SDL] Switching between SDL and OpenGL
To:
Message-ID: <016a01c428af$08585110$1002a8c0 at talenos>
Content-Type: text/plain; charset=“us-ascii”

Ok, I have some menus done in SDL for a game and the game itself is done in
opengl. Is there an easy way to switch back from one to the other? Right
now it only works because the menu is called before the opengl stuff is,
but
I’d like to be able to go back to the menu again.

Thanks,

Matt


Message: 9
Date: Wed, 21 Apr 2004 14:11:55 -0300 (ART)
From: Andr? Lanzer
Subject: [SDL] Help needed to install SDL_ttf and others
To: sdl at libsdl.org
Message-ID: <20040421171155.63874.qmail at web90008.mail.scd.yahoo.com>
Content-Type: text/plain; charset=“iso-8859-1”

I send this e-mail in the hope someone may help me with a “tricky”
problem I am having when I try to install SDL_image, SDL_mixer and SDL_ttf
to be able to install Tux Paint for my kid. Every time I try “make” (after
./configure) I get the message “.libs/libSDL_ttf.so: undefined reference to
XOpenDisplay” (and other - I believe - X functions, also for libSDL_image
and for libSDL_mixer) and appears a message with ld.so. I have Mandrake 8.0
on my computer and also edited ldconfig to include dirs like /usr/local/lib
(and also usr/lib), as suggested in the FAQ document for some problems with
the Mandrake Linux.
I am without any direction (as a matter of fact, I am what is called a
newbie, with some understanding in C programming, what is helping me a lot
!).
Waiting for any direction,
Andr? T.S. Lanzer.
04/21/2004.


Yahoo! Messenger - Fale com seus amigos online. Instale agora!
-------------- next part --------------
An HTML attachment was scrubbed…
URL:
http://twomix.devolution.com/pipermail/sdl/attachments/20040421/2e090647/attachment.html


Message: 10
Date: Sat, 24 Apr 2004 20:47:23 +0000 (UTC)
From: Brian
Subject: [SDL] Basic BMP Alpha Blitting
To: sdl at libsdl.org
Message-ID: <loom.20040424T223219-389 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

I’m looking to do one of the most simple operations: blitting a 24 bit
bitmap
with the color 255,0,255 defined as the SDL_SRCCOLORKEY.

I’ve looked up examples online and I appear to be doing things the same way
as
others, except I notice people using 0,255,0 as their background color–
perhaps
there is a sort of inversing going on behind the scenes that I don’t know
about?

Anyway the code is quite simple:
SDL_SetAlpha( ball, SDL_SRCCOLORKEY, SDL_MapRGB( screen->format, 255, 0,
255 ) );
and a
SDL_BlitSurface( ball, NULL, screen, &dst );
The screen is created with
SDL_SetVideoMode(800, 600, 24, SDL_HWSURFACE|SDL_DOUBLEBUF);

I have tested two different bmps, one made in PSP and one made in MS Paint.
The
image blits but with the background color included.

Here is an example online I found which happens to match what I am trying:
http://www.jlbcomputers.co.uk/cgi-bin/wiki.pl?2

Thanks


Message: 11
Date: Wed, 12 May 2004 11:07:30 -0700
From: “Alan Wolfe”
Subject: Re: [SDL] Compiling SDL_draw & SDL_gfx
To: “A list for developers using the SDL library.
(includesSDL-announce)”
Message-ID: <02f801c4384b$ff186cf0$6401a8c0 at atrix>
Content-Type: text/plain; charset=“iso-8859-1”

Hey Kevin,

talk to the developers of those libs, im sure they can help

----- Original Message -----
From: “KevinGPO”
To:
Sent: Thursday, April 22, 2004 9:03 AM
Subject: [SDL] Compiling SDL_draw & SDL_gfx

I like SDL_draw and SDL_gfx but am having difficulties compiling them
both.

SDL_draw compiles with lots of errors.

I can get SDL_gfx compiled as static library (.a .lib). I don’t know how
to
use this static library with my programs. So I try to compile as dynamic
library (.dll) but I get lots of linker errors.

Please can someone see if they can compile SDL_draw and SDL_gfx under
Dev-C++.

Dev-C++ http://www.bloodshed.net/
SDL_draw http://sdl-draw.sourceforge.net/
SDL_gfx http://www.ferzkopp.net/~aschiffler/Software/SDL_gfx-2.0/


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


Message: 12
Date: Wed, 12 May 2004 11:10:31 -0700
From: “Alan Wolfe”
Subject: Re: [SDL] Compiling Problem: undefined reference to `main’
To: “A list for developers using the SDL library.
(includesSDL-announce)”
Message-ID: <030401c4384c$69c2a390$6401a8c0 at atrix>
Content-Type: text/plain; charset=“iso-8859-1”

make sure your main is defined like this:

int main(int argc,char **argv)
{
//code here
}

sometimes i get that error and it’s because main is declared as returning
void or doesnt have the args (im on mingw for windows).

----- Original Message -----
From: “Rona” <r_nappi at yahoo.it>
To:
Sent: Friday, April 30, 2004 11:17 AM
Subject: [SDL] Compiling Problem: undefined reference to `main’

Hi,
I’m using SDL in my little software project. When I compiled my
programs,
the
compiler’s answer was:

/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/…/…/…/crt1.o(.text+0x18): In
function _start': ../sysdeps/i386/elf/start.S:77: undefined reference to main’
collect2: ld returned 1 exit status

How do I compile my project in this case?

Could someone helps me, please?

Regards. Rona.


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


Message: 13
Date: Wed, 12 May 2004 20:04:28 +0200 (MEST)
From: “Mikkel Gjoel”
Subject: Re: [SDL] dinamically linking problem
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <Pine.GSO.4.58.0405122000580.21164 at erlang.gbar.dtu.dk>
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Thu, 29 Apr 2004 emanuele.dalmasso at theboz.it wrote:

Now I was trying to link dinamically the library, but I’m in trouble
with this, I’ve read
some documentation and I’ve found that I’ve to use the LoadLibrary()
function to load
the dll module, the LoadLibrary is defined in winbase.h, but during the
compiling
session it give me a lot of error about this header (for example it does
not know the
DWORD type). Have I to include some other header or something else to
link
dinamically the dll?!

It sounds like you need to include <windows.h>

You don’t need to use loadlibrary to use the dll-files though. All you
need to do, is in the Project Settings/“C/C++”/“Use run-time library” to
set “Multithreaded DLL”. That, and linking to SDL.lib and SDLmain.lib
works like a charm.

Regards,
\Mikkel Gjoel


Message: 14
Date: Wed, 12 May 2004 14:15:51 -0400
From: “Millaway, John” <John_Millaway at ghrsystems.com>
Subject: RE: [SDL] anyone else notice initial delay with
Mix_PlayChannel?
To: “‘sdl at libsdl.org’”
Message-ID:

Content-Type: text/plain; charset=“ISO-8859-1”

Mix_OpenAudio(MIX_DEFAULT_FREQUENCY, MIX_DEFAULT_FORMAT,
MIX_DEFAULT_CHANNELS, 4096)

The hardware is modern, with heaps of RAM. So I don’t think
that’s the
problem, either.

Test if for example 2048 reduces the lag you noticed.

That does reduce the lag, thanks.


Message: 15
Date: Wed, 12 May 2004 15:14:42 -0300
From: “Gabriel Gambetta”
Subject: RE: [SDL] granularity?
To: “A list for developers using the SDL library.
(includesSDL-announce)”
Message-ID:
<16D5B79326496845A0D550C9D34B22D1014621B4 at mensajero.artech.local>
Content-Type: text/plain; charset=“us-ascii”

Does it means that if I want to wait 22ms, I need to use SDL_Delay(12)
?
(because 12+10(the granularity) =22)

The “granularity” is the resolution of the timer. If the timer
granularity is 10ms, you can wait for 10ms or for 20ms but not for 22
(it will wait for 20 or 30, depending on the implementation, I guess)

–Gabriel


Message: 16
Date: Wed, 12 May 2004 11:30:00 -0700
From: “Alan Wolfe”
Subject: Re: [SDL] granularity?
To: “A list for developers using the SDL library.
(includesSDL-announce)”
Message-ID: <03a501c4384f$22b007b0$6401a8c0 at atrix>
Content-Type: text/plain; charset=“iso-8859-1”

10ms granularity means that the clock is only accurate to minimum 10ms.

that means if you tell it to wait 23 ms, it’ll wait 30.

might be more to it but thats the general idea :stuck_out_tongue:

----- Original Message -----
From: “cmoibenlepro”
To:
Sent: Sunday, May 09, 2004 11:41 AM
Subject: [SDL] granularity?

I don’t understand completly what the granularity concept means…

/*
quote:
SDL_Delay will wait at least the specified time, but possible longer due
to
OS scheduling.

Note: Count on a delay granularity of at least 10 ms. Some platforms
have
shorter clock ticks but this is the most common.
*/

Does it means that if I want to wait 22ms, I need to use SDL_Delay(12) ?
(because 12+10(the granularity) =22)


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


Message: 17
Date: Wed, 12 May 2004 20:28:07 +0200
From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Subject: Re: [SDL] Dynamical recoloring of tiles
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <40A26CB7.3060905 at wanadoo.fr>
Content-Type: text/plain; charset=us-ascii; format=flowed

Kornel Kisieleiwcz wrote:

Hello again,

In the isometric engine I’m working on I want to have a simple degree of
something like dynamical lightning - that is darkening the tiles used
depending on the distance from the lightsource. What would be the best
approach in SDL to do that? I thought about making new instances of the
given tile on the fly and modyfing each of their pixels. Is there a
better
way to handle that?

You could draw a black transparent rectangle on top of each tile to
darken it. Using different alpha values, you might achieve the desired
result.
However, that’ll be slower because alpha is expensive.

Stephane


Message: 18
Date: Wed, 12 May 2004 20:36:48 +0200
From: Benjamin Deutsch
Subject: Re: [SDL] SDL_net threadsafe? should I look into SDL_Net2?
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <40A26EC0.9050404 at fictiongroup.de>
Content-Type: text/plain; charset=us-ascii; format=flowed

Hi,

After reading bob pendleton (bless his heart!)'s demonstrations on
SDL_Net2,
I’m curious whether it’s even worth my while to be learning how to do
SDL_net, seeing as it’s apparently not thread-safe.

Depends on what level of “thread safety” you need. If you put all
networking in a single thread, it doesn’t matter if the library is
thread-safe. SDL_Net2’s big advantage, as I understood it, is wrapping
the networking in the SDL event system.

Does anybody else have recommendations for simple game/network
programming
using using SDL, which you prefer? Even using directPlay in a windows
environment, I’d be open to alternatives.

Well, I recently extended SDLnet to non-blocking TCP (Windows and *nix
only, so far), which makes networking in a single thread rather
painless. It’s not been thoroughly tested, but if you’re interested, I
could send you the code.

On the other hand, I recently discovered the OpenTNL networking system, which seems very impressive. You may want to check it (http://www.opentnl.org). It should be scalable to small applications, and seems easy enough to work with, but the learning curve is terribly steep. I just don’t want to be programming halfway into my game and have to re-engineer using a different library because of a structure deficiency in the library. Well, you could put a generic wrapper layer around networking, and then you would only have to change the backend. Usually overkill, though :frowning: Hope this helps, Ben Message: 19 Date: Wed, 12 May 2004 20:30:18 +0200 From: Tom?? Lamr Subject: Re: [SPAM]>> [SDL] visualCE +sdl exec in wince emulator To: A list for developers using the SDL library. (includes SDL-announce) Message-ID: <17113892195.20040512203018 at podvlivem.net> Content-Type: text/plain; charset=Windows-1250 you must compile SDL and your application for pocketpc procesor. isn’t it ARM based procesor? i was trying it before and it worked fine, except some problems with buttons on which i want to take a look when i have more time. s pozdravem Tom?? Lamr … josh :: PodVlivem Software www.podvlivem.net icq: 91847172 josh at podvlivem.net 29. dubna 2004, 19:31:32, napsal jste: rc> testwin.c able to be executed in wince emulator but cannot be executed in my rc> pocketpc . I already copied sdl.dll that compiled in visualCE project into rc> pocketpc. Any idea ? rc> The error msg is : ‘testwin’ is not a valid PocketPC application rc> _______________________________________________ rc> SDL mailing list rc> SDL at libsdl.org rc> http://www.libsdl.org/mailman/listinfo/sdl Message: 20 Date: Wed, 12 May 2004 20:30:13 +0200 From: Stephane Marchesin <stephane.marchesin at wanadoo.fr> Subject: Re: [SDL] How can I use SDL in my video project based on uCLinux and miniGUI without X11 support. To: “A list for developers using the SDL library. (includes SDL-announce)” Message-ID: <40A26D35.30006 at wanadoo.fr> Content-Type: text/plain; charset=us-ascii; format=flowed wangxf wrote:

How can I use SDL in my video project based on uCLinux and miniGUI
without X11 support.

You can use one of the other backens available, for example the
framebuffer one. I don’t know if this works with uClinux, but it doesn’t
need X11.

Stephane


Message: 21
Date: Wed, 12 May 2004 20:33:28 +0200
From: Stephane Marchesin <stephane.marchesin at wanadoo.fr>
Subject: Re: [SDL] Basic BMP Alpha Blitting
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <40A26DF8.5010705 at wanadoo.fr>
Content-Type: text/plain; charset=us-ascii; format=flowed

Brian wrote:

I’m looking to do one of the most simple operations: blitting a 24 bit
bitmap
with the color 255,0,255 defined as the SDL_SRCCOLORKEY.

I’ve looked up examples online and I appear to be doing things the same
way as
others, except I notice people using 0,255,0 as their background color–
perhaps
there is a sort of inversing going on behind the scenes that I don’t know
about?

Anyway the code is quite simple:
SDL_SetAlpha( ball, SDL_SRCCOLORKEY, SDL_MapRGB( screen->format, 255, 0,
255 ) );
and a

If you want to do colorkeying, you should use SDL_SetColorKey and not
SDL_SetAlpha. SDL_SetAlpha is for semi-transparent surfaces.
See the SDL_SetColorKey manpage for that.

Stephane


Message: 22
Date: Wed, 12 May 2004 11:38:45 -0700
From: Jeff <j_post at pacbell.net>
Subject: Re: [SDL] OT: Dates on email?
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <200405121836.i4CIa6Zq002779 at mtaw6.prodigy.net>
Content-Type: text/plain; charset=“iso-8859-1”

On Wednesday 12 May 2004 09:34 am, Sam Lantinga wrote:

Sorry folks, we upgraded our mailing list software, and apparently there
were a whole bunch of posts queued up from a news gateway. Let me know
if there are still old posts coming through.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

There are. But at least they’re from last month, not last year :wink:

Jeff


Message: 23
Date: Wed, 12 May 2004 15:09:05 -0400
From: Patrick McFarland
Subject: Re: [SDL] mailing list
To: “A list for developers using the SDL library. (includes
SDL-announce)”
Message-ID: <20040512190905.GA10498 at panax.com>
Content-Type: text/plain; charset=“us-ascii”

On 12-May-2004, Bob Pendleton wrote:

On Tue, 2004-05-11 at 16:15, Jeff wrote:

Did anyone else just get 87 messages from SDL, most of them dated last
year?
Or was it my ISP that screwed up?

I got them too. What happened?

Looks like news.lokigames.com (the news ↔ ml gateway) hiccuped.


Patrick “Diablo-D3” McFarland || unknown at panax.com
“Computer games don’t affect kids; I mean if Pac-Man affected us as kids,
we’d
all be running around in darkened rooms, munching magic pills and listening
to
repetitive electronic music.” – Kristian Wilson, Nintendo, Inc, 1989
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :
http://twomix.devolution.com/pipermail/sdl/attachments/20040512/184afbde/attachment-0001.bin


Message: 24
Date: Wed, 12 May 2004 21:16:39 +0200
From: NighTiger
Subject: [SDL] Window in the center
To: SDL
Message-ID: <1084389399.2084.0.camel at silent>
Content-Type: text/plain

How can I see my window in the center of the screen?
tnx



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

End of SDL Digest, Vol 1, Issue 1160



Best Restaurant Giveaway Ever! Vote for your favorites for a chance to win
$1 million! http://local.msn.com/special/giveaway.asp

Hi

You could have a look at Beej’s guite to network programming. It’s very
easy to understand. With that knowledge you should have no problem with
SDL_net.

http://www.ecst.csuchico.edu/~beej/guide/net/

Bernhard

Graveyard Filla wrote:> high,

ive recently got the desire to learn network programming. i would like
to use SDL_net because i use the other SDL libs for the rest of the
game, and i would like to use SDL_net for the network part. SDL has been
good to me =).

anyway, its sad but i cant find much info on SDL_net. anyway, heres my
question:

should i buy a book on winsock programming, learn how to do it with
winsock, then use what ive learned and teach myself SDL_net ? or,
should i search the net far and wide and teach myself net programming
strait away using SDL_net? what do you think? thanks for any help!