Any graphical object or character in a video game is known as a sprite. Code provides instructions for sprites. A game’s program can tell the sprite how to move or react when a button is pressed. Every time Mario bops his head on a box and a mushroom appears, sprites (Mario, the box, the mushroom) are interacting with each other and responding accordingly based on the game’s code. You can create your own sprites to use in your video games!
I used Piskel, an online sprite creation tool, to create my m4ttbit sprite for a blob-catching game I made using Scratch. Piskel lets you create an 8-bit or pixelated sprite and even animate it. To create an animated sprite, you’ll want to develop a frame for each movement. A frame toolbar in Piskel lets you easily create a frame for a standing sprite or a series of images to make it look as though your sprite is running, jumping, or flipping.
When you’re finished creating the frames or series of images for your sprite, export them by saving a zipped folder. This will download each of the frames as an individual image file within a folder. You can also download a .gif image, like my m4ttbit one below, but this isn’t very helpful when creating a video game.
In a Scratch project you can add an image file as a new sprite. The sprite editor looks a lot like Piskel - a series of boxes in the editor let you create or upload an image for each frame of the sprite. Sprite frames in Scratch are known as costumes. Using code blocks in the Looks drawer, you can change your sprite’s costume when a button is pressed or another sprite touches it. Use these code blocks to repeat costume changes to animate your sprite too. This will give your sprite the effect of running, jumping, flying, or whatever movement you want your sprite to do.
You can even share your sprites on Scratch or other online libraries such as OpenGameArt.org. Several sprite designers share their sprite collections for other game programmers to use. Just remember to give credit to the original sprite creator in your game credits. (It’s the cool thing to do.)
To get some ideas and start tinkering around with sprites, try out my Blob Catch Game below. Then remix it on Scratch and swap out my sprites with your own. What would you look like as a sprite? Can you make a sprite of yourself to catch the orange blob aliens with my game’s code?
Click the green flag to start. Use left and right arrow keys to move m4ttbit. Use spacebar to jump.
When the game’s over, click the green flag again and see if you can beat your score!
View or remix the code on Scratch!
I used Piskel, an online sprite creation tool, to create my m4ttbit sprite for a blob-catching game I made using Scratch. Piskel lets you create an 8-bit or pixelated sprite and even animate it. To create an animated sprite, you’ll want to develop a frame for each movement. A frame toolbar in Piskel lets you easily create a frame for a standing sprite or a series of images to make it look as though your sprite is running, jumping, or flipping.
When you’re finished creating the frames or series of images for your sprite, export them by saving a zipped folder. This will download each of the frames as an individual image file within a folder. You can also download a .gif image, like my m4ttbit one below, but this isn’t very helpful when creating a video game.
In a Scratch project you can add an image file as a new sprite. The sprite editor looks a lot like Piskel - a series of boxes in the editor let you create or upload an image for each frame of the sprite. Sprite frames in Scratch are known as costumes. Using code blocks in the Looks drawer, you can change your sprite’s costume when a button is pressed or another sprite touches it. Use these code blocks to repeat costume changes to animate your sprite too. This will give your sprite the effect of running, jumping, flying, or whatever movement you want your sprite to do.
You can even share your sprites on Scratch or other online libraries such as OpenGameArt.org. Several sprite designers share their sprite collections for other game programmers to use. Just remember to give credit to the original sprite creator in your game credits. (It’s the cool thing to do.)
To get some ideas and start tinkering around with sprites, try out my Blob Catch Game below. Then remix it on Scratch and swap out my sprites with your own. What would you look like as a sprite? Can you make a sprite of yourself to catch the orange blob aliens with my game’s code?
Blob Catch Game
Instructions
You have 1 minute to catch and save as many orange blob aliens as you can. You get 2 points for every blob you catch. You lose 1 point for every blob that gets away.Click the green flag to start. Use left and right arrow keys to move m4ttbit. Use spacebar to jump.
When the game’s over, click the green flag again and see if you can beat your score!
Comments