Hi folks,
I'm pondering on what's the best way to handle individual resources in the game. I've had a search of the boards and not really found what I'm looking for.
so far I have a singleton factory with a list of the game resources stored by name and dGDK type. Methods to add, remove, load. Nothing special at the moment.
But I'm thinking is it better to start handling all aspects of the resources (position, animation, collision, etc) in the manager by creating a bunch of wrappers for each dGDK object type ? so for example,
//pseudo code
sprite s = new sprite();
s.x = 10;
s.y = 100;
s.Create();
class baseresource : CDarkGDK
{
//some generic properties such as x y z etc that all items will
//have
}
class sprite : baseresource
{
string name,file;
int x,y,z;
public Create()
{
//dgdk create image
//dgdk create sprite based of the properties
}
}