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 / Networked games

Author
Message
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 27th May 2009 15:22
Hi,

I am just begining to look at networked games and I have come across what seems to be a problem when trying to use the set net connection statement.

If you use a TCP/IP connection, you have to give the IP adress of the computer as part of the statement. However I cannot find a statement which allows you to detect the computers IP adress. For testing, this has not been a problem as I can find my own IP adress but if I want to write a program which can be used on any computer, having my IP adress as a contant in the program wont help. Thus my question is:

How do you write code which allows the set net connection statement to be used on any computer?

Also out of interest, is there a way to stop your program closing when esc is pressed automatically because I want esc to exit my game but I want control over this so that I can use the free net game statement first.

Thanks for you help,

Lucas Tiridath
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 27th May 2009 17:44
about the ip, i'm not sure, are you using a plugin or DBP's built-in commands? and for the escapekey, you can use "disable escapekey" to make the program not close when you press escape. but don;t forget to make a exit button!

Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 28th May 2009 10:52
Quote: "and for the escapekey, you can use "disable escapekey""


Ty that looks like just the thing I was looking for.

Quote: "about the ip, i'm not sure, are you using a plugin or DBP's built-in commands? "


I'm just using standard DBP commands.

Ty for your help

Lucas Tiridath
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 28th May 2009 16:56
I think the prevailing opinion as that DBP's native commands for multiplay kind of stink. Fortunately there are many multiplayer plugins out there, you should check some of them out:

DarkTCP
Multisync
And then there's DarkNET, which is sold by TGC.



Diggsey: I have a spine and memory, but one memorable guy says he hates me. What am I?
bobbel
15
Years of Service
User Offline
Joined: 5th Jan 2009
Location: In my DBPro case xD
Posted: 28th May 2009 17:30
i agree with that!

*ding ding*
Lucas Tiridath
AGK Developer
16
Years of Service
User Offline
Joined: 28th Sep 2008
Location: Kings Langley, UK
Posted: 28th May 2009 21:56
Thanks, I will look into getting DarkNET and see if that solves the problem.
wickedly kick it
18
Years of Service
User Offline
Joined: 13th Jul 2006
Location: Fort-worth Texas
Posted: 11th Jun 2009 09:04
something i want to say,

i've programmed in dark basic pro for about 3 years now, and i have to say that networking is a tough subject, so dont say "Hey lets make a mmorpg, i have multisync!"
Just start of slow and build up, you have until you die you know

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size << omg my sig was 400x125

Login to post a reply

Server time is: 2024-11-25 04:50:42
Your offset time is: 2024-11-25 04:50:42