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 Discussion / [LOCKED] Need serious help with NET games!!!

Author
Message
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 22nd Apr 2007 19:27 Edited at: 22nd Apr 2007 19:34
I'm trying to make a NET game that me and my friends can play together. Before I actually make the game, I need to put the help page for setting up a new game. The dialog window that pops up IS NOT english for me. My dad told me that no one uses serial ports anymore and that today, most people use USB ports and high-speed internet. Does anyone know how to change the settings so it doesn't do serial port settings, and instead USB port settings?

The code that I use for this is here:


Credit goes to whoever helps me

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 24th Apr 2007 04:23
Is it at least possible?

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Apr 2007 07:44
What does serial and usb have to do with the code you posted?


TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Apr 2007 18:56
Just to let you know that the multiplayer commands in DB were intended for writing NETwork games rather than interNET games.

As such, the commands are aimed at connecting computers in the same room - hence the support for serial port connections.

However, native DB TCP/IP interconnection over the internet is possible, but not without problems.

To do it properly, you would be best doing it with a 3rd party enhancement - like, I believe, Tempest. (Someone will correct me if I have the name wrong).

TDK_Man

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 26th Apr 2007 22:06
Ummmmm, OK, then. One more question: What the hell is DB TCP/IP interconnection?

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Apr 2007 23:17
its the internet protocol that just about everything uses for communication. Nearly everything uses TCP or UDP for sending packets or datagrams.


Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 26th Apr 2007 23:20
Then how do you use it in DarkBASIC?

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 27th Apr 2007 06:35
Anyways, can someone give me the link to the Tempest we're talking about now? I'm getting a lot of junk when I google it, like William Shakespeare's play called The Tempest, a band called Tempest, and some technical things about Tempest that all talk about different things.

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Apr 2007 18:54
You really should start by looking yourself for tutorials on subjects that you are struggling with. You can always come back here if there's anything you're still not clear about...

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

Tutorial number 13.

TDK_Man

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 28th Apr 2007 04:02
Quote: "anything you're still not clear about..."

Your multi player tutorial was very good, but did not totally explain how to connect to a server on the internet such as http://www.thegamecreators.com. It did say the IP number, which I found useful, but later it only explained things that had to do with serial port connections.

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st May 2007 03:05
Quote: "Your multi player tutorial was very good, but did not totally explain how to connect to a server on the internet such as http://www.thegamecreators.com"


It didn't explain that because you can't! You're not supposed to.

TGC's server at http://www.thegamecreators.com is a web server and connection is done only with a browser. It's a completely different type of server to a game server.

You have to write your own game client and game server entirely with the DB commands - you can't write a client that will connect onto someone elses server - especially if it's a web server!

TDK_Man

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 1st May 2007 06:40
How do you make a game client? How do you do TCP/IP over the internet?

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st May 2007 06:52
Quote: "How do you make a game client?"


That's what the tutorial you read tells you!

TDK_Man

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 2nd May 2007 02:43
Ahhh. I see. Now for the second question...

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd May 2007 03:08
You mean how do you do TCP/IP over the internet?

Exactly the same as connecting two or more computers in the same room connected via cables on a network.

All computers on the internet have a unique IP address - allocated by the ISP you connect with.

The server/client software you write doesn't need to know where they are - only their IP addresses. More to the point, the clients make contact with the server and tell it their IP address.

TDK_Man

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 3rd May 2007 06:51 Edited at: 3rd May 2007 06:52
Oy vey. For me, this isn't going anywhere. Is it possible to make a code that:

-creates a game server on TCP/IP.
-allows any other user that has the program to join it.

When I try it it opens the Dialog window for serial connection, or I generate a syntax error.

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd May 2007 08:54
OK, here's a chat client and server written in DB Classic. As far as I can remember, the last time I worked on it, it worked fine.

Even if it screws up, it should give you enough info to do your own...

File attached.

TDK_Man

Attachments

Login to view attachments
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 3rd May 2007 13:08 Edited at: 3rd May 2007 13:13
read the code carefully. if you just copy and paste it right in, press F5, and expect it to work, well it won't: (I know because I used these same two programs to figure out troubles I was having with network related stuff many (OK, only 2) years ago.)

the following line:

Quote: "Set Net Connection NetConNumber,"0.0.0.0": Rem <<< Change this IP address!"


this is in the client - 0.0.0.0 is an invalid IP address, you can enter 255.255.255.255 to make it search all IPs it can reach, or a specific IP. It is, however, much faster to set a specific IP to connect to.
For games, you'll likely want to search all available IPs. but in this case of a chat server, you should know that server's IP and just enter it here...



Likewise, the server app has a similar line:

Quote: "Set Net Connection NetConNumber,"0.0.0.0": Rem <<< Change this here!"


in fact, it's not similar, it's identical except for the comment. but here you wouldn't specify 255.255.255.255 -- you'd put in your own IP. so if I was to host this on my network, I'd enter 10.23.1.2 etc...
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 10th May 2007 04:37 Edited at: 13th May 2007 20:06
SimSmall,

The first line of code you gave me, once again, opened the dialog window for serial connection. The other line was what I don't want. Remember, I'm not looking for NETwork connections, but for InterNET connections.

Also, TDK, my computer could not read the .rar. It would be better if you could do a compressed folder and give it to me; my comp would definitely be able to read that.

What happens when when you mix coke, pop rocks, vinegar, and baking soda?
I am currently working on 2 projects: The Ultimate Killing Game & The Turtle Game
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 19th May 2007 03:07
TDK, can you give me your code that isn't .rar?

Aren't I full of questions?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 20th May 2007 01:37 Edited at: 20th May 2007 01:37
I dont see the trouble here... download Tempest or Multisync, and run the commented example programs... They both work perfectly for internet connections.

The IP you specify is your computers IP, found at www.whatismyip.com

A server program recieves all of the games being hosted, stores their data, and when the data is needed by a client they connect to the server and retrieve all of the data. When a game is selected to be joined, the user connects to the host of that game... done.

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 20th May 2007 20:33
But that doesn't make any sense... people that aren't on my network can't connect to my network. Right?

Aren't I full of questions?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 20th May 2007 20:45
No... no. Why dont you just install tempest and run the example, and see what we're all talking about? It would take 5 minutes out of your day.

Servers (from what I understand) work like this:

- When someone creates a game, they send their game data to the server (their IP, game name, game type, etc.)

- When someone wants to find a game to connect to, they connect to the server, and the serer sends them the game data for every game currently being hosted.

- When a game is selected to be joined, the server sends over the IP address and any other relevant information, the connection with the server is broken, and a new connection is made with the selected game host.

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 21st May 2007 02:25
Fine then, I'll do that.

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 21st May 2007 15:17
I didn't give you any code -- I highlighted a line from TDK's example program that you would need to change...

Tempest / Multisync are viable alternatives, but using the in built commands it is possible to achieve internet connections, not saying they're brilliant though.

you would start by performing a checklist for all net connections which direct play can use... option 1 is almost always serial on windows NT based systems (and IPX on windows 9x systems, where IPX is present)...

you can search the checklist... the first three letters from one of the list entries is "int" ... in full, it's called "Internet TCP/IP connection for DirectPlay"... look for the checklist number which starts with "int" and choose that as your connection type...

If you just go ahead and tell it to create a net game without specifying, it will either crash, or use number 1 ... serial. I've never tried to create net games without specifying the connection type, and I'm not going to try it either.

when setting the internet connection (and I'll help you out -- it's usually 4) you also specify an IP address to connect to:

127.0.0.1 if it is a server app, since you don't need to know anyone else's IP in this case, they just need to find yours

255.255.255.255 if it is a client app. It searches all reachable IP addresses, but it is horribly slow...

many here will tell you to use the plugins provided by the community, although I've never used them, there are many good things said about them.
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 22nd May 2007 02:45
Forget about TDK's example program. I can't run it on my computer.
Tempest costs money and Multisync won't run.
Why isn't TDK here? I told him to use a .zip instead of a .rar with his little "chat" program, and he runs away!

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 22nd May 2007 02:53 Edited at: 22nd May 2007 02:54
Tempest does not cost money, why can you not just listen and go download the free plugin. Multisync will run, and so will TDK's example. Either theres a problem with your computer, or you have no clue what you're doing.

Stop being such a prick on the forums, TDK tried to help you out, this isnt a place where people stick around non stop to wait on you hand and foot, we all have lives as well.

Rar files are far superior to zip files, get with the times and download the free winRar program from download.com.

Grow up, actually put some effort into getting this working, or stop asking.

Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 22nd May 2007 03:30
Then why can't you just put a link to the the real, free Tempest, and this discussion will be over!!!

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 22nd May 2007 04:03 Edited at: 22nd May 2007 04:04
Wow...

Lets walk this through, so you dont have trouble in the future.

1. Go to the search box.
2. Type in "Tempest" (without the quotes)
3. Press the Enter key located to the right and up a bit from your space bar.
4. Look (yes, look, as in, doing SOME work on your own, ) for the post called "Tempest - A peer-to-peer UDP multiplayer plugin - Free release" (yes, that says Free Release, incase you're incapable of contemplating what free means).
5. Click that post. Thats done with the mouse now. You'll want to put pressure on the left button. Not too much, dont wana strain yourself.
6. Scroll down to the bottom of the first post, where, what does it say? "You can download it from here". Click the blue, underlined "here" text, and you'll have the plugin.
7. Copy or extract the plugin to the plugins-user folder in the dbp compiler folder, and you're done.

Ce pasa?

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 22nd May 2007 05:27
Lol!

I disappear for a bit to do some work on my web site and upload some media, code snippets and tutorials to my forums and look what happens - all hell breaks out!

OK first of all, with regards to .RAR files, Ruccus is right - they're much better than zip files and you really should install WinRar - as he says it's free (unlike Winzip which you now have to pay for the nag-free version).

Secondly, can you clarify things for all of us by letting us know what version of DB you are using. In my previous posts I've made two (possibly wrong) assumptions...

1. That you were using DBC because you were posting here (the DB Classic board) and that

2. Third-party plug-ins (like Tempest) were DLL's that could be used with DBC - though to do so you would need the enhancement pack installed. I've not used any of them so I don't know.

For these reasons, I posted the DBC native commands code.

If you are using the un-enhanced version of DBC then you can't use DLL's and there's no plug-in folder to install Tempest like you have with DBP.

Hopefully there won't be any more confusion from here on...

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 22nd May 2007 12:17 Edited at: 22nd May 2007 12:46
Quote: "unlike Winzip which you now have to pay for the nag-free version"


well, after 40 days, winrar isn't nag free either, but it does have a nicer looking nag at least...

but the basic comparison is:

winzip opens .zip files

winrar open .rar and .zip files -- .rar usually being smaller, so less time spent downloading...


Another point to make is, if DLLs are unavailable, native multiplayer commands are probably unavailable as well, since they also require DBC enhanced (V1.10 or newer, not sure which version DLLs sneaked in at, also 1.10 I think).


edit: Now, back to the native commands ... assuming you have them -- your initial code appears to not behave to your satisfaction, because you were telling DB to create a game without first telling how to talk to other computers (with set net connection command)
if you don't have a set net connection before the create net game command, it puts a set net connection in for you... but uses the value of 1... serial

So how do you know what they are? Well, you can perform checklist for net connections

you should now have three or four methods available to you... want to see what they are?



that would print out the methods available to you, in the form of:
(Connection Type number) - (Connection type description)

usually in this order:
1 - Serial Connection for DirectPlay
2 - Modem Connection for DirectPlay
3 - IPX Connection for DirectPlay
4 - Internet TCP/IP Connection for DirectPlay

so in this instance, set net connection 4 will tell DB to connect to the internet. At this point, a popup box will appear, saying something to the effect of "Which IP address should I scan for games?"
For a server you would give it 127.0.0.1 (which ALWAYS means yourself)
For a client you would give it 255.255.255.255 which searches ALL IP addresses for games. since you can't always know which computer will be running the server...


if you don't want the popup, you can put this address on the same line as set net connection, either as:
set net connection 4,"127.0.0.1"
or
set net connection 4,"255.255.255.255"

now you've set the net connection, go ahead and create / join a game, and it shouldn't try and use serial anymore... then... try Tempest,see which you prefer best, and then use your favourite...
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 23rd May 2007 03:23
Quote: "yes, that says Free Release, incase you're incapable of contemplating what free means"

That was very rude of you, you should practice some more manners.

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
RUCCUS
20
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 23rd May 2007 03:58
Really? Its not rude of you to expect us all to provide you with a complete working multiplayer engine? Or for you to sit there and not even bother to download and try out some plugins we suggested, and instead ask us to give you some sort of magical answer that doesnt involve work?

Sorry, I may have been rude, but it wasnt by mistake, its clear you didnt do any research into the problem, as you would've realized tempest is free, multisync and tempest both have working internet examples, and you really should've stated whether you had DBCe or just DBC.

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd May 2007 04:27
Quote: "That was very rude of you, you should practice some more manners."


To be perfectly honest with you, it's not surprising the reaction you are getting. What's more, your comments could be construed as rude too:

1.
Quote: "Forget about TDK's example program. I can't run it on my computer."


2.
Quote: "Then why can't you just put a link to the the real, free Tempest, and this discussion will be over!!!"


3.
Quote: "Why isn't TDK here? I told him to use a .zip instead of a .rar with his little "chat" program, and he runs away!"



1. And that's our fault?!

Have you given us any feedback at all as to what happens when you run it? No. All we know is 'it doesn't work' and it 'generate a syntax error'...

I don't post code which has syntax errors.

And if it does, it's only after someone who hasn't got a clue what they are doing has messed around with it and screwed it up!

It worked for me and has worked for others too since I wrote it. My tutorial explains what you have to do and after reading it, the questions you ask clearly show that you've either not read it or not understood a thing you've read!


2. And why can't you look for it yourself? We aren't here to be at your beck and call.


3. Ahhh... I see... you 'told' me to use a .zip instead of a .rar.

That gives me the impression that you want us to do all the work while you sit back and do nothing.

You just aren't helping yourself - or helping us to help you! For example, I've asked you a question and you've totally ignored it!

Each time we have tried to help you, you've just said "it doesn't work". You've not given us any information about what error messages you've got - just gone on to ask another unrelated question!

You are new to DB and are attempting to do stuff well above your ability.

Quote: "What the hell is DB TCP/IP interconnection?"


If you don't know that, what on earth are you trying to write a network game for?

If you aren't prepared to put the effort into learning the basics of DB - ie starting at the beginning like the rest of us all had to do, reading tutorials and actually learning the stuff in them, people are going to get annoyed with you.

TDK_Man

SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 23rd May 2007 12:39
Well, on the plus side: the last post I made wasn't followed up with "it doesn't work", although I think that's more because he hasn't bothered to read it, as it was more than a couple of full-length paragraphs.

Shame really, the only sensible lead I've had to work with is: "It brings up serial settings instead of internet settings" -- I'm pretty sure that the first paragraph after my huge edit has the exact command he needs to get the internet connection working natively.

I have noo idea about Tempest and MultiSync - I do however know that that there is no plugins-user folder in DBC (that's DBP)- I think you have to use DLL commands to get things like that working in DBC
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 31st May 2007 13:48
This guy is more worst than JGS.. seriously..


[B] - LINKIN PARK - [/B]
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 31st May 2007 13:54
Hardly -- perhaps if we see something similar to "Corporate World: Full Demo" in the PA boards, then maybe
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 31st May 2007 14:27 Edited at: 31st May 2007 14:28
Full Demo.. So what that means!? U can play the game to the end and it forces u to pay then ?

Remember the JGS Hospital Tycoon Demo?
I can code it myself..



[B] - LINKIN PARK - [/B]
SimSmall
20
Years of Service
User Offline
Joined: 7th Aug 2004
Location: United Kingdom
Posted: 31st May 2007 16:50
Look it up on the PA board


...Not that Corporate world, or hospital tycoon has anything to do with this thread
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 2nd Jun 2007 02:43
Can a Mod lock this thread? I figured out how to do it.

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?

Login to post a reply

Server time is: 2025-05-29 03:58:36
Your offset time is: 2025-05-29 03:58:36