Page MenuHomeWildfire Games
Feed Advanced Search

May 27 2022

lyv planned changes to D4669: Use _SC_NPROCESSORS_ONLN to get available CPUs.

Replace with SDL functions

May 27 2022, 5:07 PM
lyv added a comment to D4303: Copy TeamPlacement options from Frontier.

This is the desired positions for this placement right?

May 27 2022, 4:38 PM
lyv added a comment to D4303: Copy TeamPlacement options from Frontier.

It seems like team placement patterns is purely an rmgen2 construct currently. However, the consensus at the time was to rewrite the maps using the rmgen2 proxies to instead just directly use rmgen. However, that is not an easy effort so this wrapper around rmgen is here to stay I guess. _kali had made several interesting maps and deleting them is not an option without rewriting them, and rewriting them is going to take ages (the effort was started with D1577). Refs #4947

May 27 2022, 2:07 PM

May 26 2022

lyv added a comment to D4669: Use _SC_NPROCESSORS_ONLN to get available CPUs.

SDL_GetCPUCount (IIRC it uses sysconf(_SC_NPROCESSORS_ONLN)

Indeed, https://github.com/libsdl-org/SDL/blob/main/src/cpuinfo/SDL_cpuinfo.c#L638
The smart thing to do would be to let SDL handle as much sysdep stuff as possible. The actual usage of these code is really not worth the effort of maintenance.

May 26 2022, 9:38 PM
lyv requested review of D4669: Use _SC_NPROCESSORS_ONLN to get available CPUs.
May 26 2022, 6:40 PM

May 24 2022

lyv requested review of D4666: Make formations respond as one to threats..
May 24 2022, 7:55 PM

May 23 2022

lyv added a comment to D4598: [GUI] fancy endgame message.

Could have a filter that darkens the background perhaps? The gold on yellowish terrain wouldn't be an issue then. As done for the paused overly currently.

May 23 2022, 3:08 PM
lyv added inline comments to D4598: [GUI] fancy endgame message.
May 23 2022, 11:52 AM

May 22 2022

lyv added a comment to D4661: Don't reset wonder victory timer on ally defeat..

Okay, that sounds about right.

May 22 2022, 11:52 PM
lyv added a comment to D4661: Don't reset wonder victory timer on ally defeat..

But why should the timer be reset when an ally dies trying to protect the team wonder?

May 22 2022, 8:27 PM
lyv added a comment to D4661: Don't reset wonder victory timer on ally defeat..

Doesn't it seem unfair that you get punished for doing so?

I would say in this case the timer should actually be reset because the team holding the wonder got stronger with the addition of a new ally. Moreover, it also implies different timers for different players depending on when they allied.

May 22 2022, 1:00 PM

May 19 2022

lyv added a comment to D4659: rename Han Chinese -> Han.

Apparently Han Chinese is the demonym. In which case this isn't exactly right either. I would imagine this is equivalent to calling Roman fortresses, Rome fortresses.

May 19 2022, 12:30 AM

May 18 2022

lyv added a comment to D4575: Implement ES6 Module Loading.

Yet another option is to just have named exports on the module entry file for onInit and onTick. Both of these methods would work the same way (other method being explicit registering via Engine) under the hood, but this might be more natural JS code.

May 18 2022, 3:18 PM

May 14 2022

lyv added a comment to D4575: Implement ES6 Module Loading.

Thinking some more about this, maybe we'll want the Engine to pass a writable Engine.entryPoint attribute that we set the init() functions to, as a way of expliciting the hardcoding?

May 14 2022, 3:39 PM
lyv added a comment to D4628: Fix non-visual autostart, as well as client/host autostart..

I have non-exhaustively tested this and LGTM.

May 14 2022, 3:17 PM

May 11 2022

lyv added a comment to D4628: Fix non-visual autostart, as well as client/host autostart..

Nothing obvious remains as far as I can see.

May 11 2022, 9:25 PM
lyv added a comment to rP26867: Fix map errors from GetTemplate not being available in the sim.

(This adds a proxy to cmpTemplateManager, it doesn't keep a static local template loader. But I do agree with the sentiment that globalscripts shouldn't have to rely on such details. Passing around a function not guaranteed to return the same output is also somewhat meh to be honest, cmpTemplateManager.GetTemplate shouldn't have to mirror TemplateLoader.GetTemplate for things to work.)

May 11 2022, 5:10 PM
lyv added a comment to D4575: Implement ES6 Module Loading.

Won't be possible to resolve files outside of the VFS, when you meant Won't be possible to resolve files like 'gui/something.js'

May 11 2022, 4:47 PM
lyv added a comment to D4575: Implement ES6 Module Loading.

Its usually unlikely that modules would have to resolve anything outside of their root. However, that doesn't seem to hold true with the structure in gui/ though. Then there is the case of trying to import code from globalscripts. Which would be somewhat messy without absolute paths.

May 11 2022, 4:29 PM
lyv retitled D4575: Implement ES6 Module Loading from [WIP] Implement ES6 Module Loading to Implement ES6 Module Loading.
May 11 2022, 1:49 PM
lyv updated the diff for D4575: Implement ES6 Module Loading.

Fix filename going out of scope as JS::CompileOptions::setFilenameAndLine does not copy
Use ScriptConversions

May 11 2022, 1:30 PM
lyv added inline comments to D4644: Remove own generate_uniform_real implementation from boost.
May 11 2022, 11:24 AM

May 10 2022

lyv added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
May 10 2022, 9:17 PM
lyv added a comment to D4575: Implement ES6 Module Loading.

Assertion failure: aDst + aNElem <= aSrc || aSrc + aNElem <= aDst (destination and source must not overlap)

May 10 2022, 6:31 PM
lyv retitled D4575: Implement ES6 Module Loading from [WIP] Implement ES Module Loading to [WIP] Implement ES6 Module Loading.
May 10 2022, 6:19 PM
lyv added inline comments to D4575: Implement ES6 Module Loading.
May 10 2022, 6:05 PM
lyv updated the diff for D4575: Implement ES6 Module Loading.

Fix build

May 10 2022, 5:59 PM
lyv added inline comments to D4644: Remove own generate_uniform_real implementation from boost.
May 10 2022, 4:53 PM
lyv requested review of D4644: Remove own generate_uniform_real implementation from boost.
May 10 2022, 3:34 PM
lyv updated the diff for D4575: Implement ES6 Module Loading.

AutoCheckCannotGC needs a scope

May 10 2022, 3:16 PM
lyv added a reverting change for rP11857: Replace boost::uniform_real to avoid OOS caused by changes in behaviour between…: D4644: Remove own generate_uniform_real implementation from boost.
May 10 2022, 2:57 PM
lyv updated the diff for D4575: Implement ES6 Module Loading.

Add tests

May 10 2022, 1:31 PM

May 9 2022

lyv added inline comments to D4641: Fixes shader program and technique reloading.
May 9 2022, 4:19 PM

May 8 2022

lyv updated the diff for D4575: Implement ES6 Module Loading.

Add hotloading

May 8 2022, 9:04 PM
lyv updated the diff for D4575: Implement ES6 Module Loading.

Covert to class to keep cache exclusive to a ScriptInterface

May 8 2022, 6:44 PM
lyv added a comment to D4575: Implement ES6 Module Loading.

The cache cannot be shared over interfaces as the modules themselves are bound to a compartment.

May 8 2022, 5:02 PM
lyv added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
May 8 2022, 4:07 PM
lyv added a comment to D4628: Fix non-visual autostart, as well as client/host autostart..

I find this an improvement over the status quo.

May 8 2022, 2:35 PM
lyv added inline comments to D4486: Fix maps after rP26298..
May 8 2022, 10:24 AM

May 1 2022

lyv added a comment to D4628: Fix non-visual autostart, as well as client/host autostart..

Ideally this would be a whole new thing that stores the canonical game state I guess.

May 1 2022, 6:32 PM
lyv abandoned D4613: Add JSI_TemplateLoader.
May 1 2022, 1:56 PM
lyv added a comment to D4632: Revert rP26298, put civ historical data back in the JSON file..

Relevant discussions on D4486, D4612, D4613, D4618 and D4630 regarding the overall added complexity of trying to make the existing code work cleanly.

May 1 2022, 1:54 PM

Apr 30 2022

lyv added a comment to D4630: Fix map errors from GetTemplate not being available in the sim.

Sounds like bandaids on top of bandaids. In which case I would much prefer to move the GetTemplate call one level above to whoever is calling loadCivFiles. Although I don't really care enough to outright reject this either.

Apr 30 2022, 8:42 PM
lyv abandoned D4612: Change CTemplateLoader into a namespace instead.
Apr 30 2022, 8:32 PM
lyv added inline comments to D4630: Fix map errors from GetTemplate not being available in the sim.
Apr 30 2022, 8:20 PM
lyv added a comment to D4612: Change CTemplateLoader into a namespace instead.

I have already considered this approach dead to be honest mostly because the costs of actually making this global really outweighs the benefits without some major refactoring. Especially the CParamNode fiasco.

Apr 30 2022, 7:56 PM

Apr 28 2022

lyv added a comment to D4618: Allow CTemplateLoader to register it's script interface.

As far as solving the problem goes, honestly I find it wrong to let that function be used in global scripts because global scripts ought to not have to rely on C++ class details. This even adds a CTemplateLoader to the component manager because it's ScriptInferface also needs to register these functions. Everything that needs global scripts now also needs a CTemplateLoader which just seems wrong to me. Notice that this isn't the case for engine globals such as the VFS.

Apr 28 2022, 10:23 AM
lyv added a comment to D4618: Allow CTemplateLoader to register it's script interface.

It might be somewhat worse because it adds convolution instead of duplication.

Apr 28 2022, 10:01 AM

Apr 26 2022

lyv added a comment to D4617: Restrict access for Read/WriteFile functions.

The point was that it's unknown without looking at the macro. They resolve on the source layer, not on the syntax layer. There are far less unknowns if it's an actual function of a variable even if you don't know how it's defined because those have restricted scopes.

Apr 26 2022, 3:49 PM

Apr 24 2022

lyv added a comment to D4618: Allow CTemplateLoader to register it's script interface.

I skipped updating tests until general approach is reviewed.

Apr 24 2022, 9:11 PM
lyv added a comment to D4618: Allow CTemplateLoader to register it's script interface.

Maybe depends on how failure is detected on the CI perhaps? If it doesn't use exit codes and parse the output or something, there would be some warnings because rmgen tests try to override the functions.

Apr 24 2022, 9:10 PM
lyv added a comment to D4618: Allow CTemplateLoader to register it's script interface.

No strong opinions but the alternative deduplication proposed earlier in the other revision.

Apr 24 2022, 7:59 PM
lyv requested review of D4618: Allow CTemplateLoader to register it's script interface.
Apr 24 2022, 7:53 PM

Apr 21 2022

lyv added a comment to D4612: Change CTemplateLoader into a namespace instead.

So slowing down loading is ok?

Apr 21 2022, 11:54 PM
lyv updated the diff for D4612: Change CTemplateLoader into a namespace instead.

Make TemplateLoader cache thread safe

Apr 21 2022, 11:07 PM
lyv added a comment to D4612: Change CTemplateLoader into a namespace instead.

Is there a strong reason for a possible slowing down?

There shouldn't be. If there are so much calls to get template data, something is done wrong.

Apr 21 2022, 8:11 PM
lyv added a comment to D4613: Add JSI_TemplateLoader.

Need to trigger a rebuild somehow. This revision wouldn't be updated often. The parent revision would have most of the actual changes related to this.

Apr 21 2022, 7:01 PM
lyv added a comment to D4612: Change CTemplateLoader into a namespace instead.

Should use a shared_mutex right? Most calls should probably lead to a read as the game goes on so seems somewhat unnecessary to just exclusively lock always. Or would that not actually have an impact since the double locking might be more significant. I have a suspicion calls to this might actually be concentrated at the very beginning when templates would not be cached yet.

Apr 21 2022, 12:10 AM

Apr 20 2022

lyv updated the diff for D4612: Change CTemplateLoader into a namespace instead.

Fix CParamNode cache issues by disabling it. Measure performance without it. I somewhat doubt its called that much. It shouldn't be called that much.

Apr 20 2022, 10:41 PM
lyv added a comment to D4611: Remove unused Noise generator.

As far as I can tell, rP3871 added this file without any actual usage, rP4659 added the exact same implementation to the rmgen tool, rP9219 removed the rmgen tool along with the original implementation of noise.

Apr 20 2022, 9:51 PM
lyv planned changes to D4612: Change CTemplateLoader into a namespace instead.

CParamNode

Apr 20 2022, 8:34 PM
lyv requested review of D4612: Change CTemplateLoader into a namespace instead.
Apr 20 2022, 8:32 PM
lyv requested review of D4611: Remove unused Noise generator.
Apr 20 2022, 8:16 PM

Apr 18 2022

lyv updated the diff for D4606: Remove the Profiler allocation counter.

Remove the allocation counter

Apr 18 2022, 6:12 PM
lyv added a comment to D4606: Remove the Profiler allocation counter.
Apr 18 2022, 4:26 PM
lyv added a comment to D4606: Remove the Profiler allocation counter.

I guess everyone actually prefers this doesn't exist.

Apr 18 2022, 4:25 PM
lyv added a comment to D4606: Remove the Profiler allocation counter.

Actually, I think we can replace the static allocator with __libc_malloc instead.

Apr 18 2022, 1:59 PM
lyv added inline comments to D4606: Remove the Profiler allocation counter.
Apr 18 2022, 1:28 PM
lyv updated the diff for D4606: Remove the Profiler allocation counter.

The correct patch file

Apr 18 2022, 10:56 AM

Apr 17 2022

lyv updated the diff for D4606: Remove the Profiler allocation counter.

Simplify glibc overrides

Apr 17 2022, 8:08 PM
lyv planned changes to D4606: Remove the Profiler allocation counter.

I am planning to change this to a minimal arena allocator, which also would allow to cleanup this code a little bit. More importantly, it makes it no longer depend on the allocation behaviour of external code.

Apr 17 2022, 2:59 PM
lyv requested review of D4606: Remove the Profiler allocation counter.
Apr 17 2022, 2:08 PM

Apr 15 2022

lyv added inline comments to D4486: Fix maps after rP26298..
Apr 15 2022, 8:33 PM
lyv added inline comments to D4486: Fix maps after rP26298..
Apr 15 2022, 5:04 PM
lyv added inline comments to D4599: Allow setting the passability class dynamically..
Apr 15 2022, 3:57 PM

Apr 12 2022

lyv added inline comments to D4486: Fix maps after rP26298..
Apr 12 2022, 8:32 PM

Apr 11 2022

lyv added inline comments to D4486: Fix maps after rP26298..
Apr 11 2022, 11:43 AM

Mar 30 2022

lyv added a comment to D4582: [AI] introduce simple kiting.

It would be an internal stance only used by the AI.

Mar 30 2022, 5:35 PM
lyv added a comment to D4582: [AI] introduce simple kiting.

Feels like this should be a stance then. Obviously, preferably it should be in the AI, but if this route is taken, stances sound more correct than introducing minimum ranges.

Mar 30 2022, 5:20 PM
lyv added a comment to D4582: [AI] introduce simple kiting.

Isn't kiting always: hit the target, but retreat if it comes too close?

I guess so. But minimum ranges bring over other side effects with them. The most noticeable being that kiting would end up being forced which might make the AI easier.

Mar 30 2022, 3:24 PM
lyv added a comment to D4582: [AI] introduce simple kiting.

Since the ai currently has no per turn fine control over what the units do

Mar 30 2022, 2:46 PM

Mar 29 2022

Stan awarded D4575: Implement ES6 Module Loading a Like token.
Mar 29 2022, 12:10 AM

Mar 28 2022

lyv updated the diff for D4575: Implement ES6 Module Loading.

Add relative paths. Notice that it won't be possible to resolve out of VFS root. Maybe these should be jailed within the relevant directory. MapGenerator would call with maps/random and be locked in maps/random/.

Mar 28 2022, 10:13 PM
Langbart awarded D4575: Implement ES6 Module Loading a Like token.
Mar 28 2022, 1:36 AM

Mar 18 2022

lyv added a comment to D4562: Improve forests on savanna and nubia biomes.

Savanna forests don't have a covered canopy. The trees are widely spaced. Also no palms I assume. This is relevant because all savanna trees are to be placed identically regardless of baobab or acacia which IIRC are the only two savanna fauna available.

Mar 18 2022, 7:13 AM

Mar 16 2022

lyv added a comment to D4549: fix mainland: decorative bushes spawnig inside the player cc.

(And changing any map code was not an option at that moment).

Mar 16 2022, 7:01 PM
lyv added a comment to D4549: fix mainland: decorative bushes spawnig inside the player cc.

And since the last biome update introduced some non-actors as decoratives, that lead to actual bushes spawning inside/ too close the cc in some cases.

What was the reasoning for them not being actors if they are decoratives?

Mar 16 2022, 5:45 PM

Mar 12 2022

lyv added a comment to D1635: Add DunePainter..

Yes, already voiced at D2454.

Mar 12 2022, 10:58 PM

Mar 6 2022

lyv added a comment to D4526: further optimizations for map Unknown: Passes.

I may or may not have typed in the wrong tab.

Mar 6 2022, 8:52 PM
lyv added inline comments to D4457: Fix unknown map: opponent being unreachable.
Mar 6 2022, 8:50 PM
lyv accepted D4086: Texture update/ general overhaul for Gulf of Bothnia and its biomes.

Aside from that, it looks good to me. I haven't generated the map and seen the aesthetics, so whoever is commiting can use their judgement on that.

Mar 6 2022, 1:10 PM

Mar 4 2022

lyv added inline comments to D4086: Texture update/ general overhaul for Gulf of Bothnia and its biomes.
Mar 4 2022, 4:32 PM
lyv added a comment to D4086: Texture update/ general overhaul for Gulf of Bothnia and its biomes.

It would be nice to have a snow decal in addition to the base terrain. It would allow to have much more realistic details on the terrain.

Mar 4 2022, 4:14 PM

Feb 27 2022

lyv added a comment to D1414: Make ClumpPlacer determine the correct fraction of failed attempts to place points.

This is still good and as before I believe this should be committed.

Feb 27 2022, 9:58 PM

Feb 18 2022

lyv added a comment to D4451: Allow biomes to be modifiable.

Case 1 -> Tweaking
Case 2 -> Extending

Feb 18 2022, 9:39 PM

Feb 2 2022

lyv added a comment to D4472: Replace all "chicken" in the random maps folder with the more generic "startingAnimal".

Btw, just to be clear, I am not suggesting changes in any way.

Feb 2 2022, 5:39 PM
lyv added a comment to D4472: Replace all "chicken" in the random maps folder with the more generic "startingAnimal".

Random observations. Maybe relevant, maybe not.

Feb 2 2022, 11:13 AM

Jan 31 2022

lyv added a comment to D1599: Texture priority support for rmgen.

I was mostly interested in having another person look at it. As you can see, back when there were multiple rmgen guys around, the chains weren't also really moving smoothly. Although we were reaching a consensus slowly before the almighty stall.

Jan 31 2022, 9:00 PM

Jan 30 2022

lyv updated subscribers of D1599: Texture priority support for rmgen.

@marder , perhaps you want to continue this. This has extreme potential to make the maps nicer. Currently random maps cannot mess with texture blending priorities. If this were available, most jagged patches can be eliminated.

Jan 30 2022, 8:25 PM

Jan 28 2022

lyv added a comment to D4451: Allow biomes to be modifiable.

This is of course not that straight forward as the template mixins, as you still have to change the maps to actually use the new information...

Out of scope so not really relevant.

Jan 28 2022, 8:48 PM