Results 1 to 5 of 5

Thread: NetworkEngine.pas for JEDI-SDL

  1. #1

    NetworkEngine.pas for JEDI-SDL

    After fighting and fighting with getting the SDL_Net stuff working I finally got it . I've wrapped the network stuff up into a nice little object package that includes a server and client object that have string and block support. Since I had such a hard time, I thought others might like to have a bit of a support unit themselvs. Maybe I'll be lucky enough that this is useful enough and it will be included in the lib itself .

    Download From: http://www.eonclash.com/SDL/NetworkEngine.zip

    Included is the actual NetworkEngine.pas file as well as a sample Server and Client application. These work with the standard SDL_Net demos that are available already as an added bonus.

  2. #2

    NetworkEngine.pas for JEDI-SDL

    This is nice, I'm gonna give it a go.
    If you develop an idiot proof system, the nature develops better idiots.

  3. #3
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    NetworkEngine.pas for JEDI-SDL

    Does this unit use TCP or UDP connections?

    Well done by the way - I think this will be used by a lot of people. Maybe Savage can add it to JEDI-SDL ver 1 release.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  4. #4

    NetworkEngine.pas for JEDI-SDL

    I'll have a look at it shortly.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  5. #5

    NetworkEngine.pas for JEDI-SDL

    This is the TCP version, and I found a problem with it today (that I need to fix and upload). Basically look for the line "for i := 0 to Clients.Count -1 do" and change it to "for i := Clients.Count -1 downto 0 do" within the Server Update method. I forgot that I remove clients in that loop, and going 0 to max-1 causes issues as we all know .

    I'm still working out the UDP version, and it will be a bit before I get back to it. I think (hopefully) that the switch is easy to make. Looking at SDL docs its almost as simple as replacing TCP with UDP.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •