So I'm trying to make a game with two players. Both will have input on the same calculator (I don't have a link so it would be impossible to debug a two-calculator game). But I don't have any idea how I can take input from both at the same time.

I've tried simply running the game engine twice (i.e. when C=1 it will run the engine for Player 1's buttons/coordinates/etc but when C=0 it will run it for Player 2, at the end of each cycle it switches the value).

And just having both input at the same time wouldn't work because it wouldn't give both players a chance to press buttons, one person could just press faster.

I really don't want to have to involve a link in this because getCalc is going to be hell on a real-time game...
You have to use one of the DirectInput assembly programs. You can't do it in pure Basic.
Kllrnohj wrote:
You have to use one of the DirectInput assembly programs. You can't do it in pure Basic.
Yup, Kllrnohj is absolutely correct there. Kllrnohj, do you have any specific suggestions of programs you've used? I don't have any experience with this.
KermMartian wrote:
Yup, Kllrnohj is absolutely correct there. Kllrnohj, do you have any specific suggestions of programs you've used? I don't have any experience with this.


I've never actually used one outside of just seeing if it worked, and that was a long time ago... I'm sure browsing the ti-calc archives would turn up a couple.
Kllrnohj wrote:
You have to use one of the DirectInput assembly programs. You can't do it in pure Basic.


How would go about implementing such a thing in a BASIC program?
Aeromax wrote:
Kllrnohj wrote:
You have to use one of the DirectInput assembly programs. You can't do it in pure Basic.


How would go about implementing such a thing in a BASIC program?


Download one and RTFM
RTFM? Yes, because cursing always improves a sentence. Really, Kllr, did you ever leave adolescence?
magicdanw wrote:
RTFM? Yes, because cursing always improves a sentence. Really, Kllr, did you ever leave adolescence?
No no, he makes a good point, and RTFM is more about the message that whatever the questioner is asking should be self-explanatory. The cursing isn't really the point of RTFM so much in my opinion. For example, if I tell someone to JFGI, I often mean it friendlyly.
KermMartian wrote:
magicdanw wrote:
RTFM? Yes, because cursing always improves a sentence. Really, Kllr, did you ever leave adolescence?
No no, he makes a good point, and RTFM is more about the message that whatever the questioner is asking should be self-explanatory. The cursing isn't really the point of RTFM so much in my opinion. For example, if I tell someone to JFGI, I often mean it friendlyly.


Yeah, you shouldn't take offense from JFGI, people are really doing you a favor when they say this...
But when you say something like that, it shows how little respect you have for that person. It's like if your math professor never taught class because it's all there in the textbook.
magicdanw wrote:
RTFM? Yes, because cursing always improves a sentence. Really, Kllr, did you ever leave adolescence?


Actually I did, hence why words that are labeled "curse words" don't bother me - especially not when they are part of a common acronym Rolling Eyes. Maybe you should try growing up yourself?

Quote:
But when you say something like that, it shows how little respect you have for that person. It's like if your math professor never taught class because it's all there in the textbook.


This is the internet, not your high school. We aren't here to hold your hand and walk you through simple stuff. Guess what? Its going to be the same when you get a job. Besides, I *don't* have any respect for people that can't be bothered to search for the answers themselves before asking for handouts. It reeks of self-righteous "holier than tho" attitude, as they clearly think their time is more important than mine, yet they are asking for my help. Screw that.

The OPs initial question wasn't really something that could be google'd, hence why I answered it. His second question could - it was even mentioned where they could be downloaded already in the thread, hence my response.

Of course, that is also ignoring the fact that they aren't going to be the same, so the only way to get one to work is to RTFM.
Kllrnohj wrote:
Actually I did, hence why words that are labeled "curse words" don't bother me - especially not when they are part of a common acronym Rolling Eyes. Maybe you should try growing up yourself?
My friends consider me to be the most mature person among them, and I rarely curse. Why? Because it's unnecessary, and can make some people feel uncomfortable. When I do curse, I usually have a good reason for it, such as alliteration.

Kllrnohj wrote:
It reeks of self-righteous "holier than tho" attitude, as they clearly think their time is more important than mine, yet they are asking for my help. Screw that.
So their time isn't more important than yours. Fine. Is your time more important than theirs? If it is, you're making yourself "holier than thou," and if it's not, why not give them a break?

Kllrnohj wrote:
The OPs initial question wasn't really something that could be google'd, hence why I answered it. His second question could - it was even mentioned where they could be downloaded already in the thread, hence my response.

Of course, that is also ignoring the fact that they aren't going to be the same, so the only way to get one to work is to RTFM.
Correct, they aren't all going to be the same. In fact, they won't even be what YOU think they "should" be. Have you actually checked if your advice works? Go to ticalc.org, and search for "direct input." All of the results are assembly subroutines, like you said they'd be, but they're all for use in assembly programs! It's impossible to use them in a basic program without further modification. Hence, the question of how to implement them in a basic program is completely justified, and your answer of RTFM is completely unjustified. However, I'm being polite about it and telling you why your answer was unjustified. Would you prefer I just say "search ticalc.org," and wait for you to realize the "error of your ways?" Because I don't do that. I actually have some respect for my fellow human beings.
magicdanw wrote:
Kllrnohj wrote:
Actually I did, hence why words that are labeled "curse words" don't bother me - especially not when they are part of a common acronym Rolling Eyes. Maybe you should try growing up yourself?
My friends consider me to be the most mature person among them, and I rarely curse. Why? Because it's unnecessary, and can make some people feel uncomfortable. When I do curse, I usually have a good reason for it, such as alliteration.
I'm older than both of you, and I never curse. Not that I have a strong moral objection to it, but because there's always a more descriptive phrase for my feelings. I still use JFGI and RTFM, though, as no one would recognize JGI and RTM.

magicdanw wrote:
Kllrnohj wrote:
It reeks of self-righteous "holier than tho" attitude, as they clearly think their time is more important than mine, yet they are asking for my help. Screw that.
So their time isn't more important than yours. Fine. Is your time more important than theirs? If it is, you're making yourself "holier than thou," and if it's not, why not give them a break?
[/quote] Because the long answer is "go to ticalc.org, download one of the programs, and it should describe how to use it. Use is implementation-specific", which is much longer to type than "RTFM".

magicdanw wrote:
Kllrnohj wrote:
The OPs initial question wasn't really something that could be google'd, hence why I answered it. His second question could - it was even mentioned where they could be downloaded already in the thread, hence my response.

Of course, that is also ignoring the fact that they aren't going to be the same, so the only way to get one to work is to RTFM.
Correct, they aren't all going to be the same. In fact, they won't even be what YOU think they "should" be. Have you actually checked if your advice works? Go to ticalc.org, and search for "direct input." All of the results are assembly subroutines, like you said they'd be, but they're all for use in assembly programs! It's impossible to use them in a basic program without further modification. Hence, the question of how to implement them in a basic program is completely justified, and your answer of RTFM is completely unjustified. However, I'm being polite about it and telling you why your answer was unjustified. Would you prefer I just say "search ticalc.org," and wait for you to realize the "error of your ways?" Because I don't do that. I actually have some respect for my fellow human beings.
Surprisingly, even with my Google-fu I'm only finding things that would need to be compiled by someone with some slight assembly knowledge. I think I shall do so, someone remind me if I forget?
KermMartian wrote:
Surprisingly, even with my Google-fu I'm only finding things that would need to be compiled by someone with some slight assembly knowledge.
It's not at all surprising to me. I've noticed a pattern of Kllr being unnecessarily rude to people he considers unworthy of his time, and often rushing out answers because of this. This time, Kllr made this obvious by giving an answer that didn't fit the question, because he assumed the only reason there was a problem with his original advice was that the person he was "helping" was incompetent, rather than consider the possibility that his advice was misleading.

Kllr, I'm not asking you to change how you respond to people. Just, if you think a question is unworthy of your time, instead of answering it incompletely and rudely, don't reply at all! Someone else on the forum, who is more freely giving of their time, will answer it better. Remember that old saying, "If you don't have anything nice to say, don't say anything at all?" It's true. And just because they told it to us when we were young and less mature, it doesn't mean it's unnecessary at this point in our lives. (Though I obviously don't recall it on a regular basis because, well, I learned it the FIRST time they told me!)
KermMartian wrote:
Surprisingly, even with my Google-fu I'm only finding things that would need to be compiled by someone with some slight assembly knowledge. I think I shall do so, someone remind me if I forget?


I'm disappointed in you Kerm, I found one in less than 5 minutes without resorting to any sort of advanced searching (I didn't search at all): http://www.ticalc.org/archives/files/fileinfo/250/25025.html (@magicdanw: Yes, my advice of browsing the ti-calc archives worked - using it I found what the op needed very quickly and easily)

Quote:
So their time isn't more important than yours. Fine. Is your time more important than theirs? If it is, you're making yourself "holier than thou," and if it's not, why not give them a break?


I never said my time was more important than anyone else's, good job on that reading comprehension Rolling Eyes. Hence why I search google for 30min to an hour+ if need be (reading dozens of sites) before resorting to asking for help on a forum/mailing list/irc. I expect nothing less from anyone asking for my help. If you don't like it, then don't ask me for help - its that simple.

Quote:
It's not at all surprising to me. I've noticed a pattern of Kllr being unnecessarily rude to people he considers unworthy of his time, and often rushing out answers because of this. This time, Kllr made this obvious by giving an answer that didn't fit the question, because he assumed the only reason there was a problem with his original advice was that the person he was "helping" was incompetent, rather than consider the possibility that his advice was misleading.

Kllr, I'm not asking you to change how you respond to people. Just, if you think a question is unworthy of your time, instead of answering it incompletely and rudely, don't reply at all! Someone else on the forum, who is more freely giving of their time, will answer it better. Remember that old saying, "If you don't have anything nice to say, don't say anything at all?" It's true. And just because they told it to us when we were young and less mature, it doesn't mean it's unnecessary at this point in our lives. (Though I obviously don't recall it on a regular basis because, well, I learned it the FIRST time they told me!)


I could, of course, refer you to your own advice. Then again, in this case my advice worked perfectly, so all your ranting and raving was for naught, as I was still right (nor was I even rude - at least, not until you showed up. Talk about being counter-productive on your part).

Quote:
My friends consider me to be the most mature person among them, and I rarely curse. Why? Because it's unnecessary, and can make some people feel uncomfortable. When I do curse, I usually have a good reason for it, such as alliteration.


Yes, I can tell, you reek of attempted maturity. Not unlike that of a bossy 10 year old.
And for quick reference, here's the readme for that program:

http://www.ticalc.org/cgi-bin/zipview?83plus/asm/programs/dgk.zip;README.TXT
KermMartian wrote:
And for quick reference, here's the readme for that program:

http://www.ticalc.org/cgi-bin/zipview?83plus/asm/programs/dgk.zip;README.TXT


Okay. So I think I understand the vague idea.

I'm not too good with groups, though. My understanding is that you create a group containing the target program and the assembly input program, and include Asm(prgmDGK instead of GetKey?

also, in after flamewar
Aeromax wrote:
KermMartian wrote:
And for quick reference, here's the readme for that program:

http://www.ticalc.org/cgi-bin/zipview?83plus/asm/programs/dgk.zip;README.TXT


Okay. So I think I understand the vague idea.

I'm not too good with groups, though. My understanding is that you create a group containing the target program and the assembly input program, and include Asm(prgmDGK instead of GetKey?

also, in after flamewar
Wow, I think you totally misunderstood the concept of key groups. A key group != a program group. A program group is like creating an uncompressed archive of multiple programs. A key group is how the calculator organizes keys: you select a group (which are numbered, and generally contain about 5 keys each), then the program returns a bitmask indicates which, if any, of the keys are currently down in the group.
KermMartian wrote:
Aeromax wrote:
KermMartian wrote:
And for quick reference, here's the readme for that program:

http://www.ticalc.org/cgi-bin/zipview?83plus/asm/programs/dgk.zip;README.TXT


Okay. So I think I understand the vague idea.

I'm not too good with groups, though. My understanding is that you create a group containing the target program and the assembly input program, and include Asm(prgmDGK instead of GetKey?

also, in after flamewar
Wow, I think you totally misunderstood the concept of key groups. A key group != a program group. A program group is like creating an uncompressed archive of multiple programs. A key group is how the calculator organizes keys: you select a group (which are numbered, and generally contain about 5 keys each), then the program returns a bitmask indicates which, if any, of the keys are currently down in the group.




Can you give me a step-by-step guide to implementing this program in a BASIC program? Do I need to use a computer?

This be way over my head.
Yes, I can do that. No, you don't need a computer.

Readme wrote:
Direct GetKey v1.2 By Josh Kasten Email: josh6818@hotmail.com AIM screenname: Josh222111


1. How To Use
2. About The Program
3. Up Coming Updates
4. Contact



1. How To Use
=======================
From version 1.2
----------------------------------------------
To use this program put the group number into var Y and then put Asm(prgmDGK
The program will then put the key pressed into var ø.
This program can do multiple keypresses.
To do that you have to take the 2nd numbers on the chart(Note the the munber is just 255-the frist number) from the keys you want to test and add then up then - them from 255.
For ex. lets say i want to see it all 4 arrows button then 1->Y then i would add up 1+2+4+8=15 the 255-15=240 so then you have an if statment if ø=240 then what you want to happen this is easier then that binary thing i was going to tell ya in the last verion.
Or you could use the ex. program i made by pressing two more buttons and writing down the number.
Every combo of keys presses has a differnet number in a group.


Readme wrote:
Group 1:
...................
Down = 254:1
Left = 253:2
Right = 251:4
Up = 247:8

Group 2:
...................
Enter = 254:1
+ = 253:2
- = 251:4
* = 247:8
/ = 239:16
^ = 223:32
Clear = 191:64

Group 3:
...................
Minus2 = 254:1
3 = 253:2
6 = 251:4
9 = 247:8
) = 239:16
Tan = 223:32
Vars = 191:64

Group 4:
...................
Point = 254:1
2 = 253:2
5 = 251:4
8 = 247:8
( = 239:16
Cos = 223:32
Prgm = 191:64
Stat = 127:128

Group 5:
...................
0 = 254:1
1 = 253:2
4 = 251:4
7 = 247:8
, = 239:16
Sin = 223:32
Apps = 191:64
X = 127:128

Group 6:
...................
-> = 253:2
Ln = 251:4
Log = 247:8
X2 = 239:16
X-1 = 223:32
Math = 191:64
Alpha = 127:128

Group 7:
...................
Graph = 254:1
Trace = 253:2
Zoom = 251:4
Window = 247:8
Y= = 239:16
2nd = 223:32
Mode = 191:64
Del = 127:128
  
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