01-05-2023, 10:28 PM
On Linux at least from my very limited knowledge of the subject, there is the need to get how many columns and lines the terminal has. For ANSI stuff cannot use "SCREEN 0" of QB64 because QB64 already has statements to clear the screen, set the cursor, set colors to print and so on. Also "SCREEN 0" would look strange to long-time users of Unix and Unix-like OS's.
I've tried to spread the word about QB64PE but there's next to zero interest from people who couldn't care less about the two powerhouses and aren't Linux distro-hoppers.
There should be a library from Python that could configure a terminal and obtain its settings. Free Pascal has a "Video" unit which deprecates the old "CRT" unit of Turbo Pascal, but it might not do its magic with ANSI escape sequences. Might have a lot to do with "ncurses" or another library.
I wrote a couple of simple games on a system where I was disallowed to have QB64, a couple of years ago. It depends on 80x25 terminal size and does animation frames by simply printing exactly 24 or 25 lines and then holding for a very short time. It was impossible to get functionality like "INKEY$" or "_KEYDOWN" which sucked. It's strictly stuff of standard C libraries like "stdio.h". In one of the games, first the user has to give commands to move around, then the game draws a maze and moves the player's token around. The play resumes as long as the token doesn't crash into a wall LOL.
I wanted to post the C program on this forum but it's C not BASIC...
I've tried to spread the word about QB64PE but there's next to zero interest from people who couldn't care less about the two powerhouses and aren't Linux distro-hoppers.
There should be a library from Python that could configure a terminal and obtain its settings. Free Pascal has a "Video" unit which deprecates the old "CRT" unit of Turbo Pascal, but it might not do its magic with ANSI escape sequences. Might have a lot to do with "ncurses" or another library.
I wrote a couple of simple games on a system where I was disallowed to have QB64, a couple of years ago. It depends on 80x25 terminal size and does animation frames by simply printing exactly 24 or 25 lines and then holding for a very short time. It was impossible to get functionality like "INKEY$" or "_KEYDOWN" which sucked. It's strictly stuff of standard C libraries like "stdio.h". In one of the games, first the user has to give commands to move around, then the game draws a maze and moves the player's token around. The play resumes as long as the token doesn't crash into a wall LOL.
I wanted to post the C program on this forum but it's C not BASIC...