Here is a medialess sprite builder I made for making colorfull square sprites 32x32 with a glass like reflection on them. Could be used for games like collapse, columns, tetris, etc.
The function here is the heart of the code, I simply create an initial sprite, make it the mouse cursor and when you click the left mouse button I create 99 sprites and throw them all over the screen.
Run this code and and feel free to post comments.
REM Project: SpriteFun
REM Created: 12/25/2006 11:15:28 AM
REM
REM ***** Main Source File *****
REM
makesprite(1,255,127,63)
show sprite 1
hide mouse
do
sprite 1,mousex(),mousey(),1
show sprite 1
if mouseclick()=1
for splash=1 to 99
makesprite(splash,rnd(255),rnd(255),rnd(255))
show sprite splash
next splash
endif
loop
function makesprite(num as integer,R as integer, G as integer, B as integer)
create bitmap 1,36,36
ink rgb(255,255,255),0
box 0,0,35,35
get image 999,1,1,32,2,1
sprite 999,0,0,999
hide sprite 999
box 1,1,32,32,rgb(R,G,B),rgb(R/2,G/2,B/2),rgb(R,G,B),rgb(R/2,G/2,B/2)
set sprite alpha 999,222
paste sprite 999,1,1
set sprite alpha 999,182
paste sprite 999,1,2
set sprite alpha 999,142
paste sprite 999,1,3
set sprite alpha 999,102
paste sprite 999,1,4
set sprite alpha 999,62
paste sprite 999,1,5
ink rgb(22,22,22),0:line 1,1,32,1:line 1,1,1,32:line 32,1,32,32:line 1,32,32,32:dot 32,32
dot 2,2:dot 2,31:dot 31,2:dot 31,31
ink rgb(0,0,0),0:dot 1,1:dot 1,2:dot 2,1:dot 31,1:dot 32,1:dot 32,2:dot 1,31:dot 1,32:dot 2,32:dot 31,32:dot 32,32:dot 32,31
get image num,1,1,33,33,1
sprite num,rnd(screen width()-32),rnd(screen height()-32),num
hide sprite 1
delete bitmap 1
set current bitmap 0
endfunction
I wonder if this kind of stuff would be popular with the medialess challenge thread, but we'll see.
Cheers!