Hello,
Basically, the final output that creates a sprite is changing an image to a sprite. When I use the term 'image' I'm referring to how DarkBASIC treats a picture that it will use as a texture or a sprite. This is different than what DarkBASIC refers to as a bitmap. A bitmap in DarkBASIC is a screen. You can think of it as a chalkboard where your images or 3d objects are drawn (don't confuse this with the .bmp format of a picture). You can draw on any of 32 different bitmaps, but the one that you can see is bitmap 0. This is the main viewing screen. Every picture or 3d object that is created can only be seen when displayed on bitmap 0. What good are bitmaps that you can't see? Well, you can use these to draw out of view so that your work area isn't displayed on the main screen. Once your done with your drawings or updates, you switch back to the main screen and only display the changes that you want visible.
That's the basics, now onto your sprite sheet.
Like I said before, to create a sprite, you need an image. On a sprite sheet, there are several pictures that usally represent a different animated position of whatever is drawn. Each one of these pictures can be considered an image. The task is to get the image to the sprite. Now, to make a sprite appear to animate, you have to change the sprite's image. But how do you tell a sprite to change its image? That's very easy: The SPRITE command is all you need. SPRITE number,x,y,image number. If you want a single animated sprite, you don't have to change the sprite number, you only have to change the image number. The next question would be: "but where do I get these image numbers?"
This is where you have to decide what is the best method for you. You could divide your sprite sheet in photoshop into several files, each one representing a single frame. Then you can load each frame into an image number in BarkBASIC using LOAD IMAGE filename,image number. You assign the image number to each picture as you load it. Assuming you create 50 separate files and then loaded them as 50 separate images you could set up a simple loop to animate your sprite:
for img=1 to 50
SPRITE 1,100,100,img
next img
That will cycle through all of the images that you loaded and assigned to an image number.
Another way would be load the entire sheet as a bitmap, and then use the GET IMAGE command to select a specific area on the bitmap and assign it an image number. So if your sprite sheet had 2 pictures across, and 2 pictures down, and it was 200 x 200 pixels wide, you would use something like:
GET IMAGE 1,0,0,100,100
GET IMAGE 2,101,0,200,100
GET IMAGE 3,0,101,100,200
GET IMAGE 4,101,101,200,200
It would be more efficient to use a loop and calculate the x and y positions based on the size and position of each picture.
Once you have the pictures assigned to images numbers, you just cyle through the images for the sprite like in the previous example:
for img=1 to 4
SPRITE 1,100,100,img
next img
You don't need to hide and show the sprite. Just cycling through the image numbers will change the sprite's appearance.
Enjoy your day.