I'm not very familiar. Not because I don't think it's great, it's more my lack of pixel art talent. Anyway, let's see if I get this right...
-- SpriteLoader
-- ver. 1.0
-- moves data from global to project storage
-- ====================
-- This class takes data from global and dumps it into your project.
--
-- To use this class, create an instance in your project.
-- For example: aloader = SpritelyLoader()
--
-- This call will read both keys and images from the global Spritely
-- storage and copy them into your project space.
So, do that first. You only need to load once (or anytime you change one that you need in your project)
--
-- Once in the project data, load the saved string to
-- an image using it's key. For example:
--
-- createImage = loadstring( readProjectData("bob"))
-- anImage = createImage()
It's the loadstring that is a bit confusing. When SpritelyLoader copied your image in, it put in a seperate file. This file is a string (text) of code that can be executed (loaded). The confusing part is that you can't see it from Codea. The very easy part is, you don't have to do anything complicated to use it.
-- To display your images, you'll need to load them into
-- a sprite. The command looks like this
-- sprite(anImage, 100, 100, 32, 32)
-- Good luck!
Then you just use it.
Unfortunately, the best way to put a sprite in at the moment is to use the "print" function in Spritely, then copy / paste the code into your project. If the size of the code becomes an issue, there's a version floating around where people smarter than me have added compression.
Hopefully, one day soon we'll be able to trade project files again, and you won't have to shove those images into code.
Hi Mark, thanks for that. I've copied the data into my project, but how do I use it? I used the spritelyloader originally, but haven't used the "print" method. I've got two sprites, so do i need to change every img.set() to myimagename.set() for each image? Do I need to paste the image "prints" to separate tabs too? How do I call this data so I can call it via sprite(myimagename) in the main programme?? Cheers, dan
It looks like you're new here. If you want to get involved, click one of these buttons!