Page MenuHomeWildfire Games
Feed Advanced Search

Jun 14 2023

wraitii committed rP27695: Don't send PositionChanged messages in TurnTo when not actually turning.
Don't send PositionChanged messages in TurnTo when not actually turning
Jun 14 2023, 9:23 AM
wraitii closed D5005: Don't send PositionChanged messages in TurnTo when not actually turning.
Jun 14 2023, 9:23 AM

Jun 13 2023

wraitii committed rP27674: Speed up timer update by using Map.forEach.
Speed up timer update by using Map.forEach
Jun 13 2023, 5:57 PM
wraitii closed D5010: Speed up timer update.
Jun 13 2023, 5:57 PM
wraitii committed rP27673: Don't poll territory in Position component.
Don't poll territory in Position component
Jun 13 2023, 5:49 PM
wraitii added a reverting change for rP14754: Fix missing territory decay when moving out of territory without changing the…: rP27673: Don't poll territory in Position component.
Jun 13 2023, 5:49 PM
wraitii closed D5009: Don't poll territory in CcmpPosition.
Jun 13 2023, 5:48 PM
wraitii added a comment to D5044: Don't convert actions to void*.

What diff made this change possible ? Seems like a good idea.

Jun 13 2023, 9:39 AM

Jun 12 2023

wraitii added a comment to D5042: Fix performance drop and memory leak on network games with AI.

Another option that might be more resilient: Can you simply remove the if entirely, and let the AI run? That should clear up the saved events, but maybe there are other issues ?

Jun 12 2023, 10:28 AM
wraitii added a comment to D5042: Fix performance drop and memory leak on network games with AI.

It seems like the use case of an AI not being defeated but not having entities for a long time might be kinda legit in campaigns/scenarios, to be honest. But perhaps the best course of action then would be to reinitialise it?

Jun 12 2023, 9:51 AM

Jun 11 2023

wraitii updated the summary of D4646: Parse autostart arguments in Javascript.
Jun 11 2023, 11:51 AM
wraitii updated the diff for D4646: Parse autostart arguments in Javascript.

Rebase, fixup, and settle on ParseCmdLine option

Jun 11 2023, 11:48 AM
wraitii accepted D5001: Put the CMapGeneratorWorker completely inside the task.

Good idea with the namespace, see inline.

Jun 11 2023, 11:15 AM

Jun 10 2023

wraitii added a comment to D5001: Put the CMapGeneratorWorker completely inside the task.

I am not sure you need a class in MapGenerator.h, these look like they could be static functions TBH.

It's there to mark one function private.

Yeah I sorta guessed that. Guess I'm OK with it then.
Still think the name is kinda clunky.

Jun 10 2023, 6:43 PM
wraitii added a comment to D5001: Put the CMapGeneratorWorker completely inside the task.

I think this looks quite good.

Jun 10 2023, 6:24 PM
wraitii added inline comments to D3552: Split the rendering WaterManager in a graphics/ and a renderer/ part..
Jun 10 2023, 6:13 PM
wraitii updated the diff for D3552: Split the rendering WaterManager in a graphics/ and a renderer/ part..

Rewrite the diff again as rebase.

Jun 10 2023, 6:07 PM
wraitii added a comment to D4786: A bit faster "state hash check".

Yea, this diff just makes the state hash check a _bit_ faster ;)

Would it help to use another hash function? Propably it's not worth the time changing that.

Jun 10 2023, 11:00 AM
wraitii added a comment to D5042: Fix performance drop and memory leak on network games with AI.

I think it would be straight-forward to add some logic that if a PlayerDefeated event matching the AI playerId is seen, you mark the AI as defeated and early-return. That would play nicely.

Jun 10 2023, 9:24 AM

Jun 9 2023

wraitii added a comment to D4786: A bit faster "state hash check".

Did some profiling on some upstream SM 115: https://share.firefox.dev/42zTa7H
If you look inside ComputeStateHash, it seems we're spending 10-15% of the time doing raw MD5 updates, but also significant time in GetPrototypeInfo, GetScriptBackrefTag, and then it's mostly just overhead from string manipulation.

Jun 9 2023, 5:34 PM
wraitii added a comment to D5042: Fix performance drop and memory leak on network games with AI.

I can confirm the performance drop and the fact that this helps.

Jun 9 2023, 5:15 PM
wraitii added a comment to D5042: Fix performance drop and memory leak on network games with AI.

This looks like an awesome find. I'll double-check the profiling, but it seems likely right.

Jun 9 2023, 10:29 AM
wraitii added a comment to D5043: Decouples some renderer code from VideoMode.

What are the situations in which the device can be nullptr ?

Jun 9 2023, 8:06 AM

Jun 8 2023

wraitii added a comment to D5041: Increase maximum number of units that can be selected at once.

Thanks Freagarach, was wondering why it wasn't an option already :P

Jun 8 2023, 2:37 PM
wraitii added a comment to D5040: Fix 'Options' asking for confirmation without changes during a game..

ConfigDB (reads the value from files) > RenderingOptions (gets the value from the config) > JS (overrides the value) > RenderingOptions (gets a notification about the changed value) > Renderer (adjusts stuff according to the value from RenderingOptions)

If we'd add a separate config for cinematics then we'd have another layer of duplication for the silhouettes option.

Jun 8 2023, 12:07 PM
wraitii added a comment to D5040: Fix 'Options' asking for confirmation without changes during a game..

Just config isn't enough because it's not as flexible as we have it now. It'd be same problem we have for options.json.

I'm not sure what you mean here.

Jun 8 2023, 10:39 AM
wraitii added a comment to D5040: Fix 'Options' asking for confirmation without changes during a game..

I meant the config flow should go through JS to allow to modders to adjust it according to their needs. It might be adjusted differently for different cutscenes or different game states. And the updateCinemaPath function is the only one correct place to do so.

Not if the cinematic itself has config metadata. Conceptually I think a cinematic could ask for stuff that isn't really part of the config, like changing the skybox, switching to a different LOD, doing other things like that. Worse, settings should sometimes change mid-cinematic, potentially.

Jun 8 2023, 10:24 AM
wraitii added a comment to D5040: Fix 'Options' asking for confirmation without changes during a game..

This is terrible code and really we should have a 'playing cinematic' mode in the renderer to offset this stuff.

Removing silhouettes from JS reduces the flexibility for modders.

Not necessarily, we could configure that behaviour separately by loading a cinematic XML data or even at the cinematic level, by having some specific per-cinematic data. I think that would be best.

Jun 8 2023, 10:08 AM
wraitii requested review of D5040: Fix 'Options' asking for confirmation without changes during a game..
Jun 8 2023, 9:41 AM
wraitii updated the diff for D5039: Allow changing lobby password inside 0 A.D..

Small tweaks, reuse more existing translations, fix small bug with timeout, remove debug comment in C++

Jun 8 2023, 8:43 AM

Jun 7 2023

wraitii updated the diff for D5039: Allow changing lobby password inside 0 A.D..

Un-comment essential line.

Jun 7 2023, 9:06 PM
wraitii requested review of D5039: Allow changing lobby password inside 0 A.D..
Jun 7 2023, 2:04 PM

Jun 6 2023

wraitii updated subscribers of rP27668: Balance the splash damage of Elephants..

Sorry @real_tabasco_sauce, got distracted by something and forgot to credit you :(

Jun 6 2023, 9:16 AM
wraitii committed rP27668: Balance the splash damage of Elephants..
Balance the splash damage of Elephants.
Jun 6 2023, 9:10 AM
wraitii closed D5008: [a27][Balancing]Rebalance Ele's splash damage.
Jun 6 2023, 9:10 AM
wraitii committed rP27667: Fix game crash when communicating with the lobby on macOS 13.
Fix game crash when communicating with the lobby on macOS 13
Jun 6 2023, 9:08 AM
wraitii closed D5018: Fix game crash when communicating with the lobby on macOS 13.
Jun 6 2023, 9:08 AM
wraitii added inline comments to D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference..
Jun 6 2023, 8:45 AM

Jun 5 2023

wraitii accepted D5018: Fix game crash when communicating with the lobby on macOS 13.

Works on my mac os 12 and looks OK. Let's get this going !

Jun 5 2023, 8:38 PM
wraitii published D5038: [WIP] Changes to ObstructionManager & Spatial structures for performance for review.
Jun 5 2023, 8:46 AM
wraitii published D5037: Try to anticipate unit collisions to improve pathing for review.
Jun 5 2023, 8:46 AM

Jun 4 2023

wraitii requested review of D5036: Spend less time in TryGoingStraightToTarget.
Jun 4 2023, 5:33 PM
wraitii requested review of D5035: Delay a distance computation in UnitMotion..
Jun 4 2023, 5:14 PM
wraitii added inline comments to D5030: Defense manager bugfix.
Jun 4 2023, 9:05 AM

Jun 3 2023

wraitii requested review of D5034: Optimisations to vertex pathfinder - relax optimality, sort unaligned edges.
Jun 3 2023, 5:55 PM
wraitii added a comment to D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference..

Guess what, this doesn't actually change hashes on CombatDemoHuge because we always short-circuit.
It's probably the single biggest improvement we've ever had on that particular map.

Do you have not logarithmic but linear per-turn stats?

Jun 3 2023, 5:41 PM
wraitii added a comment to D5032: Tweaks to default Profiler2 usage..
In D5032#214032, @sera wrote:

Your intro begs the questions:

  • If IFSPIKE is bad code, can it be fixed?

Nah, the approach is bad. If specific messages / code needs to be tested, a specific test can be added by the programmer, as things stand they're useless.

  • If IFSPIKE is useless why not remove the macro (and code) for good?

'Cause I wrote the code and it's a little bit of a mess to cleanup and I didn't want to do that now.

Jun 3 2023, 4:36 PM
wraitii requested review of D5033: Improve profiler2 HTTP ui.
Jun 3 2023, 3:07 PM
wraitii requested review of D5032: Tweaks to default Profiler2 usage..
Jun 3 2023, 2:53 PM
wraitii abandoned D1767: Rewrite Profiler2's GUI using D3 / CanvasJS.

Not worth doing as-is

Jun 3 2023, 11:05 AM

Jun 2 2023

wraitii added a comment to D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference..

Guess what, this doesn't actually change hashes on CombatDemoHuge because we always short-circuit.
It's probably the single biggest improvement we've ever had on that particular map.


Note quite 'playable' just yet, but it's getting closer.

Jun 2 2023, 8:51 PM
wraitii updated the diff for D5004: Rewrite handling of JS component wrappers - No PersistentRooted, more caching..

SM92-compatible version

Jun 2 2023, 8:43 PM
wraitii added a comment to D5004: Rewrite handling of JS component wrappers - No PersistentRooted, more caching..

IMO GetJSInstance should not be const. I'm ok with the mutable cache but i dislike the const_cast.

Don't really have a strong opinion, but semantically I think it's 'const' until we make the script a part of Component fully

Jun 2 2023, 8:41 PM
wraitii updated the diff for D5013: ScriptRequest optimisations - remove member variables & fast path for JSNative..

Update for SM92

Jun 2 2023, 8:12 PM
wraitii added a comment to D5013: ScriptRequest optimisations - remove member variables & fast path for JSNative..

Profile on a an AI 2v2 on very large mainland:

Jun 2 2023, 8:08 PM
wraitii added a comment to D5019: Speed up AI computation by not using structured clones.

Quick profile on an AI 2v2 on a Very Large Mainland map:

Jun 2 2023, 8:00 PM
wraitii updated the diff for D5023: Stop running shrinking gcs - simplify logic..

Updated patch: do GCs more often, 6ms per frame.

Jun 2 2023, 7:48 PM
wraitii added a comment to D5023: Stop running shrinking gcs - simplify logic..

Profile from an AI 2v2 on very large MainLand that ran for 35 minutes.

Jun 2 2023, 7:47 PM
wraitii updated the diff for D5023: Stop running shrinking gcs - simplify logic..

SM92 compatibility + run a shrinking GC after game Init, as that is likely useful at that point.

Jun 2 2023, 6:42 PM
wraitii updated the summary of D5014: Turn off SPECTRE mitigation in jit code.
Jun 2 2023, 6:38 PM
wraitii added a comment to D5014: Turn off SPECTRE mitigation in jit code.

Some Profiler2 replays:
An AI 2v2 on a very large map, I waited until one player was defeated: about a raw 10-15% improvement on Sim update & AI update.


Same thing on a combat-demo-huge run, with some C++ only code for reference.

Jun 2 2023, 6:21 PM
wraitii updated the diff for D5014: Turn off SPECTRE mitigation in jit code.

They also exist on SM92, so here we go.

Jun 2 2023, 6:19 PM
Silier awarded D5030: Defense manager bugfix a Like token.
Jun 2 2023, 5:53 PM
wraitii added a comment to D5000: Minor optimisations when calling JS code / HandleMessage.

Should do the message part as part of D5026

Jun 2 2023, 5:09 PM
wraitii published D5030: Defense manager bugfix for review.
Jun 2 2023, 5:02 PM
wraitii updated the diff for D5029: Speedup AI Interface part of map generation..

Wrong diff ,this is the correct code

Jun 2 2023, 4:59 PM
wraitii updated the diff for D5029: Speedup AI Interface part of map generation..

Remove unrelated code

Jun 2 2023, 2:43 PM
wraitii requested review of D5029: Speedup AI Interface part of map generation..
Jun 2 2023, 1:42 PM
wraitii added a comment to D5007: Speed up ChainPlacer.js::Place.

There's basically the same code in createMountain, should change that as well...

Jun 2 2023, 11:09 AM
wraitii added inline comments to D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference..
Jun 2 2023, 8:17 AM
wraitii added a comment to D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference..

This doesn't seem to give the same result when we have another entity with preference 0, but I guess that is kind of undefined anyway. ^^

Jun 2 2023, 12:04 AM

Jun 1 2023

wraitii requested review of D5028: Cache resource gatherer max distance.
Jun 1 2023, 3:08 PM
wraitii requested review of D5027: Minor AI optimisations.
Jun 1 2023, 2:53 PM
wraitii requested review of D5026: Don't reconstruct a request for no reason.
Jun 1 2023, 2:39 PM

May 31 2023

wraitii added a comment to D5023: Stop running shrinking gcs - simplify logic..

What's about memory differences? Does the #2611 ticket blocks it for Windows?

May 31 2023, 5:42 PM
wraitii published D5023: Stop running shrinking gcs - simplify logic. for review.
May 31 2023, 12:13 PM
wraitii retitled D5004: Rewrite handling of JS component wrappers - No PersistentRooted, more caching. from [WIP] Cache JS wrappers of C++ objects to Rewrite handling of JS component wrappers - No PersistentRooted, more caching..
May 31 2023, 10:52 AM
wraitii updated the diff for D5004: Rewrite handling of JS component wrappers - No PersistentRooted, more caching..

Slightly bigger change, but I figure after some more profiling that it's probably worth doing at the same time (avoids adding PersistentRooted that will be deleted).

May 31 2023, 10:49 AM

May 30 2023

wraitii published D5022: [WIP] Minor range manager optimisation for review.
May 30 2023, 7:29 PM
wraitii published D5021: Potential GUI speedup in Builder for review.
May 30 2023, 7:29 PM
wraitii published D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference. for review.
May 30 2023, 7:29 PM
wraitii published D5019: Speed up AI computation by not using structured clones for review.
May 30 2023, 7:29 PM

May 28 2023

wraitii published D5016: Implement specific QueryInterface call for scripts for review.
May 28 2023, 8:56 PM
wraitii published D5015: Remove useless line in rP25442 for review.
May 28 2023, 8:56 PM
wraitii published D5014: Turn off SPECTRE mitigation in jit code for review.
May 28 2023, 8:56 PM
wraitii published D5013: ScriptRequest optimisations - remove member variables & fast path for JSNative. for review.
May 28 2023, 8:56 PM
wraitii updated the diff for D5004: Rewrite handling of JS component wrappers - No PersistentRooted, more caching..

Change GetJSInstance to return a HandleValue. This avoids an unnecessary rooting which is slightly faster.

May 28 2023, 5:53 PM
wraitii requested review of D5012: Optimisations to ApplyModifiers.
May 28 2023, 2:10 PM
wraitii requested review of D5010: Speed up timer update.
May 28 2023, 12:31 PM
wraitii requested review of D5009: Don't poll territory in CcmpPosition.
May 28 2023, 12:00 PM
wraitii added a reverting change for rP14754: Fix missing territory decay when moving out of territory without changing the…: D5009: Don't poll territory in CcmpPosition.
May 28 2023, 10:32 AM

May 27 2023

wraitii accepted D4728: No recursive calls in FunctionWrapper.h.

Yeah that seems a straighforward improvement here.

May 27 2023, 8:00 PM
wraitii requested review of D5007: Speed up ChainPlacer.js::Place.
May 27 2023, 7:55 PM

May 23 2023

wraitii added inline comments to D5006: Speed up ValueModification by handling it specially..
May 23 2023, 11:38 PM
wraitii requested review of D5006: Speed up ValueModification by handling it specially..
May 23 2023, 9:13 PM
wraitii requested review of D5005: Don't send PositionChanged messages in TurnTo when not actually turning.
May 23 2023, 9:00 PM
wraitii requested review of D5004: Rewrite handling of JS component wrappers - No PersistentRooted, more caching..
May 23 2023, 8:40 PM
wraitii added a comment to D3938: Increase type safety & code clarity in RangeManager.
May 23 2023, 5:24 PM
wraitii added a comment to D3938: Increase type safety & code clarity in RangeManager.

Most (when not all) uses of PackedArray<bool> could be replaced with std::bitset.
For the other cases: are you sure PackedArray is faster than std::array?

For the particular case of the Los enum (which is two bits) I had tested it to be much faster, and I think that that point it makes some sense to use the same thing over std::bitset somewhere. Could be argued otherwise.
Part of the problem is that we do quite a few mask-comparisons, which are quite a bit slower on std::array.

May 23 2023, 5:22 PM

May 22 2023

wraitii added inline comments to D3938: Increase type safety & code clarity in RangeManager.
May 22 2023, 5:08 PM