Game Development Community

Connecting to a server with an ip and port

by Jordan Thompson · in General Discussion · 09/25/2004 (1:33 pm) · 9 replies

I'd like the client to be able to enter an IP and Port to a remote server... I'm sure people already ask this a million times but I've spent enough time trying to find a thread... So if someone can point me to a thread/tutorial or possible give some insight on how this is accomplished I'd really appreciate it. I made the correct gui/widgets etc, I just need to know how to use my %ip and %port variables to make the connection.

Thanks,

Jordan

About the author

I like to develop games and run the following websites: http://www.indiegamesstudio.com


#1
09/25/2004 (1:39 pm)
I agree. so how can I host a game on my PC at home and have others just type in an IP and join.. even if I had a static IP (which I don't) isn't that IP address just known to my provider? How can I host a game for others to join? Like the torque demo not over a network but the internet? thx!
#2
05/11/2006 (7:56 pm)
I would also like to know how to add this to TGE.
#3
05/12/2006 (1:47 am)
You will need a global IP in order to connect. You can then set it up so that you forward a specific port to a specific computer on your intranet. You might find some usefull information here
#4
05/12/2006 (5:09 am)
You can specify the port like this: "192.168.0.1:1337"
#5
05/12/2006 (10:01 am)
Okay, I know how to connect to a server though the console, I want to know how to add it where you just type the IP in the joinMission and push connect, instead of typing commands in the console.
#6
05/12/2006 (10:15 am)
You make a GUI that feeds connect(); like you do with everything that has a GUI to it.
#7
05/12/2006 (10:58 am)
I have a TextEdit and Button, how do i tie them together to connect to an IP?
#8
05/19/2006 (10:52 am)
Any help?
#9
05/19/2006 (1:13 pm)
Look at the examples Tek0. They are there for you to learn.

Each TextEdit control can be associated with a global, you type something in the textbox, it gets feeded to the global, and the global is used in your connect function - it's really that simple.