Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Twinkle, twinkle ...

May
12,845
164
If you're really bored ...

Code:
setlocal
@echo off
:: turn the cursor off
echos ^e[?25l
cls
on break quit
do forever
    set r=%@random[0,%@dec[%_rows]]
    set c=%@random[0,%@dec[%_columns]]
    :: @char[183] is a dot;
    if %@eval[%@random[0,14] mod 15] == 0 ( screen %r %c ^e[%@random[31,37];1m%@char[183] ) else ( screen %r %c ^s )
    delay /m 1
enddo

It needs ANSI (Windows 10 enhanced console).

It takes a while for the sky to fill (about 1/15 of the character cells).

It probably won't look very good if your backgreoun isn't black.

I'm in a console but it also seems to work in TCMD.

The twinkling looks better if it's faster. 1ms is OK but "delay /m 1" actually gives a random delay of between 1ms and 1 clock tick (about 16ms here). It's better if I remove the delay (or make it 0ms) but that makes my computer's fan come on. :confused:

1600115959078.png
 
Back
Top