Quote:Original post by theOcelot
Speaking of Weapon points, do they need to be a different class from your generic point at all?
Well apart from the basic X and Y I have 1 or 2 other variables that seem to make sense being there for what I have planned.
Quote:Original post by theOcelot
All your ideas on this one sound fine, but isn't that a separate concern that only Weapon needs to worry about? Of course weapons will have a lot of variety in how multiple attachment points are treated or even supported. But if you've already got it loading from XML, that's probably not too hard.
I suppose it probably would be best for the Weapon to deal with it... I'll have to see how to implement it that way though. It'll need some way of associating a point's unique ID with a firing order. I suppose it was always going to need to include some info on the points to use anyway so I'll just add something to that.
Quote:Original post by Captain P
Using a static object means that there's only one that's shared between all Weapon instances. Doesn't sound like a good idea, since you want multiple weapon and projectile types.
Yeah... I'll have to look into this. I'd thought of making Weapon an abstract base class but I haven't entirely decided yet. I suppose I could probably use XML to make the differences between the weapons. I might use that Type idea.
Quote:Original post by Captain P
I think Command & Conquer: Tiberian Sun made it's units manage their projectiles. Destroying a unit would also remove it's projectiles, heh. :)
Yeah, good point. How might you go about managing Projectiles then? A set of static functions in the Projectile class maybe? With 1 vector/list of Projectiles for all projectiles that exist.
However, then I suppose I'd need more data in the Projectile class to say who the Projectile belongs to or at least what team it's on. How would you manage that? You could have different lists maybe but then we're kind of at square one again.