Sean Cogan
posted this on January 31, 2012 11:03 am
I was wondering if .png is the only accepted image type for the cubes. I'm working on a matching game, and the idea we had was to play a video if the correct group was matched together. As far as I know, video is out of the range of possibility, but would the cubes be able to handle a .gif? Looking forward to seeing your reponses, thank you.
Comments
.gif is certainly supported. The Image helper converts the images in the assets/images directory to the native format of the cubes. I don't know from the top of my head what other formats it supports apart from .gif and .png.
Personally I tell the artist(s) to export their assets in .gif and doing the conversion to 8-bit image mode themselves before exporting the file from Photoshop. This gives them greater control over how their work will be displayed. Elsewhere on the forum you can find a zip-file with a Photoshop clut-file and swatches with the Sifteo native colors.
Video as such is not possible, but you could grab a bunch of frames, export them and load them onto the cubes. Play all the frames sequentially and you've got video playing. Place the different frames in one large column (see the developer documentation) to improve performance. Keep an eye on the size of the image/movie/animation though, storage on the cubes is limited.
Ok, thanks very much! I didn't think of just loading each frame and then playing them in sequence. That makes a lot of sense, thanks for your help.
As a followup question, is it possible to use animated gifs on the cubes or do we have to use sprites consisting of frames?
Patrick, that's actually the question I was asking. You can't use an animated gif, but you can load each frame of the gif and display them in sequence to achieve the same effect.
Thanks Sean and Jochen, wasnt sure what the final anwser was.