38f1f1e5c2391376dea774beb0b9f9747692e5ac
As proposed in the past in #13577. Replace TraitContainer.All() that uses the custom AllEnumerator with TraitContainer.ApplyToAllX() that takes an action as argument. The AllEnumerator.Current function show up in profiling reports since it is used each tick multiple times for multiple traits. The function is 'heavy' because it creates TraitPair<T>'s temporary objects for each actor trait combination. In the past about 20k ITick trait pairs were present during an average multi player game. Using an Apply function that takes an action avoid the need to create these temporary objects. To be able to still use 'DoTimed' somewhat efficiently the measurement was moved to inside the trait container method. Results in a 25% performance improvement in accessing all traits of a certain type. Apply function could be used for other TraitContainer functions as well for further improvements. Test result for calling on a dummy trait on 20k actors a 1000 times: 1315 ms traitcontainer.AllEnumerator (current) 989 ms traitcontainer.Apply (this commit)
…
OpenRA
A Libre/Free Real Time Strategy game engine supporting early Westwood classics.
- Website: http://www.openra.net
- IRC: #openra on irc.freenode.net
- Repository: https://github.com/OpenRA/OpenRA
Please read the FAQ in our Wiki and report problems at http://bugs.openra.net.
Join the Forums for discussion.
Play
Distributed mods include a reimagining of
- Command & Conquer: Red Alert
- Command & Conquer: Tiberian Dawn
- Dune 2000
EA has not endorsed and does not support this product.
Check our Playing the Game Guide to win multiplayer matches.
Contribute
- Please read INSTALL.md and Compiling on how to set up an OpenRA development environment.
- See Hacking for a (now very outdated) overview of the engine.
- Read and follow our Code of Conduct.
- To get your patches merged, please adhere to the Contributing guidelines.
Mapping
- We offer a Mapping Tutorial as you can change gameplay drastically with custom rules.
- For scripted mission have a look at the Lua API.
- If you want to share your maps with the community, upload them at the OpenRA Resource Center.
Modding
- Download a copy of the OpenRA Mod SDK to start your own mod.
- Check the Modding Guide to create your own classic RTS.
- There exists an auto-generated Trait documentation to get started with yaml files.
- Some hints on how to create new OpenRA compatible Pixelart.
- Upload total conversions at our ModDB profile.
Support
- Sponsor a mirror server if you have some bandwidth to spare.
- You can immediately set up a Dedicated Game Server.
License
Copyright 2007-2020 The OpenRA Developers (see AUTHORS) This file is part of OpenRA, which is free software. It is made available to you under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. For more information, see COPYING.
Description
Languages
C#
79.3%
Lua
16%
Fluent
3.1%
Shell
0.6%
Objective-C
0.2%
Other
0.5%