Cooler ASCII Spinners? [closed]

2019-01-15 23:50发布

In a console app, an ascii spinner can be used, like the GUI wait cursor, to indicate that work is being done. A common spinner cycles through these 4 characters: '|', '/', '-', '\'

What are some other cyclical animation sequences to spice up a console application?

18条回答
再贱就再见
2楼-- · 2019-01-15 23:59

If you have more than one character worth of space, you can use animated ASCII art. For example, you can do a progress bar like:

[          ]
[==        ]
[=====     ]
[========  ]

or a "bouncing ball" progress indicator (that moves back and forth) like:

(-*--------) // moving -->
(-----*----) // moving -->
(---------*) // moving -->
(--------*-) // moving <--
(---*------) // moving <--
(*---------) // moving <--

Something more advanced like this loading animation might also work.

Edit: There's also the "executive desk toy"

╔════╤╤╤╤════╗    ╔════╤╤╤╤════╗    ╔════╤╤╤╤════╗    ╔════╤╤╤╤════╗
║    │││ \   ║    ║    ││││    ║    ║   / │││    ║    ║    ││││    ║
║    │││  O  ║ -> ║    ││││    ║ -> ║  O  │││    ║ -> ║    ││││    ║
║    OOO     ║    ║    OOOO    ║    ║     OOO    ║    ║    OOOO    ║

And of course there's the ultimate example of animated ASCII art, if you had the time to implement something similar (it would take "spicing up a console application" to the extreme).

Edit: If your console supports color, you can also spice up an otherwise-boring standard spinner by cycling through colors as you spin. Start off with a red line, then slowly fade through the rainbow up to violet as you spin. This can look especially cool with the "bouncing ball" indicator above if you have the ball "paint" the bar a different color on every pass.

查看更多
做个烂人
3楼-- · 2019-01-15 23:59

All taken from:

http://llizard.cwahi.net/animals.html

Bats Flying!

                   /^v^\
         /^v^\                      /^v^\
                /^v^\

  /^v^\

Flap flap!

                   \^v^/
         \^v^/                      \^v^/
                \^v^/

  \^v^/

Wow wow An Archer!

       /\
      /__\_{)
     |--<<)__\
      \  /  (
       \/   )
           /|
           \ \
           ~ ~

         /|   \
        /_|_{)/
---<<   | |  )
        \ |  (
         \|  )
            /|
            \ \
            ~ ~
             \
         /|{)/
---<<   +-|-)
         \| (
            )
           /|
           \ \
           ~ ~

       /\
      /__\_{)
     |--<<)__\
      \  /  (
       \/ __)
           \ |__
          ~    ~

         /|   \
        /_|_{)/
---<<   | |  )
        \ |  (
         \|__)
           \ |__
           ~    ~


             \
         /|{)/
---<<   +-|-)
         \| (
          __)
           \ |__
          ~    ~

Super Cyclist

                        ---------- __o
                       --------  _ \<,_
                     -------    (*)/ (*)

Wheeeee!

Flying a Kite

                                                /\
                                               '\/
                                              '  +
                                             '     +
                                           '      +
                                         '         +
                                       '             +
                                     '                  +
                                   '
                                 '
                               '
                             '
                           '
                        '
                    '
                '
__          '
\o  .   '
 \\/
 /\
/ /

This fishing one is pretty hillarious as well

http://asciimator.net/kangaroo/fishing.html

查看更多
神经病院院长
4楼-- · 2019-01-16 00:00

I'm glad I'm not the only one crazy enough to waste time on this!

Here are my favourites (some using dos ascii codes):

             classic: "/-\\|";
       bouncing ball: ".oOo";
better bouncing ball: [46, 111, 79, 248, 79, 111]; // (.oO°Oo.)

[180, 217, 193, 192, 195, 218, 194, 191];  // ┤ ┘ ┴ └ ├ ┌ ┬ ┐
[185, 188, 202, 200, 204, 201, 203, 187];  // double piped version of that 
[219, 220, 223];                           // block colours
查看更多
闹够了就滚
5楼-- · 2019-01-16 00:01

In one application, I saw 1,2,3,4,5,6,7,8,9,0.

查看更多
该账号已被封号
6楼-- · 2019-01-16 00:02

Balloons...

. o O @ *
查看更多
放荡不羁爱自由
7楼-- · 2019-01-16 00:05

I wrote one that cycled through the standard \ | / - but the left a _ and moved on to the next position. It was intended to look as though there were a series of spinners, each dropping to the floor before the next one started. The need for this was that my program was repeatedly trying something and waiting for a certain result. I wanted to represent each time it tried and also how many times it had tried without using up a lot of screen space (or count).

After I wrote it it looked a lot less cool than I thought it would, but it served its purpose.

查看更多
登录 后发表回答