Multi-player input in CSD Unit 3?

Hi - this student would like to have 2 moving sprites with input from 2 users on the same keyboard.
Looking through the Unit 3 documentation, I’m not able to help the student with this.
Could anyone point us in the right direction?
Thanks so much!

It looks like they are headed in the right direction. Right now they’ve only named one sprite and they haven’t given it any inputs. If they create a second sprite and maybe use the arrow key inputs for one sprite and WASD inputs for the other, then they could have two users on the same keyboard. I know that’s not super specific to the code itself, but it sounds like a great challenge for the students to tackle!

Hi - I’m sorry, but I copied the wrong version of her code.
This is actually what she has now

Here’s a little help. I didn’t completely clean up the code, but I did move everything inside the 1st draw loop. If the conditional loop that checks for the keys to be pressed is not inside the draw loop, it will only get checked once and once only when the code runs. By moving it inside the draw loop, it is constantly being checked which I think is one of the issues your student was having.

Hope this helps a little!



I actually love playing with this stuff but just have been swamped with the tech support part of my job lately.

Was there supposed to be an attachment or a link with the changes you made to the code?

Thanks again!!

The words “Here’s a little help” are hyperlinked.



Well don’t I feel stupid! Lol

Andrea Burgess