Texturepacker and glbasic

Previous topic - Next topic

okee

If i use texturepacker to store graphics in a texture map/spritesheet,and am using Drawsprite to draw sprites
I assume i have to use grabimage to grab the image in the spritesheet using the coordinates that texturepacker
generates. is that correct ?
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

Darmakwolf

Have a look at switching to DRAWANIM or ROTOZOOMANIM, sounds like you're going to cut a lot of performance by constantly grabspriting, which (if I remember right) has issues on some platforms anyway. load it as an anim and position all of the graphics in same-size squares and you should be good to go.

erico

I have no idea about Texturepacker...
But what about USESCREEN? Can´t that help what you want out?

kanonet

I see no point in using texture packer and not using Polyvector. They belong together and are a perfect pair!
If you really only want to use Drawsprite, you need to get your separate sprites 1st, you can do this with Grabsprite like you suggested or with Createscreen. Grabsprite does not work on mobile devices and both will be complicated, probably limiting you how you can pack your sprites (since you can only grab quads). Of cause you just need to do this once at each program start, but it still cost you a lot performance (at each start). Why pack your sprites together if you need to unpack them to use them? It gives you absolutely no advantage but causes a lot of trouble. Really, use separate files+Drawsprite or texture packer+polyvector (2nd one is a really nice solution)!
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

okee

Ok thanks guys
Was just checking out texturepacker and trying to see would it be of any advantage but
obviously not if i'm using drawsprite/drawanim, which i'm quite happy with.


okee
Android: Samsung Galaxy S2 -  ZTE Blade (Orange San Francisco) - Ainol Novo 7 Aurora 2
IOS: 2 x Ipod Touch (1G)

finnk

I use texturepacker + polyvector. Works great. Fast and easy to flip/mirror as well.

Wampus

Quote from: okee on 2013-Oct-14
Ok thanks guys
Was just checking out texturepacker and trying to see would it be of any advantage but
obviously not if i'm using drawsprite/drawanim, which i'm quite happy with.

If you ever did want to change to polyvectors, for speed and scaling flexibility, etc. you can retrofit your code to use polyvectors using functions that mimic the parameters used with drawsprite and drawanim. That way there is minimum disruption to your project(s).

Wampus

For those that use TexturePacker, what format do you export to?

I've been exporting as Gideos format and using a small function to interpret the generated text file. I'm trying to write a custom exporter tonight because I want to be able to export allowing rotation and trimming while also having a simple file format to work with.