So I'm trying to make a turn based multi-calculator game where you can battle other users. The only issue is that I'm not 100% sure how to do so. I've looked into the GetCalc( command and the only other resource I can find is this: http://tibasicdev.wikidot.com/multiplayer#toc1, which helps, but I don't entirely understand it.

I was wondering if anyone has done something similar before and could help me understand how it works.

Thanks.
First question: what calculator are you trying to do this on? Very Happy

You may want to look in the Cemetech Archives for other programs that have multiplayer and try and learn from them. (Although if you wait you'll probably get a better answer from a more experienced programmer than me Razz)
TheLastMillennial wrote:
First question: what calculator are you trying to do this on? Very Happy

You may want to look in the Cemetech Archives for other programs that have multiplayer and try and learn from them. (Although if you wait you'll probably get a better answer from a more experienced programmer than me Razz)


I've looked through the archives for the TI-83 and TI-84 Plus, but the only multiplayer game I could find was "Rock Paper Scissors Lizard Spock", which was unable to run on my TI-84 Plus because it couldn't find String 2.

Also, I'm wondering if I should try to use Assembly instead of Basic to go about doing this. however, I still don't see many multiplayer programs in the assembly section either.
The reason you don't see many of these true multiplayer games around is because it's really a mess to make in basic. There was a routine to assign each calculator an ID:

Code:
Associating a different ID to 2 connected calculators (A will be π or e, but different on both calculators)
2→A:GetCalc(A):e(A=π)+ π(A=e→A

Which should be the first step. This way, each calculator can know wether they are calc 1 or calc 2 and therefore, who goes first. Then calc 1 needs to let the user do his thing, while calc 2 is repeatedly polling calc 1 for the value of A. Once it sees that A has been changed (say from pi to e) then it changes it's own value from e to pi, therefore, making it now the opposite of the initial situation, with calc 2 now being calc 1. Then calc 2 can proceed to request an action from the user, while calc 1 is now polling it. Be careful cause when using the I/O commands, the variable you request will be the one that gets overwritten on your calc. Game goes on until it ends. To signify that the game gas ended, I'd recommend also using the same variable as for the turns, that way you only have to be sending a single variable around. So say if all of a sudden, A is 1 (not e or pi) then both calcs know that that means calc 1 has won, and if it is 2 (still not e or pi), then both calcs know that that means that calc 2 has won.
mr womp womp wrote:
The reason you don't see many of these true multiplayer games around is because it's really a mess to make in basic.


If it's so difficult to do in Basic, would it be better than to use Assembly?
Flyer_95 wrote:
mr womp womp wrote:
The reason you don't see many of these true multiplayer games around is because it's really a mess to make in basic.


If it's so difficult to do in Basic, would it be better than to use Assembly?


Perhaps it would if you were already fluent in assembly.

I'd suggest scrapping this (for now) until either you are comfortable with assembly, or if you decide that BASIC is the better option for you.

Edit: Congratulations, mr womp womp, you are now a super-expert!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement