| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|||
|
MultiPlayer Through Link Cable?
I've been working on a game for quite some time on my calculator, and have recently become bored with adding the same old lines to do the same old stuff. I noticed that the I/O section of the programming functions has the commands "Get(" and "Send(" so I decided I would try to utilize these to attempt to create a multiplayer feater for my game.
On my first attempt, I wrote a very simple code just as a Proof Of Concept to see if these would work, and it looked like this: Code:
:Lbl A :ClrHome :randInt(1,10)->A :Get(B) :Pause :Send(A) :Pause :If B>5:Then:Output(4,8,"YES"):End :If B<5:Then:Output(4,8,"NO"):End :If B=5:Then:Output(5,9,"MAYBE") :End :Output(3,9,B) :Pause :Goto A :End :Stop I transfered this program to another calculator and ran it simontaniously on both of them and resulted with both calculators returning: 0 NO and I was able to refresh both calculators by using one. (by refresh I mean the result disappear and reappear) and I made sure that both calculators were responding the the single one. So through this test, I know data can be sent, but I'm not sure exactly how to control it. I attempted a "trading" program where I would possibly be able to exchange the contents of a string or a variable, but it was unsuccessful in having any result whatsoever. It looked like this: Code:
:Menu("TRADE CENTER", "SEND", SE, "REVIEVE", RE)
:ClrHome
:Lbl SE
:For(A,1,3)
:If A=1:Then:ClrTable:Shade(3,3):End
:Send(Str1) //I also tried with the variable "B" in place of Str1
:End
:Disp "SENT"
:Pause
:Stop
:Lbl RE
:For(A,1,3)
:If A=1:Then:ClrTable:Shade(3,3):End
:End
:Get(Str1) //same variable attempt as above ^
:End
:Disp "RECIEVED"
:Stop
So if anyone has any idea exactly how you are supposed to use the "Send(" and "Get(" commands and could tell me how it would be greately appriciated ![]() |
|
|||
|
a liitle note
just a little thing... i tried making a link msn messenger..
and i encountered the same problem.. i then found out that if you pause the receiving calculator and then send the data it works |
|
|||
|
could you give me an example?
Do you mean just to do Get(A) PAUSE and then send? and thnx for the reply ![]() |
|
|||
|
...
i think so...
i think that you say Clac 1 Clac2 1->x pause get(x) hope this helps.. i don't know how to send it to the other calculator, but i know how to get a variable from another calc (get(x)). |
|
|||
|
omg... yeah your right... (unco reading moment) what i just said was correct but you already have it... so never mind
|
|
|||
|
Quote:
it's kool Thanks for the attempt though ![]() |
|
|||
|
WOOOT! Figured it out
![]() The Get() function does not need to be in a loop, nor does the Send() function need to be running simultaneously. You simply connect the link cable and do: Code:
Get(A) and it will get the Variable "A" from the other calculator. This also works with strings and most likely works with Lists. Good luck, and happy programming ![]() |
|
|||
|
I know it's been awhile. I back to work on my multiplayer game though :P I have a small problem though that is really bugging me. When I wrote my program on a TI-83, everything worked perfect, because when using the Get() command it will automatically unpause the other calculator. When I ported my program to the TI-84 however, it remains paused until enter is pressed. I have used both the Get() and the GetCalc() commands but they both work the same basic way. I was wondering if anyone knew how to get the TI-84 to automatically unpause the transmitting calculator in the same way the TI-83 does?
|
|
|||
|
just wondering about this....
which cord would you need to run a multiplayer program? do you need the TI-83 cord (the one with the earphone cords on the end) or the TI-84 cord (the cord that goes into almost any device) thanks for your help |
|
|||
|
I think it's called the analogue cord but not sure. It's the cord that's got 2 jacks that look like the headphone conecter ^^
|
![]() |
| Viewing: Dev Hardware Forums > SOFTWARE > TI 83/84 > MultiPlayer Through Link Cable? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|