REM Much thanks to Unseen, and his "useing a sprite sheet" tutorial, so it code I used to do this.SCREEN _NEWIMAGE(600, 400, 32)volume = 1 'gamestart = False 'intromusic = _SNDOPEN("Walking_1.wav", "VOL") '//You need to change this 'according to the name of the music file you use, Ie: bigger_better.mid_SNDVOL intromusic, volume '_SNDLOOP intromusic 'PRINT " Music, By Miles Davis and Jofn Coltrane "_DELAY 1PRINT " MY IDEA"_DELAY 1TYPE Rectangle X AS INTEGER Y AS INTEGER Width AS INTEGER Height AS INTEGEREND TYPESprite& = _LOADIMAGE("ideasprtsheet.png")'// GARY SAYS The sprite we are using has 49 frames, it has 10 frames on the X axis and 5 on the Y axis.'// As we are dealing with an equally spaced sprite sheet we can load all the x/y points in a set of for loops.DIM SpriteImageRect(50) AS RectangleFOR j% = 0 TO _HEIGHT(Sprite&) - (_HEIGHT(Sprite&) / 5) STEP (_HEIGHT(Sprite&) / 5) FOR i% = 0 TO _WIDTH(Sprite&) - (_WIDTH(Sprite&) / 10) STEP (_WIDTH(Sprite&) / 10) SpriteImageRect(rectcnt%).X = i% SpriteImageRect(rectcnt%).Y = j% SpriteImageRect(rectcnt%).Width = _WIDTH(Sprite&) / 10 SpriteImageRect(rectcnt%).Height = _HEIGHT(Sprite&) / 5 rectcnt% = rectcnt% + 1 NEXTNEXTDO '// Draw the images in turn.skip the last image as it is blank. FOR i% = 0 TO 48 _PUTIMAGE (200, 100)-(420, 350), Sprite&, , (SpriteImageRect(i%).X, SpriteImageRect(i%).Y)-(SpriteImageRect(i%).X + SpriteImageRect(i%).Width, SpriteImageRect(i%).Y + SpriteImageRect(i%).Height) _DISPLAY _DELAY .2 kb$ = INKEY$ IF kb$ = CHR$(27) THEN SYSTEM NEXTLOOP
REM Much thanks to Unseen, and his "useing a sprite sheet" tutorial, so it code I used to do this.SCREEN _NEWIMAGE(600, 400, 32)WINDOW SCREEN(200, 100)-(420, 250)volume = 1 'gamestart = False 'intromusic = _SNDOPEN("walking_1.wav", "VOL") '_SNDVOL intromusic, volume '_SNDLOOP intromusic 'PRINT " Music, Garry"_DELAY 1PRINT " MY DRAWINGS "_DELAY 1TYPE Rectangle X AS INTEGER Y AS INTEGER Width AS INTEGER Height AS INTEGEREND TYPESprite& = _LOADIMAGE("dibujo.png")'// GARY SAYS The sprite we are using has 49 frames, it has 10 frames on the X axis and 5 on the Y axis.'// As we are dealing with an equally spaced sprite sheet we can load all the x/y points in a set of for loops.DIM SpriteImageRect(50) AS RectangleFOR j% = 0 TO _HEIGHT(Sprite&) - (_HEIGHT(Sprite&) / 6) STEP (_HEIGHT(Sprite&) / 6) FOR i% = 0 TO _WIDTH(Sprite&) - (_WIDTH(Sprite&) / 2) STEP (_WIDTH(Sprite&) / 2) SpriteImageRect(rectcnt%).X = i% SpriteImageRect(rectcnt%).Y = j% SpriteImageRect(rectcnt%).Width = _WIDTH(Sprite&) / 2 SpriteImageRect(rectcnt%).Height = _HEIGHT(Sprite&) / 6 rectcnt% = rectcnt% + 1 NEXTNEXTDO '// Draw the images in turn.skip the last image as it is blank. FOR i% = 0 TO 11 _PUTIMAGE (200, 100)-(420, 250), Sprite&, , (SpriteImageRect(i%).X, SpriteImageRect(i%).Y)-(SpriteImageRect(i%).X + SpriteImageRect(i%).Width, SpriteImageRect(i%).Y + SpriteImageRect(i%).Height) _DISPLAY _DELAY .2 '////this is the _delay, can be changed to fit the music kb$ = INKEY$ IF kb$ = CHR$(27) THEN SYSTEM NEXTLOOP