Sharing a Keyboard
The first bug has to do with powering up the launcher. If player #1 holds down the S key, the launcher powers up like normal. But, if player #2 then presses the K key, player #1âs power up stops.
This bug happens because thereâs only one keyboard and keyboards expect that only one person is going to press and hold a key. If you press and hold the S key in a word processor, youâll get a bunch of Ss in your documentâthe keyboard repeats the S letter. If you keep the S key down and then hold down the K key at the same time, the computer figures you now want a bunch of Ks added to the document, and switches to repeating the K key.
To make power-ups work when two people are sharing the keyboard, we need to replace keyboard ...
Get 3D Game Programming for Kids, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.