You know after reading this again.. if you're trying to simulate realistic
bullets, I've got a suggestion...

I've developed a projectile simulator which takes things like wind/velocity
into account using only a tiny structure of data, these are replicated to
the clients and batch rendered using the meshbuilder class... so you have to
lead distant targets and all of that jazz as if the projectile was real.

What I'm trying to get at is you really don't need entities for something
this simple.. instead create a manager entity with (add/remove/simulation
methods) to store limited data about projectiles, such as the current
position,angles, and bitflag for its type... then every x ms, simulate all
the projectiles by running a raycast along their pos/plane however many
units(based on the projectile type set by a flag).. and then bumping their
position up along it.. and repeating until it hits a an object, then do your
hit effects/deal your damage. This can be predicted by the client so you
don't have to send any sort of positional update, and is many times cheaper
than simulating an entity for _every_ bullet, you can even use this sytem to
simulate slower projectiles like rockets which have to explode on contact.

There's even more optimizations you can make, such as adding a delay to the
actual damage raycast based on the distance and time the bullet would take,
calculated from the intial raycast when the weapon was fired which is uber
cheap (Planetside does something like this), but that's less accurate and
probably out of scope for your project. I've got to make optimizations
everywhere I can, though

in the future I'll probably write a tutorial/code dump for this, but you
should try doing something like this instead of creating a new entity for
each bullet

From: ibutsu <[EMAIL PROTECTED]>
Reply-To: hlcoders@list.valvesoftware.com
To: hlcoders@list.valvesoftware.com
Subject: [hlcoders] Crossbow bolts/projectiles and hitgroups
Date: Sun, 26 Jun 2005 01:11:25 -0400

Hello, I've made a bullet/projectile class based off the crossbow
bolt, but I've noticed that the crossbow bolt (and thus my
projectiles) do not provide hitgroup information, is there any
(preferably easy :) way to have this implemented, if it is at all
possible?

Thanks for your help,

- ibutsu

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


_________________________________________________________________
Powerful Parental Controls Let your child discover the best the Internet has
to offer.
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
 Start enjoying all the benefits of MSNĀ® Premium right now and get the
first two months FREE*.


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

Reply via email to