--
[ Picked text/plain from multipart/alternative ]
All,

I'm looking for some advice on how to best structure my code and was hoping
that someone could provide some feedback.

Concept:
Our team is interested in creating a laser beam sight for one of our
weapons.  This effect would be an actual beam starting at the muzzle of the
gun and then intersecting with the world geometry, similar to the sniper
sight from Half-Life 2.  When a player on a team activates the laser sight
it would be visible to himself and conditionally visible to the other
players in the game according to their team affiliation.

Implementation:
The current thought is to implement the beam itself using the C_Beam
construct.  To reduce server load the beams should probably be created as a
client-side effect only, with a bitflag being transmitted between the server
and all clients to indicate when a player is activating this effect.  As all
clients have the eye-vector information of other clients on the server, this
information should allow us to create the effect appropriately.

Question:
A few questions exist about how to properly organize our code for this
system.  Firstly, we were looking for some advice as to where to place the
actual code for the system.  Since this is a weapon-specific effect, the
first impulse we had was to place the code within the appropriate weapon;
however, a fair argument persists that this should be resident in the
SDKPlayer since (we think) placing it there will make it easier to handle
displaying the beam from other players in the server aside from the client.
In addition to that we have some concerns regarding how this will look when
it's finally implemented - do we have the granularity of information we need
on the client from other players to properly adjust the beam's orientation
at appropriate speeds?  There's also the possibility that a better
implementation of what we're going for exists that we don't have the
experience to know about yet as well.

Any advice that any of you can give would be helpful.  While we could just
sludge through the code ourselves and hack something in, learning how to
write efficient code in this SDK is of high value to us and for that we
thought your insight might be helpful.  :)

-Richard "Brackhar" Hough
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to