Page MenuHomeWildfire Games

wraitii (Lancelot)
Animal

Projects

User Details

User Since
Dec 21 2016, 1:38 PM (281 w, 6 d)

Recent Activity

Yesterday

wraitii published D4653: [extreme POC] Compile AssemblyScript to WASM within Spidermonkey & run the webAssembly module for review.
Tue, May 17, 10:15 PM
wraitii awarded rP26889: Fix an infinite loop when trying to word-wrap a The World Burns token.
Tue, May 17, 2:44 PM
wraitii published D4652: Introduce some tests for CGUIText for review.
Tue, May 17, 10:30 AM
wraitii added inline comments to D4650: Adds instancing support to backend and enables it for minimap.
Tue, May 17, 9:28 AM
wraitii added inline comments to D4650: Adds instancing support to backend and enables it for minimap.
Tue, May 17, 9:21 AM
wraitii added inline comments to D4650: Adds instancing support to backend and enables it for minimap.
Tue, May 17, 9:15 AM

Mon, May 16

wraitii added inline comments to D4650: Adds instancing support to backend and enables it for minimap.
Mon, May 16, 11:07 PM
wraitii added a comment to D4530: Fix an infinite loop when trying to word-wrap.

God this code is a mess.

You're talking like other code is significantly better x)

Mon, May 16, 10:55 PM
wraitii accepted D4530: Fix an infinite loop when trying to word-wrap.

God this code is a mess.

Mon, May 16, 7:16 PM

Sun, May 15

wraitii added inline comments to rP26881: Allo native builds on Mac OS M1 / Apple Silicon.
Sun, May 15, 11:29 PM
wraitii committed rP26882: Fix SM compilation on M1, fix cross-compilation..
Fix SM compilation on M1, fix cross-compilation.
Sun, May 15, 11:23 PM
wraitii closed D4647: Fix SM compilation on M1.
Sun, May 15, 11:23 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

This one should work

Sun, May 15, 10:54 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

Still learning lua

Sun, May 15, 10:53 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

More debug

Sun, May 15, 10:50 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

Debug

Sun, May 15, 10:48 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

Fix premake

Sun, May 15, 10:44 PM
wraitii added inline comments to D4647: Fix SM compilation on M1.
Sun, May 15, 10:35 PM
wraitii added inline comments to D4647: Fix SM compilation on M1.
Sun, May 15, 10:33 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

Fix cross-compilation, run with ARCH/HOSTTYPE=x86_64

Sun, May 15, 10:32 PM
wraitii added inline comments to D4647: Fix SM compilation on M1.
Sun, May 15, 9:25 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

Proper fix this time

Sun, May 15, 9:19 PM
wraitii added inline comments to D4647: Fix SM compilation on M1.
Sun, May 15, 9:19 PM
wraitii updated the diff for D4647: Fix SM compilation on M1.

Fix xwwidgets

Sun, May 15, 9:17 PM
wraitii added a comment to rP26881: Allo native builds on Mac OS M1 / Apple Silicon.
In rP26881#57875, @Stan wrote:

Question how do I build a X86 build on my M1 now ? I can pass arch to the libs, but not to updateworkspaces.sh, nor premake for the game

Sun, May 15, 9:05 PM
wraitii requested review of D4647: Fix SM compilation on M1.
Sun, May 15, 7:04 PM
wraitii added inline comments to rP26881: Allo native builds on Mac OS M1 / Apple Silicon.
Sun, May 15, 6:59 PM
wraitii added inline comments to rP26881: Allo native builds on Mac OS M1 / Apple Silicon.
Sun, May 15, 6:54 PM
wraitii added inline comments to rP26881: Allo native builds on Mac OS M1 / Apple Silicon.
Sun, May 15, 6:48 PM
wraitii requested review of D4646: Parse autostart arguments in Javascript.
Sun, May 15, 4:42 PM
wraitii abandoned D1554: 3438 - Split Autostart function into smaller pieces.

Will be invalidated by D4646, which seems easier given the rest of code changes, and since this is old/stale I'll abandon directly.

Sun, May 15, 4:14 PM
wraitii updated the diff for D3807: [WIP] Support JS promises.

For Demo purposes, add a RunThreaded function to run some threaded javascript. This highlights that a web-worker like API is doable, but doing it efficiently would take a little more thought.

Sun, May 15, 12:19 PM
wraitii added inline comments to D3807: [WIP] Support JS promises.
Sun, May 15, 11:40 AM
wraitii retitled D3807: [WIP] Support JS promises from [POC] Support JS promises to [WIP] Support JS promises.
Sun, May 15, 11:38 AM
wraitii updated the diff for D3807: [WIP] Support JS promises.

Rework, upgrade & make actually functional.

Sun, May 15, 11:29 AM
wraitii committed rP26881: Allo native builds on Mac OS M1 / Apple Silicon.
Allo native builds on Mac OS M1 / Apple Silicon
Sun, May 15, 8:47 AM
wraitii closed D4607: Fix build on MacOS Darwin arm64 / aarch64 (M1 / Apple Silicon).
Sun, May 15, 8:46 AM
wraitii committed rP26880: Fix rP26879.
Fix rP26879
Sun, May 15, 8:37 AM
wraitii committed rP26879: Fix non-visual autostart, as well as client/host autostart..
Fix non-visual autostart, as well as client/host autostart.
Sun, May 15, 8:35 AM
wraitii closed D4628: Fix non-visual autostart, as well as client/host autostart..
Sun, May 15, 8:35 AM

Sat, May 14

wraitii added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
Sat, May 14, 7:53 PM
wraitii added a comment to D4575: Implement ES6 Module Loading.
  • If used in the GUI, we'll need to do some work to expose the init function, unless we have a non-module file to describe page entry points. Something like import { init } from './HotkeysPage.mjs'; globalThis.init = init; works, but it's kind of ugly.
Sat, May 14, 1:16 PM
wraitii added a comment to D4575: Implement ES6 Module Loading.

Tested this quickly today:

  • The '.mjs' syntax might be useful to differentiate in the engine. So maybe let's keep that.
  • If used in the GUI, we'll need to do some work to expose the init function, unless we have a non-module file to describe page entry points. Something like import { init } from './HotkeysPage.mjs'; globalThis.init = init; works, but it's kind of ugly.
Sat, May 14, 10:11 AM
wraitii updated the diff for D4628: Fix non-visual autostart, as well as client/host autostart..

Fix last comments.

Sat, May 14, 9:48 AM
wraitii added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
Sat, May 14, 9:45 AM
wraitii updated the diff for D4607: Fix build on MacOS Darwin arm64 / aarch64 (M1 / Apple Silicon).

Change #elifdef to #elif defined()

Sat, May 14, 9:34 AM

Fri, May 13

wraitii added a comment to D4572: [macOS] Spidermonkey fix .

This is included in D4607 & seems to bug for other people as well (see phosit on IRC today). I think it might be a Python 3.10 thing instead of a mac thing.

Fri, May 13, 6:48 PM
wraitii updated the diff for D4607: Fix build on MacOS Darwin arm64 / aarch64 (M1 / Apple Silicon).

Reworked using an upstream patch of mine (but largely the same fixes). Tested to work on my mac.

Fri, May 13, 6:48 PM

Wed, May 11

wraitii updated the diff for D4628: Fix non-visual autostart, as well as client/host autostart..

Raise error, handle errors in the C++ (fail to autostart)

Wed, May 11, 6:16 PM
wraitii added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
Wed, May 11, 5:58 PM
wraitii added a comment to D4575: Implement ES6 Module Loading.

Do you have something specific in mind as to not really interchangeable?? I think they generally are.

Wed, May 11, 5:35 PM
wraitii added a comment to D4575: Implement ES6 Module Loading.

Either /, ./ or ../ at the start I guess. None of those would mean start at the current directory.

In general I'd rather not have a leading / unless it's necessary for disambiguating. In frontend development, absolute paths usually refer to node_modules and the root source directory is aliased to something (I think @ is most common).
However, we don't have node_modules and likely never will, and C++ vfsPath just start at the VFS root in general. I think it makes sense to have three types of paths:

  • Absolute paths (from VFS root), no specific syntax.
  • Paths that start with ./, which are relative paths.
  • Paths that start with ../ any number of time, which are also relative paths.
Wed, May 11, 5:28 PM
wraitii added a comment to rP26867: Fix map errors from GetTemplate not being available in the sim.

For the record -> This is intended as a temporary fix that nevertheless won't result in massive technical debt if it remains like that for the next 15 years, which I think is somewhat likely given that despite several tries, nobody's found a much better way yet.

Wed, May 11, 5:18 PM
wraitii added a comment to D4575: Implement ES6 Module Loading.

Notice that it won't be possible to resolve out of VFS root.

Definitely the only sane move.

Wed, May 11, 3:42 PM
wraitii added a comment to D4575: Implement ES6 Module Loading.

Read-through review:

  • I think we should use .js over .mjs in the interest of tooling support, and I'm not convinced that .mjs will actually take off.
  • There's a bunch of duplication with LoadGlobalScript & such in ScriptInterface.cpp. I think it's time to merge those together in a single ScriptCompile file or something.
    • In particular, there's a question of entry points -> Once we're compiling as modules, we can import submodules, but we can't import modules from non-modules bits.
  • Your tests are missing an absolute path, and I think it's broken in the current implementation. I think it should work, and should start from the VFS root as one would expect. Relative paths are quickly unwieldy when you get into folders-of-folders.
Wed, May 11, 3:40 PM

Tue, May 10

wraitii updated the diff for D4628: Fix non-visual autostart, as well as client/host autostart..

Always load the network JSI functions.

Tue, May 10, 6:48 PM
wraitii added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
Tue, May 10, 6:43 PM
wraitii added inline comments to D4575: Implement ES6 Module Loading.
Tue, May 10, 6:37 PM
wraitii added a comment to D4643: Assign credit for units killed by cmpGarisonHolder.EjectOrKill.

Think this approach is workable, will let freagarach take over :)

Tue, May 10, 12:23 PM
wraitii added a comment to D4643: Assign credit for units killed by cmpGarisonHolder.EjectOrKill.

So If I add changeOrigin to Reduce and to RegisterHealthChanged then I could add it to the HealthChanged message.
Does this sound good? If so should I pass attackerOwner along with it?

Tue, May 10, 11:37 AM
wraitii added a comment to D4643: Assign credit for units killed by cmpGarisonHolder.EjectOrKill.

Hm, hadn't though of loot. Your right, that's more annoying.

Tue, May 10, 11:11 AM
wraitii abandoned D4632: Revert rP26298, put civ historical data back in the JSON file..

I think we found a better idea, see comments in the fixing diff that ended up being committed.

Tue, May 10, 9:34 AM
wraitii added a comment to D4643: Assign credit for units killed by cmpGarisonHolder.EjectOrKill.

As for some knowledge drop:

SendGlobalMessage(ent, msg);
that doesn't seem right? The messages are sent to the components they are supposed to go to on line 990?

Tue, May 10, 9:31 AM
wraitii added a comment to D4643: Assign credit for units killed by cmpGarisonHolder.EjectOrKill.

Looking at source/simulation2/system/ComponentManager.cpp line 974 it seems to be saying that when you provide an entity to PostMessage only the components of that entity will be notified.

Tue, May 10, 9:27 AM
wraitii accepted D4486: Fix maps after rP26298..
Tue, May 10, 9:17 AM

Mon, May 9

wraitii committed rP26867: Fix map errors from GetTemplate not being available in the sim.
Fix map errors from GetTemplate not being available in the sim
Mon, May 9, 8:14 PM
wraitii closed D4630: Fix map errors from GetTemplate not being available in the sim.
Mon, May 9, 8:13 PM
wraitii updated the diff for D4630: Fix map errors from GetTemplate not being available in the sim.

C++ changes only, CC

Mon, May 9, 7:36 PM
wraitii added inline comments to D4630: Fix map errors from GetTemplate not being available in the sim.
Mon, May 9, 7:35 PM
wraitii committed rP26866: Fix crash in non-visual autostart from not loading terrain textures.
Fix crash in non-visual autostart from not loading terrain textures
Mon, May 9, 7:31 PM
wraitii closed D4627: Fix crash in non-visual mode from not loading terrain textures.
Mon, May 9, 7:31 PM
wraitii committed rP26865: UnitMotion - Fix Clearance serialization and only allow changing passability of….
UnitMotion - Fix Clearance serialization and only allow changing passability of…
Mon, May 9, 7:29 PM
wraitii closed D4629: Fix rP26801 - Only allwo changing passability of formation controllers..
Mon, May 9, 7:29 PM
wraitii added inline comments to D4641: Fixes shader program and technique reloading.
Mon, May 9, 3:15 PM
wraitii added a comment to D4640: Avoids drawing text in GUI if it will be clipped.

You might run in a situation where clipart == CRect(), but I'm not sure that's actually something that can happen in practice.

Currently it's intended to not clip if clipart == CRect().

Mon, May 9, 1:36 PM
wraitii added a comment to D368: Gameplay Scripting: Entity and Actor coding for Secondary Attacks.

For reference, AoE 2 added a ranged/melee unit recently: https://www.youtube.com/watch?v=rvJdOKktoMA
The switching is not automatic but manual.

Mon, May 9, 1:23 PM
wraitii added a comment to D4640: Avoids drawing text in GUI if it will be clipped.

not clipping if the clipping area is 0 by 0

Why?

Mon, May 9, 1:22 PM
wraitii added a comment to D3886: Resistance paradigm change: Unspecified value = invulnerable, not 0 resistance..

As I pointed out in the forum, 0 and undefined aren't actually equivalent anyways. The formula we use is:
effectData.Damage[type] * Math.pow(0.9, resistanceStrengths.Damage[type]). You'll notice that Math.pow(0.9, 0) is 1, whereas Math.pow(0.9, undefined) is NaN, as one would expect. Thus a guard must be added, and thus there is an obvious difference.

Mon, May 9, 10:27 AM

Sun, May 8

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

High-level comments:

  • I think this is something we should move towards. It's saner than our current code in the GUI IMO, and could lower load times and sort out the common mess somewhat efficiently.
  • I think you'll need to have the module cache at the ScriptInterface level but I would need to check the SM docs
  • We have a question for loading whole directories, but maybe we should treat it as an implicit import * as FILENAME from FILENAME.js
  • We need to consider how to handle hot reloading as well.
Sun, May 8, 3:39 PM
wraitii added inline comments to D4628: Fix non-visual autostart, as well as client/host autostart..
Sun, May 8, 3:31 PM
wraitii added a comment to D4461: Unit pushing: lower static exntesion following rP26245.

Its better, but they still switch unitAI gather/approching state.
EDIT1: better video, which compares pushing with rP26244 (left) vs rP26261 (right)
[ Video ]

Sun, May 8, 1:51 PM
wraitii updated the diff for D4629: Fix rP26801 - Only allwo changing passability of formation controllers..

Commonalize code, maybe fix serialisation issue, am confused by why it seemed to work before.

Sun, May 8, 1:44 PM
wraitii added a comment to D4629: Fix rP26801 - Only allwo changing passability of formation controllers..

You'll need to update cmpUnitMotionFlying to also update the clearance in cmpObstruction.

Sun, May 8, 1:42 PM
wraitii updated the summary of D4628: Fix non-visual autostart, as well as client/host autostart..
Sun, May 8, 1:18 PM
wraitii updated the summary of D4628: Fix non-visual autostart, as well as client/host autostart..
Sun, May 8, 1:17 PM
wraitii updated the diff for D4628: Fix non-visual autostart, as well as client/host autostart..

remove Civilisations.js, failed to notice that.

Sun, May 8, 1:14 PM
wraitii updated the diff for D4628: Fix non-visual autostart, as well as client/host autostart..
  • Move gamesettings from gui/gamesettings/ to gamesettings/. This moves attributes as well.
  • Move autostart files from gui/autostart/ to autostart/. Note that gui/autostart/ still exists as it's used in the tutorial button from the main menu.
  • Implement a placeholder autostart/entrypoint.js in the mod mod.
  • Rename the JSI_VFS functions to be explicitly about their function: the ability to write and the potential restricted folders.
  • Load the full autostart/ folder instead of just the entrypoint script to allow easier extensions in mods.
  • Don't require autostart when using --autostart-client in non-visual mode.
Sun, May 8, 1:08 PM
wraitii added a comment to D4461: Unit pushing: lower static exntesion following rP26245.

To me it seems like this is just a bad edge case since the house is so close? I didn't notice that it would happen extensively, but maybe I'm wrong.

Sun, May 8, 11:40 AM
wraitii updated the diff for D4627: Fix crash in non-visual mode from not loading terrain textures.

spaces

Sun, May 8, 10:46 AM
wraitii added a comment to D4486: Fix maps after rP26298..
In D4486#197129, @Stan wrote:

So do you and @wraitii agree on this or are you still debating which of the patches is the right move ?

Good question. :) I haven't seen a formal agreement on the patch level, but our discussion on Friday seemed to hint to this patch.

I think we've largely agreed that long-term, the proper fix here is to implement a templateLoader-level ListTemplates(TemplateType) function, and use different root elements (<Entity>, <Technology>, <Civilization>).

Sun, May 8, 10:19 AM

Fri, May 6

wraitii added inline comments to D4629: Fix rP26801 - Only allwo changing passability of formation controllers..
Fri, May 6, 4:58 PM
wraitii added inline comments to D4629: Fix rP26801 - Only allwo changing passability of formation controllers..
Fri, May 6, 3:36 PM

Mon, May 2

wraitii added a comment to D4632: Revert rP26298, put civ historical data back in the JSON file..

Furthermore, basically all callsites have been complicated by the diff instead of simplified, which shows IMO that something is awry.

I see only the call in templates.js being complicated?

Mon, May 2, 10:04 AM

Sun, May 1

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

Yes and the patch adds the code somehow depending on GUI:

// ...
scriptInterface.LoadGlobalScriptFile(VfsPath(L"gui/autostart/autostart_entrypoint.js"));
// ...
JSI_VFS::RegisterScriptFunctions_GUI(rq);
Sun, May 1, 8:23 PM
wraitii added a comment to D4628: Fix non-visual autostart, as well as client/host autostart..

So the patch basically adds an easier possibility to break the non-visual mode in the future (as the new code should be always synced with the logic of GUI).

Sun, May 1, 8:03 PM
wraitii requested review of D4632: Revert rP26298, put civ historical data back in the JSON file..
Sun, May 1, 1:01 PM
wraitii raised a concern with rP26298: Move GenericName, History and Icon from the civ-JSON to cmpIdentity..

Gonna raise a concern, I've convinced myself this needs to be mostly reverted. See https://code.wildfiregames.com/D4630#196827, rephrased below:

Sun, May 1, 12:18 PM
wraitii added a comment to D4630: Fix map errors from GetTemplate not being available in the sim.

I've considered smiley's comments that this should just take a template. But trying to do that was super awkward. This had got me thinking that rP26298 was essentially the wrong move.

Sun, May 1, 12:13 PM

Sat, Apr 30

wraitii added inline comments to D4630: Fix map errors from GetTemplate not being available in the sim.
Sat, Apr 30, 8:33 PM
wraitii added a comment to D4612: Change CTemplateLoader into a namespace instead.

Might be worth abandoning the diff then, but I seem to generally agree.

Sat, Apr 30, 8:29 PM