|
Post by PeterMaria on Jun 24, 2015 18:45:47 GMT -5
Hi TextMode(TEXT_BUFFERED) ResizeSpriteArea(800,600)
Sub SprSetImage(nr,x,y,w1,h1) NewSprite(nr) SprSetxCentre(0) SprSetyCentre(0) SprSetZOrder (1) SprSetSize (w1,h1) SprSetPos (x,y) End Sub
dim a, b, k, r, hop dim x1 ,x2 ,y1 ,y2 x1=400 x2=400
hop=loadTex("png/hop1.png")
for k=0 to 10000 r = rnd()%3 if r=0 then x1=(x2 + 400) /2 y1=(y2 / 2) elseif r=1 then x1 = (x2 / 2) y1 = (y2 + 600) /2 elseif r=2 then x1 = (x2 + 800) /2 y1 = (y2 + 600) /2 end if a = int(y1/2.4) b = int(x1/3.2) SprSetImage(hop,x1,y1,32,32) x2 = x1 y2 = y1 next
while scanKeydown(27)=0 DrawText() WaitTimer(16) wend clearsprites() end
Attachments:png.zip (1.85 KB)
|
|
|
Post by matthew on Jun 25, 2015 4:27:44 GMT -5
Very nice, Peter. :-)
|
|
|
Post by DJLinux on Jun 26, 2015 15:51:57 GMT -5
use the code tags please
|
|