27 Mar 2008

Multi-Missiles Progress

I took a little break, and now I am back into the multi-missiles launcher implementation. I have already setup the model and the XML setup files, and start the implementation. I have to change the firing direction to use the fire_dir joint in the 3D model like the fire particle system. This seems reduntent at first since the angle offset I implemented for the shotgun can already do this, but actually they serve different purpose and also it make more sense both for convenience and logic to have the projectile fire in the same direction of the particle. If I just use the angle offset, it would be hard if I need the direction of projectile and fire particle to be exactly the same because one is adjusted by setting the joint the other by setting number in XML. If I just use the joint, it would be difficult to implement shotgun (needs lot of direction joints) and guns that fire bullet in small random offset angle to simulate inaccuracy (often used in machine gun type of weapon in other action games, this feature I might implement as well).
Another thing I am concerned about is the Launcher class design:

  1. Every Item has 1 launcher, each laucher can have multiple fire points
  2. Every Item can have multiple launcher, each launcher only has 1 fire point

It's hard to say which one is better, or should I say I am not sure which level of abstraction the launcher class should be in. But right now I pick the first option, because it seems to keep the details of weapon lauch system in lower levels and in tighter control. Of course if later I found option 2 to be better I can always modify the code.

No comments: