EdgeEffectiveness.

EdgeEffectiveness.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

EdgeEffectiveness.

Post by Argh »

I have done some testing, and have determined that the CPU load appears to be almost identical whether or not I define EdgeEffectiveness.

This seems like a fairly easy optimization that could be done- if EdgeEffectiveness <> defined, then do not do whatever distance-from-center calculation is normally performed, just apply damage after filtering through the Armor array (or whatever data structure that is- forgive me if my grasp of C++ concepts is pretty cruddy).

Yeah, I know, compared to other things, this is a teensy area of improvement- but when you have literally hundreds of shots impacting in lots of places, that starts to add up very quickly. For NanoBlobs or other mass-combat mods, it'd be nice to take this extra "frill" out and gain that bit of speed, if we want to.
Meben
Posts: 5
Joined: 17 Feb 2006, 01:20

Post by Meben »

I don't think Spring uses EdgeEffectiveness; grep can't find it in the sources.

The sources look like a linear falloff. According to http://www.tadesigners.com/guides/Maest ... swtutc.htm, I guess it's like a hardcoded edgeeffectiveness of 0.0.

(Game/GameHelper.cpp::Explosion)
Post Reply

Return to “Engine”