pycraft icon indicating copy to clipboard operation
pycraft copied to clipboard

Windows

Open olls opened this issue 11 years ago • 8 comments

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:

  • [x] ~~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.
  • [x] ~~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.
  • [ ] Colours are the only real problem although it is playable without them.
  • [ ] In Windows the clear screen code (and all escape codes...) doesn't work, ~~and arrow keys don't work~~ (No longer used). Add support for turning them off.

olls avatar Apr 25 '14 11:04 olls

For colours we can use colorama or similar external module, or modify colors.py to have fallbacks (\033 for windows)

geraintwhite avatar Apr 25 '14 23:04 geraintwhite

None of the escape codes will work on Windows. We should probably add support for turning off escape codes.

geraintwhite avatar Jun 10 '15 20:06 geraintwhite

py

olls avatar Nov 20 '15 11:11 olls

Works well under Cygwin

olls avatar Jan 26 '16 14:01 olls

:+1: nbinput and escape codes (incl colours)?

geraintwhite avatar Jan 26 '16 14:01 geraintwhite

The other problem with Windows is that CMD is too narrow and can't be made wider.

geraintwhite avatar Jan 26 '16 14:01 geraintwhite

Yes, only problems were with arrow keys and some Unicode characters

olls avatar Jan 26 '16 14:01 olls

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!)

olls avatar Apr 15 '16 14:04 olls