FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login

    Questions about performance: tactical missiles

    Scheduled Pinned Locked Moved General Discussion
    37 Posts 14 Posters 3.0k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • AskaholicA
      Askaholic
      last edited by

      I’m not sure why you all are putting so many words in my mouth. I’m not talking about magic bullets or people trying to break the game. I’m talking about making intelligent data driven decisions with a consideration of the system as a whole and not just one piece at a time.

      What I think you should do is make a big table with all of the proposed changes, their possible gains and the drawbacks of doing them. Then they can be ranked and prioritized and you can knock out the low hanging fruit before even worrying about stuff that could potentially break the balance.

      S 1 Reply Last reply Reply Quote 2
      • S
        snoog @Askaholic
        last edited by

        @askaholic said in Questions about performance: tactical missiles:

        I’m not sure why you all are putting so many words in my mouth. I’m not talking about magic bullets or people trying to break the game. I’m talking about making intelligent data driven decisions with a consideration of the system as a whole and not just one piece at a time.

        What I think you should do is make a big table with all of the proposed changes, their possible gains and the drawbacks of doing them. Then they can be ranked and prioritized and you can knock out the low hanging fruit before even worrying about stuff that could potentially break the balance.

        That kind of stuff requires a team really. As it is, Jip made some tools to help him find some performance issues and brings them to our attention to discuss and for him or others to fix. To do it your way with just him or even a couple helpers would take forever to discover most or all things fixable and study their performance drawbacks and possible fixes.

        1 Reply Last reply Reply Quote 0
        • AskaholicA
          Askaholic
          last edited by

          No it doesn’t. Jip already has written a bunch of benchmarks (which he linked above) and in each of these threads he’s posted some timing information. Just compile this data into a single table and you will already be eliminating so much guesswork. It’s a simple organizational thing that will help you gain a lot more insight out of the data that you’ve already collected by looking at the system as a whole rather that just the individual pieces and then forgetting about them.

          1 Reply Last reply Reply Quote 0
          • JipJ
            Jip
            last edited by

            I’m not sure why you all are putting so many words in my mouth. I’m not talking about magic bullets or people trying to break the game.

            My apologies - that was not my intent.

            Jip already has written a bunch of benchmarks (which he linked above) and in each of these threads he’s posted some timing information.

            Knowing about them didn't require a team. Applying them certainly does - as it involves changes in hundreds of files and many of those are hard to test if it is your first time helping. To give an idea:

            • Each projectile can have its own logic.
            • Each unit can have its own logic.
            • Each weapon can have its own logic.

            Take for example the applying of this benchmark: https://gitlab.com/supreme-commander-forged-alliance/other/profiler/-/blob/main/mods/profiler/modules/benchmarking/benchmarks/function-scope.lua

            That is applicable to almost all files in the repository. It isn't difficult to do. It is a lot of information to take in however. And it is just hard to test at times making it tricky for a novel contributor as he'll likely just make typo's.

            I know that last bit because I've done programming sessions with two friends who did not have experience with Lua at the time, but they did have some experience in general. The results are Genesis of the Order Survival and Survival Stranded. I even made snippets for them and in specific of the syntax of Lua because they kept writing it wrong, taking up tons of time because some bits of their code was hard to run.

            I don't know what to add to defend this change. If people seriously disagree then I'll likely just ask a moderator to close this topic in the future.

            A work of art is never finished, merely abandoned

            1 Reply Last reply Reply Quote 0
            • ValkiV
              Valki
              last edited by Valki

              Can't you put this, despite minor balance disruptions, in a ranked mod?

              Then you can really start collecting data.

              JipJ 1 Reply Last reply Reply Quote 0
              • maudlin27M
                maudlin27
                last edited by

                If it can be implemented without changing how high the missiles go then I’d see it as a good change. My main concern (already mentioned above by ofhers) is maps like astro craters where even a slight change in the height of a missile from a cruiser could have a dramatic balance impact (at the moment some but not all missiles can clear the astro cliffs so i expect even a small change could have a large impact in the damage cruisers could do)

                M27AI and M28AI developer; Devlogs and more general AI development guide:
                https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v71-devlog
                https://forum.faforever.com/topic/5331/m28ai-devlog-v150

                1 Reply Last reply Reply Quote 0
                • JipJ
                  Jip @Valki
                  last edited by

                  @valki said in Questions about performance: tactical missiles:

                  Can't you put this, despite minor balance disruptions, in a ranked mod?

                  Then you can really start collecting data.

                  I will not do this - for the same reasons I did not do it for the Cybran drones. This is supposed to be a small issue on Github that new contributors can use as a stepping stone. Adding the creation of a mod that then gets played two times isn't worth the overhead it causes.

                  A work of art is never finished, merely abandoned

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    kdrafa91 @Jip
                    last edited by

                    @jip I wish i understood computers to help you. If you fix pathfinding you will be my hero 😃

                    1 Reply Last reply Reply Quote 0
                    • veteranasheV
                      veteranashe
                      last edited by

                      Do the t3 sub Cruse missiles shoot different as well?

                      JipJ 1 Reply Last reply Reply Quote 0
                      • JipJ
                        Jip @veteranashe
                        last edited by

                        @veteranashe said in Questions about performance: tactical missiles:

                        Do the t3 sub Cruse missiles shoot different as well?

                        They would likely be affected by this change too - yes. But, for now this change is far away from being part of the game.

                        @Askaholic As an example of a significant performance improvement: https://github.com/FAForever/fa/pull/3392 . This branch includes the tactical missile changes for the cruiser (but any tactical missile launcher will have to deal with the changes in the end) and the changes applied to the Zthuee as described in the original post about performance.

                        I've described the changes and why they were made in the PR. The behavior of the Zthuee remain untouched - they work exactly the same. A small copy from the PR:


                        When having 400 Zthuee idling we spent 3 ms / tick on both branches. When we let them ground fire, the results are:

                        • Current default FAF branch: 11 / 13 ms -> 8 / 10 ms for firing
                        • This branch: 8 / 9 ms -> 5 / 6 ms for firing

                        Disclaimer: make sure you are completely zoomed out when checking the performance of the sim. The amount of effects Zthuee spawn do effect the sim and the results if they get rendered.

                        This shows that there is a significant gain to be had for applying the benchmark optimizations to projectiles in general. This includes:

                        • No empty and / or unnecessary table allocations
                        • Upvalue moho functions
                        • Pre-allocating table elements
                        • Inlining of functions

                        Using the benchmarks as a guideline in combination with the profiler as to how often things are called. These changes are a lot less straightforward.

                        A work of art is never finished, merely abandoned

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post