Closed geraintwhite closed 8 years ago
I suppose its current state is better than what it was doing before?
We probably need to access the key-presses in a queue to get this to work properly... But what is the point, most games which support wasd
don't support arrow keys as well.
Most games support both, and I would have thought it arrow keys are supported in part of the game (menus), they should be supported throughout.
Minecraft doesn't. I think the fact that we have two handed controls also argues against this. We can try it, but I think the input code will be much more complex though.
This current version breaks input()
calls. I wrote it to fit into the old system (NonBlockingInput
, BlockingInput
classes), but I think the system needs changing so we can switch between the two more easily (and disable non blocking input while in input()
calls).
Python 3.2 and Python 3.4 when trying to load a save.
Traceback (most recent call last):
File "main.py", line 312, in <module>
main()
File "main.py", line 19, in main
game(blocks, *ui.main())
File "main.py", line 153, in game
print(out)
BlockingIOError: [Errno 11] write could not complete without blocking
Is there any point still doing this? I agree that arrow keys aren't necessary in NBI.
Add arrow keys support to game Currently arrow keys seem to get buffered (one key too late) Fixes #92