crayon icon indicating copy to clipboard operation
crayon copied to clipboard

Read from Standard Input

Open blakeohare opened this issue 7 years ago • 0 comments

This is sort of important since pretty much every desktop-faring programming language has this and so even though there aren't perfect equivalents in mobile or JS, it's still sort of a gaping hole in the core library. It'll also make simple tutorials much easier because you can demonstrate certain behaviors more easily than requiring users to basically understand the whole game loop pipeline first.

There are several tricky parts to this though. Most noticeably is the standalone VM runs in its own process and so the inter-process bridge from crayon.exe will have to support STDIN.

Other tricky bits:

  • Exported C# apps do not have a console window. Add a dependency to System.Windows and call MessageBox, maybe?
  • JavaScript - use window.prompt()
  • Mobile - pop open a message box like JS (in fact, the WebView versions may just work with the JS window.prompt() implementation).
  • PHP and future server-side - no equivalent. Just throw a not-implemented exception.

blakeohare avatar Jun 16 '17 10:06 blakeohare