Open olls opened 10 years ago
For colours we can use colorama or similar external module, or modify colors.py to have fallbacks (\033 for windows)
None of the escape codes will work on Windows. We should probably add support for turning off escape codes.
Works well under Cygwin
:+1: nbinput and escape codes (incl colours)?
The other problem with Windows is that CMD is too narrow and can't be made wider.
Yes, only problems were with arrow keys and some Unicode characters
https://github.com/adoxa/ansicon converts ANSI escape codes to the Windows functions.
Or we could do it manually: https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes (More fun!)
It would be nice if we could get it running on most platforms. I sorta got it running on Windows, the main hurdle to get it running was input, then it is playable. The issues we have are:
The Windows input is only blocking which means we can't use arrow keys on the menu, and the game only runs while the user is inputting.Fixed with 48b162926785036766063dc76bb832de42daa2b6 - non blocking input works on windows.There is a problem with msvcrt.getch returning bytes instead of a string, this causes problems with arrow keys.Fixed with 3a0df67f0dcce9e49f0679ef096acd004dedbb1d - fix for Windows arrow keys input.and arrow keys don't work(No longer used). Add support for turning them off.