idea: Animated fonts
idea: Animated fonts
I have been thinking of some things and thought of animated fonts
It would use an individual character timeline.
the way I'm thinking you could actually do it in a text mode(very slow though) by using a buffer font and dynamically changing individual chars
Is this a good idea and is ther any uses anyone can think of for this
It would use an individual character timeline.
the way I'm thinking you could actually do it in a text mode(very slow though) by using a buffer font and dynamically changing individual chars
Is this a good idea and is ther any uses anyone can think of for this
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re:idea: Animated fonts
The idea is decent, but i think the uses are limited, unless you want to write a console-art-based adventure.
For general purposes though, you can try doing a / - \ | / - \ | loop on some generally unused character.
Personally i think its a waste of cpu time doing it that way, but who knows what uses it has more.
Oh and, don't animate text
For general purposes though, you can try doing a / - \ | / - \ | loop on some generally unused character.
Personally i think its a waste of cpu time doing it that way, but who knows what uses it has more.
Oh and, don't animate text
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:idea: Animated fonts
I like the implimentation and if your gonna use it, got for it!
Re:idea: Animated fonts
In the old v2os it uses this in it CLI to show activity, it uses unused font to do a mini graphic equaliser sort of effect.
http://v2os.v2.nl/old/
http://v2os.v2.nl/old/
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:idea: Animated fonts
if that's all that matter, then yes, you can certainly reprogram characters fast enough to display animations (during vertical retrace, for instance). With today's hardware, you could probably even reprogram them safely while the screen retraces (e.g. do different animations in upper-side and down-side of the screen still using the same character if no character is in the "middle side").
the animation will be nothing else than reprogramming on timer interrupt, in a way ... or better, in a "wait retrace" loop.
the animation will be nothing else than reprogramming on timer interrupt, in a way ... or better, in a "wait retrace" loop.
Re:idea: Animated fonts
yer, i agree that a wait retrace loop would be best for that method, something like
except better than that
Code: Select all
while(1){
advanceChar();
wait(500);
}
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:idea: Animated fonts
now, let's get a step back and wonder "why do people want animation while the computer is busy ?" ... most of the times, answer is "because that let us know whether it is busy or just crashed".
If you print out an "animated character" and then just do your stuff, you'll lose the point: all the user will know is whether interrupts work or not (which he also can know by e.g. pressing 'num lock' and see whether the led toggles).
E.g.
vs.
Now you may argue "we could have nicer animations than just "\|/-". true. You may say too "i can do sample #2 with animated char and a control character saying 'step to next animation frame now'". True as well.
Yet if you want to have not one but several progress indicators running at their own speed (indicating the progression of separate threads for separate disks, for instance), you'll have to use a new animated character for each one. I feel defining a couple of "animation frame" in the font (if you're not happy with "\|/-" and prefer a pacman-like animation, or whatever).
Now you're free to go your own way, of course.
Another nice example of reprogramming characters on the fly was the implementation (e.g. in Norton Utilities for DOS) of a smooth mouse cursor (i mean, cursor-shaped with pixel-precision move). There were actually 4 reprogrammable characters for the mouse and the driver was snooping what characters were behind the cursor to compose at run-time 4 new chars representing the bitmap of the cursor over those 4 letters. Piece of cake to do, even on a 486. All you needed was a "true" NxM font rather than fonts with an "extra column".
If you print out an "animated character" and then just do your stuff, you'll lose the point: all the user will know is whether interrupts work or not (which he also can know by e.g. pressing 'num lock' and see whether the led toggles).
E.g.
Code: Select all
// i assume here "\a" is our animated character ...
printf("Checking file systems, please wait ... \a\n");
fflush(stdout);
while (clusters_to_check<all_clusters) {
check_cluster(cluster_to_check);
clusters_to_check++;
}
Code: Select all
// i assume here "\a" is our animated character ...
printf("Checking file systems, please wait ... z");
while (cluster_to_check<all_clusters) {
check_cluster(cluster_to_check);
cluster_to_check++;
printf("\b%c",((char[])"\|/-")[cluster_to_check%4]);
}
printf("\n");
Yet if you want to have not one but several progress indicators running at their own speed (indicating the progression of separate threads for separate disks, for instance), you'll have to use a new animated character for each one. I feel defining a couple of "animation frame" in the font (if you're not happy with "\|/-" and prefer a pacman-like animation, or whatever).
Now you're free to go your own way, of course.
Another nice example of reprogramming characters on the fly was the implementation (e.g. in Norton Utilities for DOS) of a smooth mouse cursor (i mean, cursor-shaped with pixel-precision move). There were actually 4 reprogrammable characters for the mouse and the driver was snooping what characters were behind the cursor to compose at run-time 4 new chars representing the bitmap of the cursor over those 4 letters. Piece of cake to do, even on a 486. All you needed was a "true" NxM font rather than fonts with an "extra column".
Re:idea: Animated fonts
or even if you didn't use a custom font you could do that; every 500ms just change the character in that posistion and have the character somewhere as a "non-froze" checker
edit:
considering how good of an idea I though that was I implemented it in my OS!!!
edit:
considering how good of an idea I though that was I implemented it in my OS!!!