Page MenuHomeWildfire Games

wraitii (Lancelot)
AnimalAdministrator

Projects

User Details

User Since
Dec 21 2016, 1:38 PM (383 w, 2 d)
Roles
Administrator

Recent Activity

Nov 26 2023

wraitii added a comment to D5195: Use templates instead of macros to restrict access to the VFS.

Could these arrays be made constexpr if they were C-style array ?

Nov 26 2023, 9:34 AM
wraitii added inline comments to D5201: [Gameplay] Let siege stop after 90 degree turn, not 45..
Nov 26 2023, 9:33 AM

Nov 11 2023

wraitii committed rP27928: Fix serialization test following rP27673 - Fix CalculateTerritories after….
Fix serialization test following rP27673 - Fix CalculateTerritories after…
Nov 11 2023, 11:35 AM
wraitii closed D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.
Nov 11 2023, 11:35 AM
wraitii added inline comments to D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.
Nov 11 2023, 11:27 AM

Nov 10 2023

wraitii updated the diff for D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

Remove renaming

Nov 10 2023, 11:46 AM
wraitii added a comment to D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

I read the comment above the macro as guide for the usage of the macro. It does mention/promote the use of (posX, posZ).

Mh, I read it as just explaining the algorithm, but I do agree it's un-necessarily confusing.

Nov 10 2023, 10:26 AM

Nov 9 2023

wraitii added a comment to D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

You mean like #1229?

Yeah that's the ticket for it, but I think we try to hide very small "reverse holes" ? aka very small patches of territory. The ticket is about actual holes.

Nov 9 2023, 1:49 PM

Nov 8 2023

wraitii added a comment to D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

The "function-object" you "pass" to the macro is "invoked" with the current tile (posX, posZ) and the neighboring tile (nx, nz).
It does go over all current-neighbor-pairs.

Could you double-check that? My reading is that it doesn't. The 'initial tile' is (i, j). As I read it, code is never called for this initial tile, we're directly over a neighbouring tile.

Nov 8 2023, 6:11 PM
wraitii added a comment to D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

No, you look only at the neighbors (nx, nz) you could look at the current tile with (posX, posZ).

I don't get what you mean sorry? The FLOODFILL macro only looks at the neighbours of the initial (x,z) tile ?

Nov 8 2023, 5:22 PM
wraitii requested review of D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.
Nov 8 2023, 12:46 PM
wraitii updated the summary of D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.
Nov 8 2023, 12:46 PM
wraitii added inline comments to D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.
Nov 8 2023, 12:46 PM
wraitii updated the diff for D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

Fix formatting / warnings / errors

Nov 8 2023, 12:39 PM
wraitii updated the diff for D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.

Add tests. This revealed another issue: the FLOODFILL macro only looks at neighbors, so we were missing the original territory tile when counting territory.
I believe this also affected blinking territory, but I'm slightly less sure there - unlikely it would show up in game since it can only affect the center of a group of territory tiles, and unless I'm wrong we don't show borders when the borders are very small?

Nov 8 2023, 12:30 PM
wraitii added a comment to D4770: Multiplayer saved games.

Would it be better to not introduce Engine.StartNetworkSavedGame and use an optional argument to Engine.StartNetworkGame?

I think optional arguments are a bit dodgy in the C++ / JS conversion process (makes it harder to do type checking), using explicit names is probably better.

Nov 8 2023, 9:43 AM

Nov 7 2023

wraitii added a comment to D5185: Revert non-ASCII characters from source and configuration files introduced in rP27786.

You probably should fix the linter as well.

Nov 7 2023, 2:05 PM

Nov 4 2023

wraitii added a comment to D4770: Multiplayer saved games.
  1. It would make it less self-contained. (If we have the same notion of self-contained)
  2. Many things would still have to listen on it. (to call setEnabled)

The GUI elements already listen to a lot of UI settings, but you wouldn't introduce coupling with another UI element, just with the settings. Basically this:

g_GameSettings.map.watch(() => this.render(), ["type"]);
g_GameSettings.savedGame.watch(() => this.render(), ["id"]); // this.gameSettingsController.registerSettingsChangeHandler(this.render.bind(this));
Nov 4 2023, 5:58 PM
wraitii requested review of D5181: Fix serialization test following rP27673 - Fix CalculateTerritories after deserialization.
Nov 4 2023, 12:20 PM
wraitii added a comment to D5157: Use references in CStrIntern.

This doesn't manipulate / mutate the pointer.

It's doing pointer comparison, both equality and ordering, which I'd classify under 'manipulation'.

This wasn't the Pimpl pattern.

It kind of is though? It's not the complete pattern, but it's pretty much the same.

Nov 4 2023, 10:53 AM
wraitii requested changes to D5157: Use references in CStrIntern.

Not a fan of this. The new syntax is worse, more verbose and it also makes it less obvious that this is actually doing pointer manipulations.

Nov 4 2023, 10:29 AM
wraitii added a comment to D4770: Multiplayer saved games.

This looks fairly clean and self-contained from a cursory glance - at least nothing too invasive or obviously bad, which I'd call good enough™

Nov 4 2023, 10:12 AM

Oct 20 2023

wraitii accepted D5162: Reverts rP27695 as it breaks LOS update.
Oct 20 2023, 3:53 PM

Aug 9 2023

wraitii added a comment to D5092: Fix for Trac #6797 - OSX Build Errors w/ SDL and FCollada.

Would be good to have Stan's opinion on this, I believe he's the most up-to-date on the Fcollada 'port' that we essentially maintain.

Aug 9 2023, 3:34 PM
wraitii added a comment to D5093: Suppress implicit function declaration error in zip-lib for MacOS.

Seems like Premake is shipping with libzip 0.11.2, which is absolutely ancient at this point, which probably explains this issue.

Aug 9 2023, 3:13 PM

Jul 23 2023

wowgetoffyourcellphone awarded D2188: Allow Promotion to add arbitrary modifiers when a unit reaches the next rank instead of changing entities. a Dat Boi token.
Jul 23 2023, 3:29 PM

Jul 20 2023

wowgetoffyourcellphone awarded D5037: Try to anticipate unit collisions to improve pathing a Dat Boi token.
Jul 20 2023, 7:22 PM
wowgetoffyourcellphone awarded D5039: Allow changing lobby password inside 0 A.D. a Dat Boi token.
Jul 20 2023, 7:20 PM

Jul 1 2023

wraitii awarded D5067: Moves Object include out of FunctionWrapper header a 100 token.
Jul 1 2023, 8:34 AM

Jun 30 2023

wraitii awarded D5066: Replaces boost string general includes by more precise ones a Like token.
Jun 30 2023, 9:13 AM
wraitii awarded D5065: Fixes solution introduced in rP17658 a Like token.
Jun 30 2023, 9:12 AM

Jun 28 2023

Stan empowered wraitii as an administrator.
Jun 28 2023, 10:38 AM
wraitii updated the diff for D5039: Allow changing lobby password inside 0 A.D..

final touchup

Jun 28 2023, 9:41 AM

Jun 27 2023

wraitii added a comment to D5013: ScriptRequest optimisations - remove member variables & fast path for JSNative..

It feels wrong that a ScriptRequest is sometime it's own realm and sometimes it's an alias for another.

I'm not entirely sure what you mean - we're always in the 'own realm', it's just that sometimes we can be sure we don't need to 'enter' it because we've already entered it.

Can't you use ScriptRequest& for the aliasing?

You mean cast m_FormerRealm ?

Jun 27 2023, 9:54 PM
wraitii updated the diff for D5013: ScriptRequest optimisations - remove member variables & fast path for JSNative..

Fix debug mode.
The code has an, in retrospect, obvious error: nullptr is a valid value for the FormerRealm when we enter the first realm, so we never exited it.
Instead, use a safe value for the optimised case -> the address of the ScriptRequest object.

Jun 27 2023, 10:37 AM

Jun 26 2023

wraitii published D5064: Fix formation slow-down after stopping. for review.
Jun 26 2023, 3:37 PM
wraitii published D5061: Multicast chat messages for review.
Jun 26 2023, 3:36 PM
wraitii added inline comments to D5062: Replaces statically cached hCurrentThread by lazy initialized thread_local variable..
Jun 26 2023, 3:15 PM
wraitii added a comment to D4646: Parse autostart arguments in Javascript.

[10:18:09] <elexis1> each line in cmd_line_args.js should be moved to gamesettings/attributes/
[10:22:52] <elexis1> if we can have a fromInitAttributes then a fromCmdLineArgs can be implemented too

Jun 26 2023, 11:46 AM

Jun 25 2023

wraitii added a comment to D5033: Improve profiler2 HTTP ui.

Stop doing that much in one diff.

Yeah this was unfortunately a bit of a stream-of-consciousness diff as I worked on other stuff. I'll see if I can easily split it, might not go through the effort though tbh.

log-scale can be usefull.

I've given it some thought and I don't think it's a good idea altogether, it's rather harder to analyse precisely.

Jun 25 2023, 5:21 PM

Jun 24 2023

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

Slight refactoring for cleaner code, and separate the password length to a common file.

Jun 24 2023, 3:24 PM
wraitii added a comment to D4646: Parse autostart arguments in Javascript.
In D4646#215175, @sera wrote:

Wraitii is right when he said it's not easy to do properly. What we have here is a hack used while bootstrapping the project being copy pasted to js. It doesn't fix a bug nor does it enable anything beyond what is already possible nor does it bring us any closer to a proper design.

I'm not entirely sure what you're talking about specifically here, but I want to point out that this diff does not intend to improve the --help situation whatsoever, merely:

  • move some C++ engine hardcoding to JS, making it more moddable and more appropriately placed
  • Clean up the code because JS is easier to read/write here than C++-using-the-JSAPI
Jun 24 2023, 2:12 PM

Jun 23 2023

wraitii added a comment to D4646: Parse autostart arguments in Javascript.

This patch does to much: I think we require games to support multiple players (not human players) and I don't want that every mod does parse it themself so the "number of players" should be parsed in the engine. I'm not sure if we also require that games support teams.

Actually, those requirements are all defined in the public mod. IMO it makes no sense to parse this in C++ when nothing in the C++ cares directly.

Jun 23 2023, 10:04 PM
wraitii added inline comments to D4646: Parse autostart arguments in Javascript.
Jun 23 2023, 5:40 PM
wraitii added a comment to D4646: Parse autostart arguments in Javascript.
In D4646#215128, @sera wrote:

Well, pyrogenesis --help should print all valid arguments and descriptions and an invalid argument should terminate pyrogenesis and print a message. I have a hard time imagining this working if parsing happens all over the place. Basically I think there should be a parser where you register the options and then run a parser.parse(argv) once. A mechanisms to register options from mods might be nice but somewhat tricky, maybe a json file that list option name, type and help string might work, but for that the mod needs to be loaded already for it to be visible. So somewhat a chicken and egg problem.
Edit: basically you'd want to be able to throw on a typo-ed option, not just a typo-ed value to an option

Jun 23 2023, 11:40 AM
wraitii added a comment to D4646: Parse autostart arguments in Javascript.
In D4646#215126, @sera wrote:

This looks like it will get us further from a usage command(pyrogenesis --help) and args validation.

Jun 23 2023, 10:56 AM
wraitii updated the diff for D5013: ScriptRequest optimisations - remove member variables & fast path for JSNative..

Clarify a few things - mostly this was breaking the contract that GetScriptInterface returned the entered object.
This isn't actually used anywhere, but it's useful to be able to get the ScriptInterface of the current realm from ScriptRequest, so keep that under a different name.

Jun 23 2023, 10:27 AM
wraitii updated the diff for D4646: Parse autostart arguments in Javascript.

Vlad's comments

Jun 23 2023, 9:29 AM
wraitii added inline comments to D4646: Parse autostart arguments in Javascript.
Jun 23 2023, 9:29 AM
wraitii committed rP27732: Small bugfix in Petra's Defense manager.
Small bugfix in Petra's Defense manager
Jun 23 2023, 9:23 AM
wraitii closed D5030: Defense manager bugfix.
Jun 23 2023, 9:23 AM
wraitii committed rP27730: Fix 'Options' asking for confirmation without changes during a game..
Fix 'Options' asking for confirmation without changes during a game.
Jun 23 2023, 9:19 AM
wraitii closed D5040: Fix 'Options' asking for confirmation without changes during a game..
Jun 23 2023, 9:19 AM
wraitii accepted D5060: Fix typo in `CanTrade`..
Jun 23 2023, 9:14 AM
wraitii added inline comments to D5059: One action per transition.
Jun 23 2023, 9:14 AM
wraitii added a comment to D5058: Fix Gaia not being its own mutual ally..

Feel like this should maybe be defaulted to INVALID_PLAYER but it should work.

Jun 23 2023, 9:13 AM
wraitii accepted D5057: Fix missed allied view tech in init..

We probably want to change how this whole 'enable shared vision' thing works at some point but this looks good

Jun 23 2023, 9:08 AM

Jun 22 2023

wraitii added inline comments to D5040: Fix 'Options' asking for confirmation without changes during a game..
Jun 22 2023, 5:39 PM
wraitii added inline comments to D5040: Fix 'Options' asking for confirmation without changes during a game..
Jun 22 2023, 5:13 PM
wraitii added inline comments to D5006: Speed up ValueModification by handling it specially..
Jun 22 2023, 5:08 PM
wraitii added inline comments to D5040: Fix 'Options' asking for confirmation without changes during a game..
Jun 22 2023, 4:10 PM
wraitii raised a concern with rP27722: Pull Diplomacy out of cmpPlayer..

This appears to error, per gameboy and myself https://wildfiregames.com/forum/topic/107586-an-error-occurred/#comment-553741 (I bisected it to this commit)

Jun 22 2023, 12:01 PM
wraitii updated the diff for D4646: Parse autostart arguments in Javascript.

Fix a number of issues, move the comments to JS.
Also rebased on top of rP27692

Jun 22 2023, 10:23 AM
wraitii updated the diff for D5040: Fix 'Options' asking for confirmation without changes during a game..

Less dramatic comment

Jun 22 2023, 9:35 AM

Jun 21 2023

wraitii committed rP27728: Pass ScriptRequest instead of ScriptInterface in simulation messages..
Pass ScriptRequest instead of ScriptInterface in simulation messages.
Jun 21 2023, 9:50 AM
wraitii closed D5026: Don't reconstruct a request for no reason.
Jun 21 2023, 9:50 AM

Jun 20 2023

wraitii updated the diff for D5026: Don't reconstruct a request for no reason.

Fix rebase error that broke everything

Jun 20 2023, 5:35 PM
wraitii committed rP27726: Minor optimisations when calling JS functions from C++.
Minor optimisations when calling JS functions from C++
Jun 20 2023, 1:40 PM
wraitii closed D5000: Minor optimisations when calling JS code / HandleMessage.
Jun 20 2023, 1:40 PM
wraitii updated the diff for D5026: Don't reconstruct a request for no reason.

Pull changes from D5000

Jun 20 2023, 9:26 AM
wraitii updated the diff for D5000: Minor optimisations when calling JS code / HandleMessage.

Only the FunctionWrapper.h changes

Jun 20 2023, 9:24 AM
wraitii committed rP27724: Optimisations to vertex pathfinder - relax optimality, sort unaligned edges.
Optimisations to vertex pathfinder - relax optimality, sort unaligned edges
Jun 20 2023, 9:16 AM
wraitii closed D5034: Optimisations to vertex pathfinder - relax optimality, sort unaligned edges.
Jun 20 2023, 9:15 AM
wraitii added inline comments to D5034: Optimisations to vertex pathfinder - relax optimality, sort unaligned edges.
Jun 20 2023, 9:08 AM

Jun 15 2023

wraitii added a comment to D5048: Removes LowFragmentationHeap from Windows.

According to Stan we drop XP support before SM78.

We did

Jun 15 2023, 10:10 PM
wraitii added a comment to D4981: Don't assign to need_update.

Mh, guideline makes sense. Shame the syntax is pretty bad...
I'm fine with {} but you should add braces on either side per the JS coding conventions IMO, at least one before {

I agree that int x{ 1 } is more readable than int x{1}. But then we have inconsistency with Object x(1).

Jun 15 2023, 5:49 PM
wraitii added a comment to D4981: Don't assign to need_update.

Mh, guideline makes sense. Shame the syntax is pretty bad...
I'm fine with {} but you should add braces on either side per the JS coding conventions IMO, at least one before {

Jun 15 2023, 7:30 AM

Jun 14 2023

wraitii accepted D4790: Use atomic as buffer index in CProfiler2::ThreadStorage.

(assuming this works - haven't tested)

Jun 14 2023, 1:14 PM
wraitii accepted D4902: Add a test for FSM.

Tests are good, consider inlines.

Jun 14 2023, 1:12 PM
wraitii accepted D4981: Don't assign to need_update.

Good by me, consider inline (we generally use {} syntax for non-POD / non-trivial stuff)

Jun 14 2023, 1:11 PM
wraitii accepted D4989: Use std::function in ps/Loader.*.

Gonna accept this though I'd still like to hide the lambdas under the assumption that you'll end up cleaning up the map generator at some point. I think incrementally it's moving in the right direction.

Jun 14 2023, 1:09 PM
wraitii accepted D3676: Removes explicit synchronizations from MapGenerator.

Think this is good with the changes from the further diffs too

Jun 14 2023, 1:07 PM
wraitii accepted D4959: Remove condition from FSM.
Jun 14 2023, 1:06 PM
wraitii added a comment to D4959: Remove condition from FSM.

I didn't find a usage since we use SVN

Jun 14 2023, 10:55 AM
wraitii added inline comments to D5044: Don't convert actions to void*.
Jun 14 2023, 10:52 AM
wraitii added a comment to D4959: Remove condition from FSM.

This also looks good, but it'd be nice to look into the blame and find out when the last use-case was removed, to gain confidence that we won't need to add it back later

Jun 14 2023, 10:51 AM
wraitii committed rP27701: Improve AttackEntitiesByPreference by short-circuiting on best possible….
Improve AttackEntitiesByPreference by short-circuiting on best possible…
Jun 14 2023, 9:54 AM
wraitii closed D5020: Improve AttackEntitiesByPreference by short-circuiting on best possible preference..
Jun 14 2023, 9:53 AM
wraitii committed rP27700: Delay a distance computation in UnitMotion..
Delay a distance computation in UnitMotion.
Jun 14 2023, 9:49 AM
wraitii closed D5035: Delay a distance computation in UnitMotion..
Jun 14 2023, 9:49 AM
wraitii updated the diff for D5034: Optimisations to vertex pathfinder - relax optimality, sort unaligned edges.

Inline both.

Jun 14 2023, 9:48 AM
wraitii committed rP27699: Turn off SPECTRE mitigation in jit code.
Turn off SPECTRE mitigation in jit code
Jun 14 2023, 9:45 AM
wraitii closed D5014: Turn off SPECTRE mitigation in jit code.
Jun 14 2023, 9:44 AM
wraitii committed rP27698: Speed up AI computation by not using structured clones.
Speed up AI computation by not using structured clones
Jun 14 2023, 9:32 AM
wraitii closed D5019: Speed up AI computation by not using structured clones.
Jun 14 2023, 9:32 AM
wraitii committed rP27697: Remove useless line from rP25442.
Remove useless line from rP25442
Jun 14 2023, 9:29 AM
wraitii closed D5015: Remove useless line in rP25442.
Jun 14 2023, 9:29 AM
wraitii committed rP27696: Bugfix & optimisations to ApplyModifiers.
Bugfix & optimisations to ApplyModifiers
Jun 14 2023, 9:27 AM
wraitii closed D5012: Optimisations to ApplyModifiers.
Jun 14 2023, 9:27 AM
wraitii added a comment to D5012: Optimisations to ApplyModifiers.
In D5012#213547, @Stan wrote:

What happens if the value is NaN/null?

Jun 14 2023, 9:24 AM