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.

Author
Message
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 4th Apr 2003 22:57
Please I really need this. This must be the 4th time ive asked and nobody has posted anything that directly answers it. so far i have been told to look in tutorials and help files (WELL DER THATS THE FIRST THING I DID!!!)

Can anybody post some code for a short chatroom routine. YOu know, a host and client source code. separate combined i dont care. PLease i cant figure out how to do multiplayer stuff. sombody must ave made one! PLLLEEEASSEEEE. and where you enter the ip. please say which players ip should be placed their i.e. host or client.

please,please,please [img][/img]
I have a word of advice...
..don't piss on an electric fence!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Apr 2003 23:33
OK, I'll put together some simple code for you - be back later.
malcom2073
23
Years of Service
User Offline
Joined: 12th Mar 2003
Location:
Posted: 5th Apr 2003 00:05
Multiplayer is quite tough to do, just seeing code wont help you trust me. You gotta know how networks work a bit to get it running. I've barely managed to get one working, and even then it dosent work well

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Apr 2003 00:33
Here's the code for a basic chat. After playing with this a bit to get a feel of how it works, I suggest you read the reference manual thoroughly to allow you to detect new connections, match connections to names etc.

Limitations:
One-to-one only - you'll need to change it if you want more.
No local echoing of keypresses - you need to arrange separate areas of the display for remote and local users - all up to you
Keypresses are sent immediately - In the real world, you'll buffer all local keypresses until the user presses the ENTER key to send - again, it's all yours.

Load the code into the editor, set to a 480x360 windowed mode, and run twice.
In the first window, enter 'Y' to be the server, and an IP address of 127.0.0.1 (local to your machine). In the second window, enter 'N' and the same IP.

Hit F12 to exit the app. Good luck, and enjoy

Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Apr 2003 00:57
YYYYYYYEEEEEEEEESSSSSSSSSSS!!!!!!!!!!!
WOW!!!! OH YES YES YES YES THANKYOU THANKYOU THANKYOU !!! YES I CANT BELIEV IT FINALY THANKYOU SO MUCH IANM!!!!!!!!!!!!!!!!

really thanks i really appreciate it

[img][/img]

I have a word of advice...
..don't piss on an electric fence!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Apr 2003 01:28
Blimey! You're welcome
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Apr 2003 14:42
actually dam!

well the host works or at least it says ready for connections but i dont seem to be able to get the client working it says cannot locate chat on the server ( the programs error not a runtime error)
is the client supposed to type in their own ip or the hosts ip?

I have a word of advice...
..don't piss on an electric fence!
Dave J
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 5th Apr 2003 15:29
Hosts, but if you're running on the same computer then it wouldn't matter (you could even use 127.0.0.1)

"Computers are useless they can only give you answers."
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 5th Apr 2003 17:22
The hosts IP or 127.0.0.1 if running host & client on the same PC.

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Apr 2003 18:47
what is so special about 127.0.0.1?

I have a word of advice...
..don't piss on an electric fence!
AndyUK
23
Years of Service
User Offline
Joined: 2nd Apr 2003
Location: United Kingdom
Posted: 5th Apr 2003 19:00
i think 127.0.0.1 is an internal network loopback type of thingy... like an emulated network adapter if u can imagine that.. by the way, how do i get the "code snippet" on my posts? if i click code it dont work

| P4 2.4(533) | 512DDR(333) | GF4Ti4200 64MB | WinXP Home Sp1 | Cup of CoffeE |
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 5th Apr 2003 19:03
you have to select the text you want to be made into code same applyes to images bold under line and itallics [img][/img]

I have a word of advice...
..don't piss on an electric fence!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Apr 2003 22:56
Have you got it working yet?
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 6th Apr 2003 01:57
nope [img][/img]

I have a word of advice...
..don't piss on an electric fence!
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 6th Apr 2003 02:41
localhost or 127.0.0.1 is indeed an IP# loopback. Other special IP# include 192.168.*.* which is internet invisible which meens if you set up a LAN with these IP# and one has internet access, the LAN is not accessible (in theory ). You can also block the internet out with subnets I think, a Class C subnet for instance can access up to 64 machines, that would be 255.255.255.0. Oh wait, i'm off topic and if I go too much further will be out of my depth.... OK shutting up now sir.

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.
Terabyte
23
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 6th Apr 2003 02:57
oh yes it worked now that i do the 127.0.0.1 ip (host and client both running off the same machine)

but will it work on two separate machines.

oh well ill find out tomorrow (1.00am when written!!!)

I have a word of advice...
..don't piss on an electric fence!
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Apr 2003 03:27
As long as the machines can already talk to each other, and you enter the same server IP address into the program, Yyu shouldn't have any problems (I hope).
Neura
23
Years of Service
User Offline
Joined: 4th Jun 2003
Location:
Posted: 4th Jun 2003 21:00
It's nice to see people helping each other out around here.

Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 5th Jun 2003 01:32
I'd note that with almost any firewalls, DBP multiplayer can't send any data at all. To clarify, if your computer has a firewall it's likely that it can recieve data, IE see games/messages, but not send anything.

--Mouse

Famous Fighting Furball
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 5th Jun 2003 17:53
Hmmm... just to point out some corrections, feel free to point me out too if I am wrong though.

Actually, a program is able to send and receive data once the connection is established between the client and server, regardless of the firewall. The main concern is just when establishing the connection, which is usually initiated by the client. By default, firewall only blocks incoming connection. It doesn't block outgoing connection, unless it is configure to do so.

If the client is behind a firewall, and the server is not, the client can still initiate the connection to the server. Therefore, the network communication session can still take place between the client and server.

On the other hand, if the server is behind the firewall, the client won't able to establish a direct connection to the server. Thus, no communication can take place in this case.

Hoped this helps!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/

Login to post a reply

Server time is: 2026-07-12 00:07:28
Your offset time is: 2026-07-12 00:07:28