Saved Bookmarks
| 1. |
Solve : Trying to understand snake.bat's realtime input system? |
|
Answer» So I've been pondering this for quite a while, but I still cannot figure out how the real time input works in snake.bat. If anyone understands it and would be willing to walk me though it's process, It would be much appreciated. real time input worksBatch programs do not have real time input. They are batch programs. By definition they are background tasks. Explain what you think the program does. Then we can focus on just that little bit of code that does what you DESCRIBE. That code is much to large to post here. Tell us what you think it does and somebody here with exact the few lines of code that do what you think it does. It uses xcopy and a feature where the character is echoed, and that character is extracted to tell which character was pressed. Post in the snake.bat THREAD and Dave is most often HAPPY to answer specific questions Quote from: foxidrive on April 01, 2014, 11:18:09 PM Post in the snake.bat thread and Dave is most often happy to answer specific questionsAgreed. Why not go straight to the source and ask the question.The XCOPY input hack is not that complex. If you study the code and run some experiments, you should be able to figure it out. The interesting bit is how the game uses multiple processes and communicates between them via files. This is the critical design that allows the input to be non-blocking. See http://www.dostips.com/forum/viewtopic.php?p=31035#p31035 for a HIGH level explanation of the inter-process communication. Dave Benham |
|