terminal graphics:

As i tend to utilized the terminal as an output for my code projects over using a more conventional GUI, even though during the process of building this website i have seen just how easy it is to make a nice looking GUI using just a bit of html and css. But that is besides the point, if i can complie, run, and check the output of my code in a aesthetically pleasing way all from the terminal that is the way i would perfer to do it.

therefor i started looking in to how to colour text in the terminal and how to actually clear the terminal screen (there was so many stackoverflow posts that just said to print out 30 newlines and call it a day), those were the 2 big goals of this project(and it admittedly got a bit out of hand) with a lesser goal of this but still a key one to try and accomplish was to port this library over to python

this library is written is rust, although i did think of writing it in python i felt like it needed to be slightly more portable then that, mainly so i could attempt to port this to any other languague i would be using(even though getting this rust code to communicate with python is already a nightmare). The other reason i chose rust was it was low level and fast as well as being memeory safe

to start this library the first thing i wanted to try to do was make a checker board pattern with black and pink, as this would help me to make sure that my background and foreground colours were the right way around. And after a little bit of code i was able to achive this

output from the first test

Ok its admittedly slightly underwhelming but its a start. the next step i decided to do was a little off track, but it was to extract the rgb values from an image and have it print that to the terminal. And these results wernt too bad.

output from the second test

then i realised if i just keep showing more images i can show a full video in the terminal using this and yes, you have guessed correctly. Next i decided to try to play a full video in the terminal and what video may you ask have a watch for yourself

since that small bit of fun, ive have been implmenting the coloured strings structs and possibly some sprite stuff so i can try out how some in terminal game dev

all source code of this bot can be found on my github here