Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 URL networks?
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Taur




PostPosted: Wed Dec 14, 2005 6:08 pm   Post subject: URL networks?

I honestly don't get how to establish a netstream with a URL, can someone give me an example s

and I don't udnerstand the concept, I mean I understand that you can read information from a website, but send info? How does the website owner use it, does it require some coding on the website's behalf?

Can websites me used as um.. links between computers not connected to each other? E.g. send info to website which sends it to the other comp?
Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Wed Dec 14, 2005 6:58 pm   Post subject: (No subject)

It seems that you're talking about a server-client interaction. I don't know about that in turing. Though you may want to look at danshadow's Net tutorial.

And remember to try using the search function available in the forum.
Taur




PostPosted: Wed Dec 14, 2005 7:17 pm   Post subject: (No subject)

well I searched the help in turing for net and I found a URL thing so... Confused
Paul




PostPosted: Wed Dec 14, 2005 7:25 pm   Post subject: (No subject)

Well would you be more specific as to what you're looking for?
I've seen programs like checkers be done over a network by either sending packets in between the two computers, or by going through a server. I have never heard of this "URL thing".
Taur




PostPosted: Wed Dec 14, 2005 7:26 pm   Post subject: (No subject)

okay different example

how do some programs use high scores? Obviously to compare all high scores they have to a) submit thier socres b) read the other scores of other players from somewhere, like in pacman

how would I do this?
codemage




PostPosted: Thu Dec 15, 2005 1:35 pm   Post subject: (No subject)

Coding is done on both sides.

The program sends data in a form that the site will recognize.

The site usually stores data in a database (for highscores, etc).

Then an interactive language like PHP or ASP displays data on the website and/or makes the data available so the user's client-side program can get it from online.

I'm not sure how well Turing would be able to pull something like that off.
Taur




PostPosted: Thu Dec 15, 2005 8:01 pm   Post subject: (No subject)

but it was done on that turing pac man wasn't it?
Albrecd




PostPosted: Wed Dec 21, 2005 10:08 am   Post subject: (No subject)

Which turing pacman are you referring to?
Sponsor
Sponsor
Sponsor
sponsor
md




PostPosted: Wed Dec 21, 2005 3:22 pm   Post subject: (No subject)

If it's high scores local to a single machine you don't need network code at all. If it's global do the following

1. connect to server
2. send high score and user name
3. server generates new high scores list
4. server returns user's position in the list
5. server returns top x scores
6. client displays stuff

Simple! How you do that using the turing net code is beyond me; but the idea behind it is rather easy if you think about it.
ecliptical




PostPosted: Thu Dec 22, 2005 3:23 am   Post subject: I finsihed this!

I just finished writing a Turing Highscore Program I'm going to provide the source as well as a tutorial on how it works...
[Gandalf]




PostPosted: Thu Dec 22, 2005 4:04 pm   Post subject: (No subject)

Does it do something like what Cornflake described? If not, we already have these:
http://www.compsci.ca/v2/viewtopic.php?t=7499
http://www.compsci.ca/v2/viewtopic.php?t=5340
ecliptical




PostPosted: Thu Dec 22, 2005 4:39 pm   Post subject: (No subject)

No mine uploads your score to a webserver. So you can share/compare your accomplishments. No browsers required everything is handled and rendered within a turing window.
Taur




PostPosted: Thu Dec 22, 2005 4:54 pm   Post subject: (No subject)

I'm sorta confused, I see the file streams in both of those, but I don't see where it is opened. Like how does it connect? I mean, with other file streams you specifi the URL or the machine address but with these ones?
[Gandalf]




PostPosted: Thu Dec 22, 2005 4:59 pm   Post subject: (No subject)

Mmm? The two I posted?

They do not connect to a server, they simply read/write to the file which is on your computer, in the same directory as the .exe or .t.

This is a good example of why starting out more complex and going simpler is bad when it does happen.
md




PostPosted: Thu Dec 22, 2005 5:02 pm   Post subject: (No subject)

Taur wrote:
I'm sorta confused, I see the file streams in both of those, but I don't see where it is opened. Like how does it connect? I mean, with other file streams you specifi the URL or the machine address but with these ones?


The examples given are actually for text files, not network interaction. If you want to get files from a webserver you need to connect using a socket (or turing equivalent) and use HTTP queries/comands to talk to the server; sending information requires the same type of thing. Just to clarify network != files. Perhaps someone can write a turing networking tutorial and post it on the wiki?
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 20 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: