We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello guys! :) I inserted "keys broken" moments in my code. I need to record the keyboard input of those "broken-moments" and run them subsequently faster once the keyboard starts working again, in order to let the user realize he has regained control of the system. How can I do that? Thanks in advance!!
Answers
Sounds like a good concept. I have a feeling there are lots of things to be done here. However, you need to keep in mind we know nothing about how you want to do this. Also there are very obscure terms in your post:
What is that?
How? Under what conditions? Ok... maybe the question is when?
I am sure this is related to the above two. It is better if you provide a mcve: https://stackoverflow.com/help/mcve
Kf
I'm really sorry you're right. I'm a beginner and sometimes I forget the proper language. I'm doing a research about frustration in human-computer interaction and I'm using Snake as an investigation tool. So I've modified the game adding some bugs aiming to get the users frustrated while they're playing. I made the input of the keyboard stop working for a few seconds at determined slots of time. Afterwards, the keyboard starts working normally and the user keeps playing.
I'd like to emulate what happens when the computer gets stuck and the user furiously keeps trying to open, for instance, a file: when the computer starts working again the file in question got open as many times as the user tried to open it during the stuck moment. So, in the matter of my case, I'm trying to build this behaviour when the user keeps pushing the keys, that are momentarily not operating, recording somehow which keys he presses, in what order and make them working with delay once the functions of the keyboard start working normally. This is part of the code, the one about the keyboard. I hope it's clearer!
hello, it's good that you have the boolean
keys_broken
use it in
keyPressed()
toeither receive key as it is now OR
receive key to store in a new array of char that you define before
setup()
:char[] charList;
or use an arrayList
in the moment
keys_broken
goes false, fire the arraycharList
to your snake and then empty the arraycharList
againThank you very much!
come back when you need more help
Actually, I'm in need again haha I'm going to open a new discussion if you can check it would be great otherwise have a nice weekend!
sure
if you have a bigger project maybe you can upload it to github?
you can also keep on writing here
keep it here please.
koogs the new discussion would not be about the same problem! So I suppose it's better if I open another discussion but let me know if I have to do it differently!
The key question is, is it the same project that people helping you need to understand? If it is, and you need to explain about the timing and the snake and the keys all over again... then ask your follow-up question in this thread as a follow-up.
Your separate question looks fine, but if at some point you need to share your complete code in each (a question about input, and about sound, etc.) then it is easier and less confusing to share it all in one place and update it as the conversation continues.