Page MenuHomeWildfire Games

optionally unrandomize entity appearance
Needs ReviewPublic

Authored by bb on Tue, Oct 13, 10:43 PM.

Details

Reviewers
vladislavbelov
Summary

As claimed by @vladislavbelov on several occasions (e.g. https://wildfiregames.com/forum/topic/29654-request-sacrificial-knife/?tab=comments#comment-405553), having many different actors affects performance. A way to reduce the effect, but still allow many variants is to optionally disable the randomness. This should limit the number of different variants if disabled, but keeps the old performance if enabled.

Test Plan

Check that it actually improves performance
Check no OOS occurs
Comment on D3034
Think of better descriptions

Event Timeline

bb created this revision.Tue, Oct 13, 10:43 PM

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1648/display/redirect

bb edited the summary of this revision. (Show Details)Tue, Oct 13, 10:49 PM
bb edited the test plan for this revision. (Show Details)
bb requested review of this revision.Tue, Oct 13, 10:51 PM
Freagarach added inline comments.
binaries/data/config/default.cfg
84

I guess you mean variants instead of graphics items?

85

graphics.entityvariety?

binaries/data/mods/public/gui/options/options.json
202

slight and boost are kind of opposite ;)

source/graphics/ObjectBase.cpp
567–568

This sentence is a continuation of Choose a random number in the interval [0..totalFreq) so with the full-stop there this needs to be changed as well.

568

I'm not sure what this all does, but can't you skip the whole searching for a match?

bb updated this revision to Diff 13640.Fri, Oct 16, 8:47 PM
bb marked 4 inline comments as done.
bb added inline comments.
source/graphics/ObjectBase.cpp
568

We sometimes want to force a unit to take a certain form (choose some animation say), I think...

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1656/display/redirect

Freagarach added inline comments.Mon, Oct 19, 10:24 AM
binaries/data/config/default.cfg
84

What is meant with remaining here?

binaries/data/mods/public/gui/options/options.json
202

small and boost are still. I suggest using improvement over boost. Then either slight or small as you wish,

source/graphics/ObjectBase.cpp
570

If randNum is 0 due to entityVariety == false, this will become negative immidiately, I think? (Assuming (*grp)[i].m_Frequency) is a positive integer.) Causing us to break at after the first loop with match == 0?
So it seems to me that we can just set match to 0 and skip the whole randNum thing?

vladislavbelov added inline comments.Mon, Oct 26, 9:55 PM
binaries/data/mods/public/gui/options/options.json
202

Maybe Works best in a new match.? The "game" word (in context of match) in options seems a bit misleading to me.

source/graphics/ObjectBase.cpp
567

entityVariety might be not initialized afaik.

568

Are sure that you need to ask options for each group and each model?

bb updated this revision to Diff 13664.Mon, Oct 26, 10:40 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Mon, Oct 26, 10:40 PM
bb added inline comments.Mon, Oct 26, 10:42 PM
binaries/data/mods/public/gui/options/options.json
202

by the changes it now requires to restart a match, this doesn't have to be done like this, by adding some function setting the parameter on the fly

Successful build - Chance fights ever on the side of the prudent.

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1675/display/redirect