CLEAR ALL
BACKGROUND RGB(20,20,20)
num=10
BITMAP 1 LOAD "Floyd3.bmp"
DIM x(num),y(num)
DIM xs(num),ys(num)
FOR i=1 TO num
    x(i)=RANGE(0,1279)
    y(i)=RANGE(0,799)
    xs(i)=RANGE(3,5)
    ys(i)=RANGE(3,5)
    SPRITE i BIND BITMAP 1
    s=RANGE(1,5)/5
    SPRITE i SHOW MOVE x(i),y(i) SCALE s,s ROTATE RANGE(0,359)
NEXT i
DO
    FOR i=1 TO num
        x(i)=x(i)+xs(i)
        y(i)=y(i)+ys(i)
        IF x(i)<0 OR x(i)>=1280 THEN xs(i)=-xs(i)
        IF y(i)<0 OR y(i)>=800 THEN ys(i)=-ys(i)
        SPRITE i MOVE x(i),y(i) ROTATE (SPRITE.ROTATION(i)+1) MOD 360
        c=RGB(40,40,40):IF SPRITE.HIT(i) AND 1 THEN c=RGB(255,255,0)
        SPRITE i BORDER c
    NEXT i
    PAUSE
LOOP WHILE INKEY$=""
