Bullet mass #444

cxong opened this Issue Jul 21, 2016 · 1 comment


None yet

1 participant

cxong commented Jul 21, 2016

Add a mass property to bullets. This will only affect pushback.

Currently pushback is calculated as power * velocity. With mass, this is modified as mass * velocity. For backwards compatibility, mass should be the same as power if not specified.

Usually having pushback affected by power makes sense as the player "feels" how much damage a bullet deals. However decoupling power from pushback means:

  • We can have low-pushback weapons where it makes sense, like the rapid-firing but low damage pulse rifle, or flame weapons
  • We can have high-pushback weapons, like repulsion weapons, or explosion effects
  • The way friction works means that the pushback actually seems wrong for explosions. The C-Dogs explosion "clouds" deal small amounts of damage but over time, which results in very little pushback. Realistic explosions should do a large amount of damage over a short amount of time, with large pushback but low damage for targets further from the epicentre.
@cxong cxong added the enhancement label Jul 21, 2016
@cxong cxong added this to the Wishlist milestone Jul 21, 2016
@cxong cxong modified the milestone: 0.6.3, Wishlist Sep 29, 2016
@cxong cxong self-assigned this Sep 29, 2016
@cxong cxong added a commit that closed this issue Sep 30, 2016
@cxong Add mass parameter to bullets (fixes #444)
Bump bullet json version to 2; old version will
have mass default to power

Also adjust some bullet mass:
- flamer mass 1 (low impulse)
- pulse rifle mass 1 (low impulse)
- heatseeker mass 15 (slightly higher impulse)
- swarmer mass 10 (higher impulse)
- pistol mass 5 (lower impulse)
@cxong cxong closed this in d87525e Sep 30, 2016
cxong commented Oct 14, 2016

Need to update the wiki too, maybe add a negative mass example weapon in techdemo

@cxong cxong reopened this Oct 14, 2016
@cxong cxong closed this in 6f5845b Oct 17, 2016
@cxong cxong added a commit that referenced this issue Oct 17, 2016
@cxong Add bullet mass post (#444) d32ff7f
@cxong cxong referenced this issue Dec 7, 2016

Hitscan weapons #47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment