#displaying up-to-date info in terminal without clutter.

7 messages · Page 1 of 1 (latest)

plain flax
#

i want to make a game in python that i can play in the terminal (might add gui later). my question is this: how would i display all the info a player would need without making the terminal a unreadable mess? my idea rn is the have it clear the terminal and send a new message with the most up-to-date info, i just dont know how to do that.

fleet eagle
# plain flax i want to make a game in python that i can play in the terminal (might add gui l...

Clearing might lead to flickering etc.

You're probably looking for something like ncurses (https://docs.python.org/3/howto/curses.html) or a higher-level abstraction around it like pytermgui (https://github.com/bczsalba/pytermgui)

GitHub

Python TUI framework with mouse support, modular widget system, customizable and rapid terminal markup language and more! - bczsalba/pytermgui

plain flax
#

i’ll check both of those out thank you

plain flax
fleet eagle
#

It's basically a terminal UI framework

#

Instead of clearing and then printing everything again only certain parts get replaced -> No flickering

plain flax
#

thank you!