Author |
Message |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: Fri Mar 14, 2008 5:54 pm Post subject: Re: Sending Pictures? |
|
|
Thank you Tony, answers quite a bit of my questions then. |
|
|
|
|
![](images/spacer.gif) |
Nick
![](http://compsci.ca/v3/uploads/user_avatars/19644337547e837b41d67a.png)
|
Posted: 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 =\ |
|
|
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: 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. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
Euphoracle
![](http://compsci.ca/v3/uploads/user_avatars/11170373664bf5f25f636f1.png)
|
Posted: 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> |
|
|
|
|
![](images/spacer.gif) |
Nick
![](http://compsci.ca/v3/uploads/user_avatars/19644337547e837b41d67a.png)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
Sean
![](http://compsci.ca/v3/uploads/user_avatars/47413941748406f441f83e.png)
|
Posted: 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? |
|
|
|
|
![](images/spacer.gif) |
Mackie
![](http://compsci.ca/v3/uploads/user_avatars/217548454cee912ae1202.png)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
McKenzie
![](http://www.wizards.com/global/images/swtcg_article_27_pic3_en.gif)
|
|
|
|
![](images/spacer.gif) |
|