Randomly spawning sprites, assuming that you use SPVAR for everything and not different variables, can be done by checking for the next available sprite, and creating a new sprite in a random location. example: IF RND(300)==0 THEN FOR I=0 TO 511:IF !SPUSED(I) THEN BREAK:NEXT SPSET I,80 SPVAR I,0,RND(50):SPVAR I,1,RND(50) ENDIF But that's a crude example, but it hopefully it will help.