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

Username:   Password: 
 RegisterRegister   
 Sending Pictures?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Sean




PostPosted: Fri Mar 14, 2008 4:28 pm   Post subject: Sending Pictures?

Alright,

Using the Net. functions built into Turing, I was always wondering one thing, is it possible to send .jpgs, and that, and have it appear on the other users machine that you are sending it to?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Fri Mar 14, 2008 5:21 pm   Post subject: RE:Sending Pictures?

Yes. You just have to read the file contents, send it as text, and reconstruct the file on the other side. Look into read and write instead of put and get -- the former might be better for working with binary (as oppose to text) files.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sean




PostPosted: Fri Mar 14, 2008 5:54 pm   Post subject: Re: Sending Pictures?

Thank you Tony, answers quite a bit of my questions then.
Nick




PostPosted: Fri Mar 14, 2008 6:35 pm   Post subject: RE:Sending Pictures?

that shouldn't work

you can use read and write to read the files however I don't think Turing allows you to send them as strings

you might have to use a converter =\
Tony




PostPosted: Fri Mar 14, 2008 7:19 pm   Post subject: RE:Sending Pictures?

if you can figure out the order of bits, you certainly could encode the values in strings and transmit that. Obviously there's more with encoding/decoding and error checking, there is no "send.file.now" function build in for you.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Euphoracle




PostPosted: Fri Mar 14, 2008 7:44 pm   Post subject: RE:Sending Pictures?

Can turing write to anything but text files? The textbook I used in grade 10 simply said "Writing to text files" and the built in procedures wrote a file with <contents><spaces to fill 255 characters from former contents if required><new line><repeat>
Nick




PostPosted: Fri Mar 14, 2008 7:47 pm   Post subject: RE:Sending Pictures?

of course it can all files are the same thing the extension simply tells the computer which program to open the file with so even it if couldn't you could write to a text file then change the extension
Sean




PostPosted: Sun Mar 16, 2008 3:49 pm   Post subject: Re: Sending Pictures?

Can you send it via email, say from a Turing program to someones email, or does it have to be via Turing?
Sponsor
Sponsor
Sponsor
sponsor
Sean




PostPosted: Mon Mar 17, 2008 5:27 pm   Post subject: Re: Sending Pictures?

I'm guessing that it is impossible. But, Mackie and I had a little discussion today, regarding character style MSN chat between each other.

Having a little character, walk around, your chat window at the bottom and such. Is it possible to move characters around while on the Net Module chat, and have both ends recieve what they do?
Mackie




PostPosted: Mon Mar 17, 2008 5:32 pm   Post subject: RE:Sending Pictures?

All you need is a server version, that will control everything and the client version that will be served, the clients client calls home (to the server) when it would like to connect, the server realizing this, send the client all the information including the x, and y of all the characters currently in the map. From that point on the client continues to send the x,y (and other data) to the server, the server will relay all the information back to every client connected.

Sort of started to rant there, hope it made sense.
Sean




PostPosted: Mon Mar 17, 2008 6:04 pm   Post subject: Re: Sending Pictures?

The server is the host.

Then you have your two clients, who have their own sprite/character for the chat.

Every movement is sent to the server, then transmitted to both.

Correct?
Mackie




PostPosted: Mon Mar 17, 2008 7:46 pm   Post subject: RE:Sending Pictures?

Basically yes. I suggest getting both then chat, and the sprites done separately first. Then combine them.
McKenzie




PostPosted: Mon Mar 17, 2008 8:49 pm   Post subject: Re: Sending Pictures?

You could use an older version of Turing (Pre-4.1)
http://compsci.ca/v3/viewtopic.php?t=8953&highlight=takepic
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 1  [ 13 Posts ]
Jump to:   


Style:  
Search: