The Binaries
Mac
https://upload.disroot.org/r/XHFvbT4s#ZaPwUTGTjpmK0IlKXyW8N1f8c9Qu5JgVboD8USbDzxk=
Windows
https://upload.disroot.org/r/M0EnT4kb#Ws6EFNfzgC0s/xGGYsIdzgoQNjfmCodVQ6fozlJDfjQ=
Linux
https://upload.disroot.org/r/tuUFTLuT#27oozpFjzTrcIzBS1lY/AeicAgDbtqv5ns460MpwebQ=
Picture in picture
This is a cool new feature, I was mainly thinking of casters for this.
Now on major events, such as your team building an experimental, or an acu dying, you get a picture popup that you can click on to view the location. it also supports modding, so modders can make new events, I've included an example mod that tells you when your acu is below 10% hp. (I'll make a follow up post about this, as I'm not sure i like the api...)
of course this is all toggleable in the settings, and I'm super open to feedback.
[image: 1792443057537-32d0ddbc-9e51-43a6-a3c0-b7972f289051-image.png]
Timeline on replay
Another really cool feature, that was mainly me thinking about casters again. I've added a timeline view, that lets you move to any part in the game, it also highlights key events. Such as (ACU death, Exp built).
Allows you to zoom to selected events, and will shift the camera to just before.
It does support rewind, but at the moment it restarts the game and fast forwards, in the future we could save out keyframes, but i want to avoid game serialisation until later as its a source of endless bugs
I have more ideas for this one, but just wanted to get something basic in for now.
like above this is a setting as well, it can be on either main or second screen, or just turned off.
You can see a video here, although the ai playing makes the scrubbing a bit slow
https://youtu.be/aOz7DxAPm28
[image: 1792443075587-256e47fd-ce2c-4e0c-b530-7d445b9de59f-image.png]
Split screen! and Dual screen!
This was a fair amount of work, and I'm sure will need more testing. It will work on different refresh rate screens with each screen running at its max speed. You can now in the settings set which display is main and secondary screen.
If any one has a 240hz-480hz I'd love to know if it can go that fast
[image: 1792443094106-3c13e75a-4803-46ac-9eba-381fe0a0cbe7-image.png]
Mod support!
I haven't tested with blackops, but certainly the inbuilt x2 resources now work
Lua documention!
This one is also really nice.
thanks to rust macros, the apis from the engine to the lua, are now auto generated, and output both to luau type file and a emmy lua file that faf uses, I love this sort of feature, it should help things stay in sync, and of course helps me compare my api to fafs
here's an examples of it on the rust side, then the luau and the emmy lua output
this rust adds the ChangeMaxRadius method to the weapon class, that comment is auto put in to the lua docs too
lua_method!(lua, moho::Weapon,
/// Sets the weapon's maximum range (world units) and refreshes the unit's attack range.
ChangeMaxRadius = |lua, (this, r): (Obj<moho::Weapon>, f64)| {
with_state(lua, &this, |w| w.max_radius = crate::engine::sim::math::from_lua(r))?;
refresh_attack_range(lua, handle(&this)?.unit);
Ok(())
}
)?;
Then the generated luau types (a snippet of them)
declare extern type Weapon with
--- A weapon dies with its unit.
function BeenDestroyed(self): boolean
--- True if the weapon is enabled and its fire clock has run out.
function CanFire(self): boolean
--- Overrides the weapon's damage.
function ChangeDamage(self, damage: number): ()
--- Sets how far (degrees) the turret may be off target and still fire.
function ChangeFiringTolerance(self, t: number): ()
--- Sets the weapon's maximum range (world units) and refreshes the unit's attack range.
function ChangeMaxRadius(self, r: number): ()
the emmylua type
--- Sets the weapon's maximum range (world units) and refreshes the unit's attack range.
---@param r number
function weapon_methods:ChangeMaxRadius(r) end
while I'm sure this is far from perfect, it's just a fantastic example of little things that really can help a project stay manageable, in another time/life, this would have all been manual work of someone.
Merge order lines for units sharing a first waypoint.
No more 10k lines over the map causing massive lag
[image: 1792443170950-ded0c310-5853-4195-abb9-dfdb26d42a0a-image.png]
Perf
(I always strive for faster, not only does it mean higher end pcs will run it faster, but it unlocks lower end devices, which is just as important)
Faster startups for lua transformaions
in order to support fafs old lua under a new lua vm, I have to translate the lua.
some things can be done very fast and quickly using find and replace, others require full parsing of the lua scripts which is really slow, I now do a quick check before fully parsing a file to see if the find and replace route works
scripts/translate all FAF .lua (2,798 files, total cpu time over all cores) 538 ms -> 129 ms
scripts/translate Unit.lua 12.1 ms -> 6.65 ms
Headless startup, user CPU 3.62 s -> 2.68 s
Script prewarm wall time (16 cores) 289 ms -> 196 ms
Better thread pool allocation
I've then rejigged the thread pools for the engine, taking in to account low core machines, this has helped the startup time on low core machines. (its a small amount, but poco a poco
This is limiting the cores to 4
Headless time to game start 2.23 s -> 2.12 s
Script prewarm 726 ms 624 ms
Texture loading
Texture loading, textures are now all streamed as efficiently as possible to the gpu, minimising copies, and shifted off the main render thread to worker threads
Render thread upload models ~675 ms -> ~60 ms
Worst frame in upload models 13–21 ms -> ~1 ms
total texture load time (this is limited to 4 cores)
1,465ms -> 658ms
Terrain loading
we now load terrain much faster, and also much less work is done on the render thread
and when map elevation is changes such as placing a building.
81km map (again on a simulated 4core machine)
map textures uploaded (time from launch) 8.4–11.8 s -> 1.4–1.8 s
terrain change, render thread 23–38 ms -> 0.17–0.64 ms (worker: 4–8 ms)
Bugs and features
killed units now stop showing their stragic icons and are no longer selectable
lods are now based on the distance to the plane of the camera, instead of the camera location, so no more circles of trees
all of fafs graphics settings are now supported (with bumps to shadow mapping as I now support 2k shadow maps instead of 1k)
we have edge of map mesh now!
paused builder updates progress and finishes when assisted
reclaim progress bar now
units move clear of a build site before construction starts
build range needs only touch the target's build skirt
units being built in a factory are no longer selectable
box selection leaves out engineers when other units are in the box
Novax satellite beam reaches the ground, satellite holds its height as well, instead of bobbing up and down
part of this fixed area damage, which i think effected other units as well
preferences are saved, and FAF's preferences are now imported on first launch
reclaim labels show (Alt-R)
interface settings now work
Half-built Fatboy - engineer assist offers repair, not the transport cursor
factory assist takes the queue and destination of the factory it assists
fixed no borderless windows on windows (how truly awful I let this even pass... serves me right for mainly testing on windows)
fixed bombers not dropping their bombs
fixed auto attack on idle, e.g. bombers moving around in their range to hit things