In this topic Need Help With Sounplay I started getting some ideas, that went on into using images too,
OldDoslover was also helping, and it got as far as being called "4kids". It was so long ago, and now what I have is more related to the animations, background images, etc, but of course the sounds will be important too, So anyway now I decided rather then bump the old topic, to start a new topic,
"Just For Kids",
This is sort of a "starter" or introduction, animation. The artwork is very simple, not real good, and I need to get what we had in the previous thread, and add that on,..if I can,.. anyway,..
here it is:
REM Much thanks to Unseen, and his "useing a sprite sheet" tutorial, so it code I used to do this.
REM This is being worked on and compiled with qb64 sdl version 0.94 for linux
SCREEN _NEWIMAGE(600, 400, 32)
WINDOW SCREEN(200, 100)-(420, 250)
volume = 1 '
gamestart = False '
'http:////No music or sound at this time.
'intromusic = _SNDOPEN("walking_1.wav", "VOL") '
'_SNDVOL intromusic, volume '
'_SNDLOOP intromusic '
PRINT " JustForKids"
_DELAY 1
PRINT " MY DRAWINGS "
_DELAY 1
TYPE Rectangle
X AS INTEGER
Y AS INTEGER
Width AS INTEGER
Height AS INTEGER
END TYPE
Sprite& = _LOADIMAGE("justforkids.png")
'http:// GARY SAYS The sprite we are using has 49 frames, it has 10 frames on the X axis and 5 on the Y axis.
'http:// As we are dealing with an equally spaced sprite sheet we can load all the x/y points in a set of for loops.
'http:// IN This case 18 frames
DIM SpriteImageRect(50) AS Rectangle
FOR j% = 0 TO _HEIGHT(Sprite&) - (_HEIGHT(Sprite&) / 2) STEP (_HEIGHT(Sprite&) / 2)
FOR i% = 0 TO _WIDTH(Sprite&) - (_WIDTH(Sprite&) / 9) STEP (_WIDTH(Sprite&) / 9)
SpriteImageRect(rectcnt%).X = i%
SpriteImageRect(rectcnt%).Y = j%
SpriteImageRect(rectcnt%).Width = _WIDTH(Sprite&) / 9
SpriteImageRect(rectcnt%).Height = _HEIGHT(Sprite&) / 2
rectcnt% = rectcnt% + 1
NEXT
NEXT
'DO
'http:// I decided not to loop
'http:// Draw the images in turn.skip the last image as it is blank.
FOR i% = 0 TO 18
_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 .5 'http:////this is the _delay, can be changed to fit the music or change speed
kb$ = INKEY$
IF kb$ = CHR$(27) THEN SYSTEM
NEXT
'http:// I added this to have the las image "pause" a while, I guess the "backround"
'http://could alos be added here ?
FOR i% = 17 TO 17
_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 5 'http:////this is the _delay, can be changed to fit the music or change speed
NEXT
'LOOP
'http:// The next image would be the "background", I still need to do that,
'http://That will be on a different sprite sheet, which also would have the animals that make the sounds
'http://(I think,) what is your opinion ?
The sprite sheet is attached.
Edited: I have changed the sprite sheet to a .png image, also edited the code accordingly
Also NOTE: On this I am using qb64 SDL version 0.94 for linux to write and compile
Edited: I did mention this here, before, but perhaps, was not very clear,. so here we go again,
IMPORTANT NOTE Please read this, and I suggest reading the entire thread, so that when you get to the most recent changes or mods, and code you understand what is going on, (hopefully

) The main thing is
ALL of the source code, and demos, in this thread is being written, and when compiled, using the
QB64 SDL V.094 and please keep the results, or comments, related to if it works, or dosen't, in this version, I have started another thread, where I have been trying to do some with this using the GL version,
http://www.qb64.net/forum/index.php?topic=10816.msg90702#msg90702
That would be the appropriate place to post any results, that one has if they are using the GL version, thank you , and thank you all for your interest.