
Tomba Demo Round 2
2 months ago
This is an expansion on vimeo.com/1384642, I added a couple features. Zooming and transparency were pretty easy. The Sprite class has a method for those and it's real straightforward.
Adding the animation frames was a little trickier. You don't actually specify separate frames, but one large sprite image (there's a name for that isn't there?) and tell it how big each block is. The class then divides the sprite map up and assigns each frame a number left to right top to bottom. I just used NextFrame and PrevFrame here, but you can also jump to frames or set NextFrame and PrevFrame to not go sequentially like 0 2 1 3 0 2 1 3... instead of 0 1 2 3 0 1 2 3
The "making everything go away" I'm looking into for putting a menu together out of this. Basically if you don't draw the LayerManager (the container for all the sprites and whatnot) it doesn't show up, and if you stop making calls to it when you're not drawing it (which I didn't do) it should just sit idly in memory until you're ready for it again.
Adding the animation frames was a little trickier. You don't actually specify separate frames, but one large sprite image (there's a name for that isn't there?) and tell it how big each block is. The class then divides the sprite map up and assigns each frame a number left to right top to bottom. I just used NextFrame and PrevFrame here, but you can also jump to frames or set NextFrame and PrevFrame to not go sequentially like 0 2 1 3 0 2 1 3... instead of 0 1 2 3 0 1 2 3
The "making everything go away" I'm looking into for putting a menu together out of this. Basically if you don't draw the LayerManager (the container for all the sprites and whatnot) it doesn't show up, and if you stop making calls to it when you're not drawing it (which I didn't do) it should just sit idly in memory until you're ready for it again.
- Vimeo: About / Blog / Roadmap / Developers / Community Guidelines / Forums / Toys / Help! / Site Map
- Legal: ©2008 Vimeo, LLC / Terms & Conditions / Privacy Statement




.
31
0
1
0
0
Previous Week