
-----------------------------------
Sean
Fri Mar 14, 2008 4:28 pm

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?

-----------------------------------
Tony
Fri Mar 14, 2008 5:21 pm

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.

-----------------------------------
Sean
Fri Mar 14, 2008 5:54 pm

Re: Sending Pictures?
-----------------------------------
Thank you Tony, answers quite a bit of my questions then.

-----------------------------------
Nick
Fri Mar 14, 2008 6:35 pm

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
Fri Mar 14, 2008 7:19 pm

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.

-----------------------------------
Euphoracle
Fri Mar 14, 2008 7:44 pm

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 

-----------------------------------
Nick
Fri Mar 14, 2008 7:47 pm

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
Sun Mar 16, 2008 3:49 pm

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?

-----------------------------------
Sean
Mon Mar 17, 2008 5:27 pm

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
Mon Mar 17, 2008 5:32 pm

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
Mon Mar 17, 2008 6:04 pm

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
Mon Mar 17, 2008 7:46 pm

RE:Sending Pictures?
-----------------------------------
Basically yes. I suggest getting both then chat, and the sprites done separately first. Then combine them.

-----------------------------------
McKenzie
Mon Mar 17, 2008 8:49 pm

Re: Sending Pictures?
-----------------------------------
You could use an older version of Turing (Pre-4.1)
http://compsci.ca/v3/viewtopic.php?t=8953&highlight=takepic
