Tutorial
Page 10 of 10
Summary
Using skeletal animation sprites made with Spine is a fantastic way to get smooth and flowing animations into your game. They are also exceptionally useful if you want to have a number of different looking
elements in your game all sharing the same animation and behaviours, and as you have hopefully seen, they are really easy to add and use in your own games.
Obviously Spine sprites are not going to be for everyone, but they are worth giving a serious consideration as they can add a lot extra functionality to a game, as well as save you (the programmer) an awful lot
of work designing graphics and programming them to "fit" together correctly. It is also worth checking out some of the example files that come bundled with Spine, as they show some rather surprising uses for
their animations (like for UI stuff) which may inspire you to use something new in your games.
However, before rushing off to make some sprites, there are a couple of things that you should be aware of that haven't been mentioned so far:
- GameMaker: Studio only permits a single texture atlas per sprite, and so when you set up your Spine sprite, you should have a target platform in mind and target that for the texture page
size. For example, if you are targeting mobile devices, you might want to have your spine texture atlas set for 1024x1024 or less.
- The draw_skeleton function has a tremendous overhead due to the fact that GameMaker: Studio will have to do multiple calculations to correctly position the bones for the given frame, so
it should only really be used as rarely as possible.
- You can debug your Spine sprites using two special functions: skeleton_collision_draw_set and draw_skeleton_collision. Again, these functions are great for debugging, but they require
a bit of processing and so care should be taken.
- In general, Spine sprites are not GPU intensive, but they are CPU intensive, meaning that you will be able to have less of them on screen than you would a standard bitmap sprite.
We hope that you have learned enough from this tutorial to dip into the rewarding world of animations made with Spine and that it has helped you to understand another facet of GameMaker: Studio!
© Copyright YoYo Games Ltd. 2014 All Rights Reserved