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.

Newcomers DBPro Corner / need help with multiplayer

Author
Message
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 23rd Feb 2003 20:48
Ok I've tried to make a simple cheap little program. Nothing special just a chat program just to see if I understood the multiplayer commands and aparently I don't if someone could just tell me what I did wrong



Or if you could just post some examples of working multiplayer programs.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 24th Feb 2003 05:34
how does it not work? have you tested it by running the program more than once at the same time and trying to connect to yourself? or with multiple people?

its probably that the system wont find the other system unless you specify an IP address

here's how I would set it up to connect:

Input "Host or Join? ",h$
if h$="host"
Create net game "YOURIP","Player1",20,1
endif

if h$="join"
PERFORM CHECKLIST FOR NET SESSIONS
SET NET CONNECTION 1,"YOURIP"
join net game 1,"YOURIP"
endif

that will set it so all games join to your computer if you are online. If you want it to accept different IP's just do an input for the IP number

Darken the skies, we are God.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 25th Feb 2003 05:37
actually, dont use that code. That code is bad.

Darken the skies, we are God.
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 25th Feb 2003 05:40
So what do you think I should do then?
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 25th Feb 2003 05:52
i stole most of my code from the "alien rollerbug" game in the help examples, it does very well of setting up an online game, if you can decipher the crazy stuff

Darken the skies, we are God.
Phoenix
21
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 27th Feb 2003 02:34
ok here. I figured it out I can get two computers to connect with each other. But, however, I can't get messages to work.



Tell me what I did wrong.

Peace is but a shadow of its painful past.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 27th Feb 2003 06:01
here is my very successful chat system:

(no need to declare variables, they start at 0 anyway.



I grabbed the keyboard code from "perfect keyboard input" example in the help files and played around with it a tad. I hope this helps you

Darken the skies, we are God.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 27th Feb 2003 06:02
variable saytimer makes it so by tapping enter you dont flood the screen. textyoutimer is how long your text stays on the screen. texttheytimer is how long their message stays on the screen. line$ is what you say. text$ is what you hear.

Darken the skies, we are God.
TogaMario
21
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 2nd Mar 2003 06:32
My multiplayer code is almost exactly like yours, but I keep getting the message "0 net games available" when I try to connect ... ack ...

P.S. This is what the alphabet would look like if Q and R were eliminated.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 2nd Mar 2003 07:03
56k or cable?

Darken the skies, we are god
TogaMario
21
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 2nd Mar 2003 07:18
Cable, and now I know what the prob is...my router. I went to a web page to find my IP address, instead of ipconfig, so now it connects, and i'm having the problem of translating packets too. But that's ok, it's far better that I can at least test with a connection Thank you Quoth, you're always lookin' out for me! What a pal.

P.S. This is what the alphabet would look like if Q and R were eliminated.
TogaMario
21
Years of Service
User Offline
Joined: 30th Jan 2003
Location:
Posted: 2nd Mar 2003 08:15
I always have to be difficult, here's my code. If you happen to notice why my messages aren't being sent or received ... or why they may not be translating correctly.



There are lines that are commented that look messy, but they are left overs from experiments. I'm working on a massive experimental project, that I plan on cleaning up later, but for now, I apologize and thank you.

Basic layout goes like this

o-Main Menu
-Host (gosub)
-Join (gosub)

Each sets up variables and connects first, then they send the messages (packet$) and last, translate recieved packages (message$)

I hope that helps you to understand a little ... Much thanks!

P.S. This is what the alphabet would look like if Q and R were eliminated.
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 3rd Mar 2003 00:01
check the code snippits board, I think you will find it quite helpful

Darken the skies, we are god

Login to post a reply

Server time is: 2024-09-19 22:29:38
Your offset time is: 2024-09-19 22:29:38