This video presents ideas for building ASCII character animations in Windows Batch Files. The code below illustrates an algorithm to create a dynamic effect by first preparing screen changes and then separately displaying them. rem --- Initialize. setlocal EnableDelayedExpansion set /A "MaxBalls = 20" set /A "MaxX = 81" set /A "MaxY = 40" set /A "lines=MaxY+2","cols=MaxX+1" mode con lines=%lines% cols=%cols% for /L %%X in (1,1,%MaxX%) do set "BlankRow= !BlankRow!" for /L %%B in (0,1,%MaxBalls%) do ( set /A "Ball_%%B.c=%%B %% 9" set /A "Ball_%%B.x=!RANDOM! %% MaxX","Ball_%%B.i=(!RANDOM! %% 3) + 1" set /A "Ball_%%B.y=!RANDOM! %% MaxY","Ball_%%B.j=(!RANDOM! %% 2) + 1" ) :PERPETUAL_LOOP rem --- Calculate changes. for /L %%B in (0,1,%MaxBalls%) do ( set /A "Ball_%%B.x += Ball_%%B.i" set /A "Ball_%%B.y += Ball_%%B.j" if /I !Ball_%%B.x! GEQ %MaxX% set /A "Ball_%%B.x = %MaxX%","Ball_%%B.i *= -1" if /I !Ball_%%B.x! LEQ 0 set /A "Ball_%%B.x = 0", "Ball_%%B.i *= -1" if /I !Ball_%%B.y! GEQ %MaxY% set /A "Ball_%%B.y = %MaxY%","Ball_%%B.j *= -1" if /I !Ball_%%B.y! LEQ 0 set /A "Ball_%%B.y = 0", "Ball_%%B.j *= -1" ) rem --- Build Screen. for /L %%Y in (0,1,%MaxY%) do ( set "Row_%%Y=" for /L %%B in (0,1,%MaxBalls%) do ( if /I !Ball_%%B.y! EQU %%Y ( if "!Row_%%Y!"=="" set "Row_%%Y=%BlankRow%" set /A "x2 = Ball_%%B.x + 1" call set "Row_%%Y=%%Row_%%Y:~0,!Ball_%%B.x!%%!Ball_%%B.c!%%Row_%%Y:~!x2!%%" ) ) ) rem --- Display Screen. cls for /L %%Y in (0,1,%MaxY%) do echo(!Row_%%Y! goto :PERPETUAL_LOOP (C) Copyright 2012 Mr Batch Files.