Skip to main content

Corona Sprite sheet starter

I had a quick bash at animating the dinosaur character. I cut and paste arms and legs and tail and saved as a sequence of 4 .pngs.


I put these into Texture Packer, and it spat out a datasheet, which is referenced in the very simple code below, and Bob's your uncle, I've got a clunky moving dinosaur... a bit of polish, and a few more frames and it should look a fair bit better.

-- basic sprite animation

local sprite = require("sprite")

local sheetData = require("ninjadinodata")
local spriteData = sheetData.getSpriteSheetData()
local sheet = sprite.newSpriteSheetFromData("ninjadinodata.png", spriteData )
local spriteSet = sprite.newSpriteSet(sheet, 1, 4)
sprite.add(spriteSet, "runningDino", 1, 4, 350, 0)
local instance = sprite.newSprite(spriteSet)
instance.x = display.contentWidth/2 
instance.y = display.contentHeight/2

Popular posts from this blog


Beta Beater

The Google Developer Console is really very very good.
It's logically set out, and makes it super easy to run a Beta test.
I'm on the tenth iteration of the final draft, and think I've got to a point where I can actually promote the app to Production.
The latest revision changed the icon set, and removed a load more cruft, slimming the app down to just 12.14Mb. I could strip out the iOS icons and lose a few more bytes but the original aim way back when I started on this project was to build a simple game that could be deployed cross platform, so I think I'll try and maintain just one codebase... as I really should submit this to the iTunes store too, to close the project.

Spine again - animating game assets

Laura Tallarday gave a neat demo of how to build an animation in Spine on the CoronaGeek Hangout, so I had a bash at chopping up an image and animating it.
The plan is to add some more sophisticated animations to the new game "Duck sized horse".. but as was discussed in the show adding a whole bunch of spine animated objects might hammer a mobile device... and as the aim is to have 100 tiny duck sized horses, I'd best choose another approach for them.

anyway here's a swaying viking...