Sending Data to a Server

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
RightBehindu
Posts: 26
Joined: 23 Dec 2013 07:07

Sending Data to a Server

#1 Post by RightBehindu » 23 Dec 2013 07:11

Hey guys!

I am probably pretty bad at this compared to most of you, but I have figured out how to get data from a website and store it, but if I was to obtain a server, is there a way I could send data to it and make an 'Online' batch file game, or program?

If you have any tips or ideas, I would appreciate it.

Thanks

~Matt

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Sending Data to a Server

#2 Post by foxidrive » 23 Dec 2013 10:11

Do you want to make a multi-player game that runs over the internet, using batch code?

You might find that a difficult task... The third party wget.exe can download information from a web server (which a local batch file can process to do things for the game), as can a VB script, but there will be latency issues, slow access, and they are the initial problems you will find.

Your server may have to use an FTP server to accept the data from all the batch file clients, to transfer the information about the game progress.

Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Sending Data to a Server

#3 Post by Blyanadams » 23 Dec 2013 18:44

RightBehindu wrote:Hey guys!

I am probably pretty bad at this compared to most of you, but I have figured out how to get data from a website and store it, but if I was to obtain a server, is there a way I could send data to it and make an 'Online' batch file game, or program?

If you have any tips or ideas, I would appreciate it.

Thanks

~Matt


what language do you know besides batch
what server are you talking about? web server? ftp server?
how did you get data from website?
what website?
you can definitely send data to and from client and server. That's how internetworking works.
Further describe what are you trying to achieve.

RightBehindu
Posts: 26
Joined: 23 Dec 2013 07:07

Re: Sending Data to a Server

#4 Post by RightBehindu » 23 Dec 2013 22:35

Thank you for both of your replies.

@Foxidrive - I have used wget.exe before, I used it previously to get DLC and updates for a game I made. But that is not really the issue here :/. And to your second point, how?

@Blyanadams - I know limited amounts of other languages, I know a bit of JavaScript and a bit of C#. Pretty much a bit of everything, but it is all very limited. I was talking about an FTP server, I believe. I got data from the website via a program called wget.exe, as mentioned above by Foxidrive. This website was my own website, where I simply uploaded files. Have any tips for me?

Thanks.

Matt.

Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Sending Data to a Server

#5 Post by Blyanadams » 23 Dec 2013 22:54

RightBehindu wrote:@Blyanadams - I know limited amounts of other languages, I know a bit of JavaScript and a bit of C#. Pretty much a bit of everything, but it is all very limited. I was talking about an FTP server, I believe. I got data from the website via a program called wget.exe, as mentioned above by Foxidrive. This website was my own website, where I simply uploaded files. Have any tips for me?

Thanks.

Matt.


What kind of data you got from the website? Is it going to be used for your "batch" game?
So are you going to program a game that makes use of a web browser? if you are, then go for a "web" game.
Or is it what you are doing something like this:

Gamer open a command prompt. Execute the game. All game data will be transferred to FTP server that is hosted at your website. If your batch game needs data, your code will get from that FTP server, or your website , everytime using wget. Am i correct in this sense?

If this is what you are going to do, then yes, of course you can do it. As long as you have tools to make the transfer , such as wget, curl etc and you get familiarize with DOS/batch command syntax, you should be able to create this type of game. many people has done DOS batch games before. search google.

RightBehindu
Posts: 26
Joined: 23 Dec 2013 07:07

Re: Sending Data to a Server

#6 Post by RightBehindu » 23 Dec 2013 23:12

Let us put it in another sense. If were to make, for example, an instant messenger. The user would type something in, it would SEND the information that the user messaged to the server, and then the other people in the instant messenger could refresh, when doing so I would get all the new data from the server with, for example 'wget.exe', and display it for them to see.

My problem is, how is the 'Sending Data to the server' part done. I can't seem to find anything on it.

Thank you again for replying.

Matt

Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Sending Data to a Server

#7 Post by Blyanadams » 23 Dec 2013 23:59

RightBehindu wrote:My problem is, how is the 'Sending Data to the server' part done


when you do networking, its mostly about sockets, and socket programming. tools like wget already is programmed with "networking" in mind through some socket library. wget is a C program, compiled and ready for you to use. So you don't have to do your own socket programming. that's why you just need to use it with the necessary parameters. You can search the web for socket programming to understand more on networking if you are interested.

there are various tools you can use beside wget. wput, ftp, curl etc. you can do some research on them if you like.

RightBehindu
Posts: 26
Joined: 23 Dec 2013 07:07

Re: Sending Data to a Server

#8 Post by RightBehindu » 24 Dec 2013 00:22

Okay, thank you very much for your help.

Blyanadams
Posts: 23
Joined: 20 Dec 2013 05:41

Re: Sending Data to a Server

#9 Post by Blyanadams » 24 Dec 2013 00:43

RightBehindu wrote:Okay, thank you very much for your help.

no problem. just use these tools in your DOS/batch code you should be able to create a simple "DOS" batch game for the hobbyist. you can search the forum also for such games as i think some veteran has done some games with purely batch.

RightBehindu
Posts: 26
Joined: 23 Dec 2013 07:07

Re: Sending Data to a Server

#10 Post by RightBehindu » 24 Dec 2013 04:42

Well, I have created some full on batch games before, like 30,000 + lines of code. But that was ages ago and it is a little buggy. If you want you can check it out here:

www.auragamespro.weebly.com

Thanks

Post Reply