UDP Net Code

Blitz3D Forums/Blitz3D Programming/UDP Net Code

Neochrome(Posted 2004) [#1]
[edit]
the problem is solved, no need to read on
[/end edit]


Before i decide to write my own small netcode, Will Blitz Play do the job the way i need.

My computer is sharing a internet and people running the game connecting to my computer, how ever i have a friend in America also that wants to connect to me.
[america]--------[modem]
                         |
                         |
                 [moemm]
                   |
            [mycomputer]--------[user1]
                      |
                      +---------[user2]

Will this work using UDP?


Matty(Posted 2004) [#2]
I've used Blitzplay Lite many times and it works fine.


GC-Martijn(Posted 2004) [#3]
Do you want this?

[server]-> your modem(ip)

tcp|udp

[client]-> connect to you (ip) with tcp or udp


Neochrome(Posted 2004) [#4]
the IPs are made up, but the diagram below is what i need to work in UDP, will this work ?




GC-Martijn(Posted 2004) [#5]
I think you must see this:
http://www.blitzbasic.com/b3ddocs/command.php?name=CreateTCPServer&ref=2d_cat

Most games have
- 1 server
- n client's
The server/client relation is 1:1

In your picture you made 2 modems ?

But you only need this for the client code:
OpenTCPStream(22.33.11.55,port)


Neochrome(Posted 2004) [#6]
a modem in america and a modem i have at home. i'll just write a test example when i get home, hopefully that will work


GC-Martijn(Posted 2004) [#7]
a oke I see ;)


Neochrome(Posted 2004) [#8]
[EDITED]

IT WORKS!!!!!!!!!
Ok, time to mosy on down and get me a copy of BlitzPlay Pro :) i suck at splin so thats where it is hehe