Original Post
I was toying around, and ended up with this sprite class: It's simple but does its job very well. There isn't any support for motion or animation, that's where the question comes: With the eye one multiplayer and the latency that comes with it, it seems a good idea to keep multiple 'gamestates', like the one last received from the server and the client side predicted one. For the question: how does this combine with the sprites? Should I make copies of the sprites (thereby also duplicating texturing information), or.. I don't know, any ideas?
enum CollisionType
{
NoCollisions,
BoundingCircle,
BoundingSquare
};
class Sprite
{
//...
public:
Sprite(float x_, float y_, float collisionRadius_, CollisionType collisionType_, float textureSize_);
float x;
float y;
float collisionRadius;
CollisionType collisionType;
GLuint texture;
float textureSize;
void draw();
bool collidesWith(const Sprite &other);
};