Open mwcz opened 7 years ago
how would capture detection work?
Ah, yeah, that would still use radius. I'm not suggesting removing radius completely, just that growth-related functions use mass instead. There's a simple equation to convert from mass (aka volume) to radius and back.
I've been thinking about this, and I think it might be a good idea to swallow the refactoring pill at some point and switch from radius to mass. AFTER 1.0 of course, just thinking ahead.
(since our spheres don't really have a density, mass and volume are equivalent)
Pros
player.mass += 1
. see: https://www.desmos.com/calculator/rpejruzn69player.mass += player2.mass
. now, we have to cut radius in half before adding it because adding two players' radii would increase their total size waaay too fast, but adding mass would naturally increase their radius at a slower rate.The summary is that we're already using "mass", but in a shoehorned fashion by piling scaling formulas on top of a radius system. If we used mass instead, we could replace all our custom complex math with one equation: volume (aka mass) of a sphere.
Cons
@Jared-Sprague thoughts?