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

Recent and upcoming engine changes

Scheduled Pinned Locked Moved Modding & Tools
14 Posts 3 Posters 1.2k 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.
  • C
    Ctrl-K
    last edited by Ctrl-K 11 Oct 2023, 20:43

    Bug fixes:

    • UserUnit:GetCustomName asks for 2 arguments, but actually needs 1
    • ForkThread crashes with cfunction, so we forbid this
    • Unit:SetStat no longer crashes the game. Returns true if stat wasn’t set. Must be set with Unit:GetStat
    • CMauiControl:SetAlpha tweaks: dont change whole mask, only alpha part and check for 3rd argument as boolean

    New Features bugs eventually 😏:

    • 5th argument for IssueBuildMobile as flag for picking all units
    • introduced table.clone (which is partially safe tbh). Clones given table (game freezes in attempt to clone recursive table, eventually leading to stack overflow. So, suitable for non recursive table only.)
    • new category OBSTRUCTSBUILDING for props. Props with this category obstruct building on them
    • new category CANLANDONWATER for air units. Units with this category can chill on water (like transports do)
    • units won’t reclaim being paused anymore
    • Unit:GetCommandQueue returns a list of commands of a given unit
    • During init stage for certain hardware game will pick different cpu cores to run faster
    • New method to WorldView:
      • ProjectMultiple projects multiple vectors at once
    • New methods for UserUnit:
      • GetInterpolatedPosition returns position of a unit interpolated by current frame
      • GetFractionComplete returns float from 0 to 1
    • New method to MauiBitmap:
      • SetColorMask sets color mask of bitmap
        colorbmp.gif
    • Console command ui_StrategicIconScale. Sets icons' scale. Useful for high res screens.
    • Custom World Rendering: adds 2 functions for drawing circle and rect in world.
      • UI_DrawRect
      • UI_DrawCircle
        5ae6b8af-395d-4d95-8d7a-c17c8657c4ba-image.pngb06fadd8-10f4-484e-832f-c4146ac26bbd-image.png
        both functions must be called within OnRenderWorld of gamemain.lua.
    • new UI function CopyToClipboard(string) copies string to clipboard

    “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
    — Steve Jobs.
    My UI Mods
    Support me

    M 1 Reply Last reply 11 Oct 2023, 21:01 Reply Quote 8
    • C
      Ctrl-K
      last edited by 11 Oct 2023, 20:45

      All releases can be found here.

      “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
      — Steve Jobs.
      My UI Mods
      Support me

      1 Reply Last reply Reply Quote 0
      • M
        maudlin27 @Ctrl-K
        last edited by maudlin27 10 Nov 2023, 21:01 11 Oct 2023, 21:01

        Thanks for the work on improving things!
        A few queries on the changes:

        @azath0th said in Recent and upcoming engine changes:

        ForkThread crashes with cfunction, so we forbid this

        Does this mean it no longer crashes, or that ForkThread itself is forbidden? (The latter would mean all my mods would break)

        Unit:GetCommandQueue returns a list of commands of a given unit

        Will this still be in the format of a table, with 1 entry for each command/order, and with a sequential numerical index (i.e. 1, 2....x) such taht table.getn will work on the result?

        GetFractionComplete returns float from 0 to 1

        Sometimes when dealing with what I presume are floats in other contexts with FAF I've noted FAF can fail to round things - will a complete unit always return 1 when complete, rather htan e.g. 0.9999999 or 1.00000001/similar?

        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

        C 1 Reply Last reply 11 Oct 2023, 21:16 Reply Quote 0
        • C
          Ctrl-K @maudlin27
          last edited by 11 Oct 2023, 21:16

          @maudlin27
          Forkthread works as before except it doesn’t accept cfunction anymore.

          You can see the way @Jip used GetCommandQueue for distribute orders, I wasn’t the one who made this change.

          Once unit reaches complete state (that means it received enough build time) this value must become 1.

          “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
          — Steve Jobs.
          My UI Mods
          Support me

          1 Reply Last reply Reply Quote 0
          • C
            Ctrl-K
            last edited by 12 Oct 2023, 12:14

            Interesting fact: all launchers are loading based on integer progress value. Due to this progress never advances when you stall resources. I think I can fix it at some point, but I may break something eventually:D

            “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
            — Steve Jobs.
            My UI Mods
            Support me

            1 Reply Last reply Reply Quote 1
            • S
              Sheikah
              last edited by Sheikah 10 Dec 2023, 13:03 12 Oct 2023, 13:01

              @Azath0th I don't believe it is purely integer. Past effort to identify what goes one with building missiles can be found here. https://github.com/FAForever/fa/issues/711#issuecomment-303080789

              C 1 Reply Last reply 12 Oct 2023, 13:10 Reply Quote 0
              • S
                Sheikah
                last edited by 12 Oct 2023, 13:05

                And it was determined to be intentional so might want to discuss with others before changing it

                C 1 Reply Last reply 12 Oct 2023, 13:12 Reply Quote 0
                • C
                  Ctrl-K @Sheikah
                  last edited by 12 Oct 2023, 13:10

                  @sheikah it is, it checks for enough income and increments counter.

                  “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                  — Steve Jobs.
                  My UI Mods
                  Support me

                  1 Reply Last reply Reply Quote 0
                  • C
                    Ctrl-K @Sheikah
                    last edited by 12 Oct 2023, 13:12

                    @sheikah I know, might require separate thread and minds of other people patching engine

                    “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                    — Steve Jobs.
                    My UI Mods
                    Support me

                    1 Reply Last reply Reply Quote 1
                    • C
                      Ctrl-K
                      last edited by 12 Oct 2023, 13:50

                      New ui drawing functions
                      Bitmap SetColorMask
                      IssueBuildMobile fix

                      “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                      — Steve Jobs.
                      My UI Mods
                      Support me

                      1 Reply Last reply Reply Quote 2
                      • C
                        Ctrl-K
                        last edited by 12 Oct 2023, 18:01

                        Added some pictures

                        “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                        — Steve Jobs.
                        My UI Mods
                        Support me

                        1 Reply Last reply Reply Quote 2
                        • C
                          Ctrl-K
                          last edited by Ctrl-K 13 Oct 2023, 21:46

                          added info about CopyToClipboard.
                          https://github.com/FAForever/FA-Binary-Patches/pull/50

                          “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                          — Steve Jobs.
                          My UI Mods
                          Support me

                          1 Reply Last reply Reply Quote 0
                          • C
                            Ctrl-K
                            last edited by 30 Dec 2023, 16:08

                            Custom world rendering was reworked (fixed tbh), now it works as flag for WorldView control. See PR

                            “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                            — Steve Jobs.
                            My UI Mods
                            Support me

                            1 Reply Last reply Reply Quote 1
                            • C
                              Ctrl-K
                              last edited by 30 Dec 2023, 16:10

                              Also there was optimized VDist3 function.

                              “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
                              — Steve Jobs.
                              My UI Mods
                              Support me

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