Difference between revisions of "PRJ-Motion:Skins"
(Created page with "==Motion: Skins== Motion will be programmed in such a way that characters can be represented on sprite sheets that a single image file. The skin image is loaded at any given t...") |
|||
Line 2: | Line 2: | ||
Motion will be programmed in such a way that characters can be represented on sprite sheets that a single image file. The skin image is loaded at any given time, but each sprite from the file is '''blitted''' and shown, instead of the entire image. With the low resolution graphic style of the game, it is an uncomplicated matter for players to quickly and easily create their own player skins to import into the game. | Motion will be programmed in such a way that characters can be represented on sprite sheets that a single image file. The skin image is loaded at any given time, but each sprite from the file is '''blitted''' and shown, instead of the entire image. With the low resolution graphic style of the game, it is an uncomplicated matter for players to quickly and easily create their own player skins to import into the game. | ||
− | One file has twelve sprites, as opposed to twelve individual sprites in twelve individual files in some folder. The way the program works, the player skin is preloaded into memory and simply only has to show a blitted portion of the graphic. The program simply would not run as efficiently if it had to load and show one of twelve different | + | One file has twelve sprites, as opposed to twelve individual sprites in twelve individual files in some folder. The way the program works, the player skin is preloaded into memory and simply only has to show a blitted portion of the graphic. The program simply would not run as efficiently if it had to load and show one of twelve different image files per frame, because it would also have to unload the previous image file before it could then load and show show the new one. |
[[File:CS_Lisa_B.png|Lisa Johnson]] | [[File:CS_Lisa_B.png|Lisa Johnson]] |
Revision as of 21:53, 28 November 2013
Motion: Skins
Motion will be programmed in such a way that characters can be represented on sprite sheets that a single image file. The skin image is loaded at any given time, but each sprite from the file is blitted and shown, instead of the entire image. With the low resolution graphic style of the game, it is an uncomplicated matter for players to quickly and easily create their own player skins to import into the game.
One file has twelve sprites, as opposed to twelve individual sprites in twelve individual files in some folder. The way the program works, the player skin is preloaded into memory and simply only has to show a blitted portion of the graphic. The program simply would not run as efficiently if it had to load and show one of twelve different image files per frame, because it would also have to unload the previous image file before it could then load and show show the new one.
This is the Lisa sprite, one of the default skins to be included/hard-coded into the game. The top row has, from left to right, Standing, Walking 1, Walking 2, Jumping, Falling, and Wall-Slide. The bottom row has six frames for the running animation:
This is how Motion handles its player skins.