Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Trouble in Pacakge sending

Author
Message
Great Knight
23
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 24th May 2003 05:28
Hello. I am haveing trouble in sending packages. I can get the computers to connect perfectly through IPX protocals but when I am
in the game i cant get the packages to be sent right.
Please can some one show me here.

"How to set your computer up for the practice net game."
-when it shows the device it will go in order how you would like to connect so pick the right number for the device-
-When it shows the game list type one to join the top one-
Rem Project: Net practice2
Rem Created: 5/3/2003 10:13:48 PM

Rem ***** Main Source File ******

set window on
set window size 800,600
set display mode 800,600,16



print "1=make game"
print "2=joingame"
do
if scancode()=2 then goto makegame
if scancode()=3 then goto joingame
loop
joingame:


perform checklist for net connections
sleep 50
for a = 1 to checklist quantity()
print checklist string$(a)
next a

input "---", conn


set net connection conn
sleep 50




perform checklist for net sessions
if checklist quantity()
AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR.

And a Katana.
Great Knight
23
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 24th May 2003 05:53
damn code did nto post right



AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR.

And a Katana.
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 25th May 2003 20:07 Edited at: 25th May 2003 20:11
dude, serious issues here, firstly is that first do..loop supposed to figure out which player is local/remote and then jump to the corresponding function? it wont work like that, try setting a flag for host or client instead. also your problem with the packets is the fact that logically there is no way for the above code to be able to differentiate between the keypresses and the information sent, so the wrong information can get processed. for example what if up or down is pressed and not left or right?.. then the sent message containing the new Y co-ord will be read by the receiver as an X co-ord.

Im also pretty sure that you should never send more msgs than you receive from any other player, you would need to make sure you arent sending more msgs than you are receiving.

i reccomend you check out the advanced section in the db pro help to get a better understanding of how mulitplayer works, and mess around with the example code too

if ya need more help contact me on yahoo, icq or thru e-mail, give me your e-mail address and i can send you the source code etc for a WIP net game with functioning lobby.

optic blast! megablast! have a blast!!
Great Knight
23
Years of Service
User Offline
Joined: 25th Feb 2003
Location:
Posted: 26th May 2003 06:57
My email is [email protected]

AMD Atherlon 2400+ XP, 380 DDr memeory, ATI Radeon 9000 64 DDR.

And a Katana.
shwuckie
23
Years of Service
User Offline
Joined: 9th May 2003
Location: Australia
Posted: 26th May 2003 13:00
ok i have sent the zip file

optic blast! megablast! have a blast!!

Login to post a reply

Server time is: 2026-07-11 12:00:30
Your offset time is: 2026-07-11 12:00:30