I don't want to buy something that I should be able to do myself.... When I said I have done this type of stuff before, I did it in C++/DX. I can't even get two of my computers to do a simple LAN in DBP. Here's what I have so far.... It's not working.
global TCPIPsession as integer =-1
InitNetConnect("") `"fe80::2517:1a14:49:58a%12"
SessionIndex2=0
print "Create=1"
print "Join=2"
while SessionIndex2<1 or SessionIndex2>2
print : input "Select A Number>";SessionIndex2
endwhile
cls
sync
if SessionIndex2=1 then CreateGame("Game1","Server",200)
if SessionIndex2=2 then JoinGame()
disable escapekey
do
cls
if net game exists()=1
text 0,0,"connected"
perform checklist for net players
for c=1 to checklist quantity()
text 0,c*20,str$(c)+". "+checklist string$(c)+" ID:"+str$(checklist value a(c))+" UNIQUE:"+str$(checklist value b(c))
next c
else
text 0,0,"NOT connected"
endif
if inkey$()="t" then goto leave
loop
leave:
FREE NET GAME
end
function InitNetConnect(IP$ as string )
TCPIPsession=FindTCPIP()
set net connection TCPIPsession,IP$
endfunction
function FindTCPIP()
perform checklist for net connections
for c=1 to checklist quantity()
if FIND SUB STRING$(checklist string$(c),"TCP/IP")>0 then SelectionIndex=c
next c
endfunction SelectionIndex
function CreateGame(GameName$ as string ,Player$ as string ,MaxPlayers as integer )
if TCPIPsession>-1
CREATE NET GAME GameName$, Player$,MaxPlayers,2
endif
endfunction
function JoinGame()
perform checklist for net sessions
cls
print "SESSIONS (Found on the Selected Connection)"
for c=1 to checklist quantity()
print c;". ";checklist string$(c)
next c
SessionIndex=0
if checklist quantity()<>0
while SessionIndex<1 or SessionIndex>checklist quantity()
print : input "Select A Number>";SessionIndex
endwhile
endif
if SessionIndex>0 and SessionIndex<=checklist quantity()
print "Joining"
sync
JOIN NET GAME SessionIndex,"Client"
endif
cls
sync
endfunction
What am I doing wrong?
The fastest code is the code never written.