Hello All!
I have a long inching doubt about certain way to deal with objects.
Basicly there's two views and ways to deal with multiple objects of similar type:
1) you make a "goblin" object, another "panthom" object, "your char" object and "companion char" object. Then you use instance variables, families, containers and each object deals with it's own animations.
2) you make one "enemy" object wich contains all the different animations for all your enemies and then you spawn instances of this object with a starting animation frame related to the enemy you want.
Road 1 feels easier but you end up having many object types too similar and i heard that, for some reason, having many object types even if they are not active as instance slow down the game.
Road 2 feels better to avoid objects population, a little more counter intuitive in a graphical environment like c2 is buut this is the thing:
How much can hit an instance (and many instance) of this kind of object vs instance of individual object types? I feel like having 50 enemies in one object type will kill fps.
But i see this approach being used by many developers and i want to know how well it went against using multiple object types.
I will try to make a version of one protoype in method 2, using arrays like Kyatric did in one of his examples. But if you can tell me how it was for you it would help me a lot.
Thanks people!