Issue
Im trying to have something similar to Console.CursorTop and left where i can set the cursor to a specific character. As far as i know i need something called a „Handle“. I found something like this for windows and i know kinda what it is. I need something similar for linux or even cross platform.
I tried finding something in the olcConsoleGameEngine but the codebase was to advanced for me
Solution
For controlling and drawing on the terminal, use curses, specifically ncurses. If you use the wide version, <ncursesw.h>
, you can use wide characters, including basically all Unicode characters. This is portable across operating systems.
(For most terminals, ncurses will use ANSI escape codes, so you could use the escape codes directly, as mentioned by kotatsuyaki in a comment to the question. However, curses libraries also allows better/nonblocking keyboard control, and makes the overall program portable across operating systems, so using curses is usually the better solution.)
For accessing individual pixels, use SDL (for games-like stuff), or Gtk or Qt toolkits (for application-like stuff). These, too, are all portable across operating systems.
In addition to the library itself, you will need also bindings to C# or Python or whatever language you choose to use (unless you use the native language to the library: C for curses/ncurses, SDL, and Gtk, and C++ for Qt).
In Linux, use your package manager to install the required (development!) packages. You will not need to download anything off any web sites.
You can find tutorials for all of these all over the web. Don't be afraid to look at old tutorials for curses stuff: that interface has stayed stable for decades now.
All terminals in Linux do support UTF-8 (because the kernel itself supports UTF-8 for terminal devices), so you can use all Unicode characters (that are included in the fonts used in those terminal devices). If there is an ornery user who uses a non-UTF-8 locale by default, they may not see all Unicode characters unless they run your program with a LANG=C.UTF-8 LC_ALL=C.UTF-8
prefix (choosing the default locale with UTF-8), but that's their choice.
Answered By - Blabbo the Verbose Answer Checked By - Mary Flores (WPSolving Volunteer)