murderv wrote:moraldo, i have just noticed you can feed texture coordinates to the method parameters.. so i should just make a animatedSprite class around this and based on some speed draw different parts of the texture.. would that be the correct way to do it?
Yes, you can just make animated sprites by feeding the sprite manager with different textures or different parts of a texture so that to the user, a different image is shown at every instant. Also you can displace the sprites by changing their destination coordinates.
All you see in sprite based games, you can do by using this kind of methods. It basically depends on your ingenuity.
murderv wrote:another question i have is what about raycasting.. how could i pick any sprite and drag it around the screen?
Well, the sprite manager isn't prepared for that directly. You can program that by checking what sprite is below the cursor, always checking the cursor isn't pointing to a transparent pixel of course.
murderv wrote:ive noticed you use relative coordinate system (0,0) is center of the screen.. shouldnt be hard to chagne that to put (0,0) as top-left corner.
Not at all, that would be easy, as that kind of change of coordinates only requires using an addition over the coordinate components (x+somevalue, y+somevalue). Sorry I have no time now to send you a patch, but it would be actually easy to implement.
murderv wrote:one other question moraldo, what about using materials instead of textures? or even use manualobjects? any advantages over this one ?
It's just using textures for simplicity and efficiency.
murderv wrote:what about colorkey masking or transparency? whats the best way to handle it for sprites?
Use pngs with transparency channel, Ogre will take care by itself (they will be loaded as sprites with transparency automatically)
I'll copy this to the sprite manager thread...
Best regards!