Game Development Community

Projectile.. why is this not a ShapeBase?

by Anthony Lovell · in Torque Game Engine · 10/24/2002 (8:26 am) · 4 replies

I'm brand new to TGE and want to contribute aerodynamic drag effects to Projectiles. However, I have an immediate question on the class hierarchy's structure.

Projectile seems to be a GameBase subclass and I see value in moving it to become a ShapeBase subclass. Pardon if I have this wrong, but wouldn't this give Projectiles's datablock the data members

F32 mass
F32 drag (I presume this is a drag coefficient)

which are necessary to perform the calculations. Additionally, I guess that being a ShapeBase allows a 3D object to represent it in the game (which for me is more desireable than a particle emitter or similar).

Can someone comment on this? Would it be possible/desireable to relocate Projectile to have ShapeBase as its superclass? Am I thinking of this in the wrong way?

tone

#1
10/24/2002 (8:29 am)
Projectiles DO have a shape...
I think it wasnt made a ShapeBase because of the overload that would mean... ShapeBase has lots of things that aren't of any use to a projectile, like energy, etc.... it would be easier to add drag and mass to projectile than changing it to ShapeBase.
#2
10/24/2002 (9:52 am)
ShapeBase has lots of Tribes2 cruft such as weapon related stuff mount points and lots of other things that would be baggage for a projectile. Much better to just all what you need to Projectile.

I am currently working on a redesign of ShapeBase, going to call it something else, and strip out all the Tribes2/Player/Vehicle functionality or rename and generacise (sp) it or move it down to where it belongs.
#3
10/24/2002 (5:29 pm)
Yeah, shape bases can:
have moves
have health and energy
be controlled
among other things...


projectiles just need to move and explode... and render, of course
#4
10/25/2002 (12:30 pm)
I can work on your recommendation for now... thanks!

tone