LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-03-2022, 02:41 PM   #1
rico001
Member
 
Registered: Aug 2007
Distribution: TwisterOS lite, Linux in a VM
Posts: 92
Blog Entries: 3

Rep: Reputation: 3
ascii animation in console, and timing/making good screensaver


I was wondering if there was a way to do 2d animation like a paper flipbook in real life, only in the console. I can do some programming, but what I wondered about was scroll rate?
 
Old 05-03-2022, 05:40 PM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,599

Rep: Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546Reputation: 2546

Yes, it's possible.

GNU coreutils includes a sleep command that accepts decimal seconds, and so does Python.

So what have you tried and where are you stuck?

 
1 members found this post helpful.
Old 05-05-2022, 10:52 PM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
There are also libraries that will transform a video into something that plays in a terminal. Or video drivers for terminal.
Have a look at libcaca, or try this:
Code:
mpv --vo=tct somevideo.ext
 
1 members found this post helpful.
Old 05-06-2022, 05:25 PM   #4
rico001
Member
 
Registered: Aug 2007
Distribution: TwisterOS lite, Linux in a VM
Posts: 92

Original Poster
Blog Entries: 3

Rep: Reputation: 3
Post algorithms, :-)

Thank you all for the feedback and new input...
1. Found python software such as clippy: https://pythonawesome.com/create-ani...-command-line/

2. found a Turn any image into ASCII art! (Easy Python PIL Tutorial)


misc..
and found out where the source code to an animated ascii project is... am not stuck so far, am curious to see how the files, and how the ascii art is written to the screen (libcaca looks helpful, thanks)... will have to try to dig through the code and libraries...

So far a basic algorithm from clippy seems to be:
Step a: write the first text file to the screen.
Step b: compare 2 text files and
step c.if the 1st file is different write the changes to the screen.
in the correct columns and rows,
also control timing and error trapping

Notes: hopefully a file cache is available for RAM and screen memory because writing to disk input-output would be slow and lessen the life of the disk
Thanks
Quote:
Originally Posted by boughtonp View Post
Yes, it's possible.

GNU coreutils includes a sleep command that accepts decimal seconds, and so does Python.

So what have you tried and where are you stuck?


Last edited by rico001; 05-06-2022 at 06:24 PM. Reason: typos, added info
 
Old 05-06-2022, 11:29 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
As far as a terminal screensaver is concerned, have a look at this repository (screencast).
 
  


Reply

Tags
animation, ascii mode, asciiart



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cinnamon 18.3 default screensaver timing paxolin Linux Mint 2 05-21-2018 05:04 AM
[bash] ASCII to HEX and hex to ascii ////// Programming 17 05-08-2018 09:55 PM
hex to ascii and ascii to hex ilnli Programming 7 08-31-2007 11:55 AM
how to start timing and print the timing result on portions of java codes ?? alred Programming 2 05-15-2006 10:00 AM
Changing the timing of the screensaver from the kernel console and X11??? Shagrath239 Slackware 8 02-22-2005 09:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration