Page MenuHomeWildfire Games

nani
User

Projects

User does not belong to any projects.

User Details

User Since
Aug 18 2018, 10:57 PM (52 w, 4 h)

Recent Activity

Sun, Jul 21

nani added a comment to D284: lobby: Display observer count in gameslist.

Looks better, but if look at it from player, he may think that "+" symbol means added number of players, not observers, so I suggest, to make string like "current/max (observers)", and then we should add title, like "Players (Observers), but I'm not sure how it looks like for others.

Sun, Jul 21, 2:39 AM

Jul 15 2019

nani awarded D1707: Hard-counter tooltips a Evil Spooky Haunted Tree token.
Jul 15 2019, 2:39 PM
nani added inline comments to D2079: Adds snapping to edges for buildings.
Jul 15 2019, 1:45 PM
nani awarded D2079: Adds snapping to edges for buildings a Party Time token.
Jul 15 2019, 12:59 AM

Jul 12 2019

Krinkle awarded D1693: Avoid unnecessary updates from updateSettingsPanelPosition a Orange Medal token.
Jul 12 2019, 3:59 AM

Jun 12 2019

nani added a comment to D1628: Reregister game in multiplayer lobby when host disconnects from lobby..

Nice, what it will become of this diff now?

Jun 12 2019, 4:12 PM
nani awarded D1628: Reregister game in multiplayer lobby when host disconnects from lobby. a Cup of Joe token.
Jun 12 2019, 2:00 AM
nani abandoned D1640: ConvexPolygonPlacer optimization in rmgen..

Needs too may licences & code too ugly to commit.

Jun 12 2019, 1:32 AM
nani abandoned D1641: CityPainter optimization..

Closing as it does not archive the desirable results.

Jun 12 2019, 1:25 AM
nani abandoned D1628: Reregister game in multiplayer lobby when host disconnects from lobby..

Probably wrong approach.

Jun 12 2019, 1:14 AM
nani abandoned D1785: Custom building placement hotkeys + minor fix..

Wrong approach.

Jun 12 2019, 1:13 AM
nani abandoned D1766: Buildings shortcuts / hotkeys.

Wrong approach.

Jun 12 2019, 1:12 AM

Jun 11 2019

nani awarded D1928: Refactors Developer Overlay a Dat Boi token.
Jun 11 2019, 11:25 PM
nani awarded D1781: Fix chat performance issue. a Evil Spooky Haunted Tree token.
Jun 11 2019, 9:57 PM

Jun 2 2019

nani added a comment to D1943: UnitAI fix return value on "enter" according to FSM logic.

Maybe the FMS should have this behavior included when SetNextState is called inside an state with "enter" call, as it seems that by design and the code comment you've shown, is the behavior the coder wanted to always have in this case?

Jun 2 2019, 5:09 PM

May 13 2019

nani added a comment to D1871: Make rasterisation strictly more permissive than real static obstruction shapes (alternative take on D1869).

Replay: look at the houses for stuck units

May 13 2019, 9:51 PM
nani added a comment to D1871: Make rasterisation strictly more permissive than real static obstruction shapes (alternative take on D1869).

Seems all units are causing considerable lag if they try to/want to go to the same position (with time the lag increases even more).

May 13 2019, 9:45 PM

May 11 2019

nani added a comment to D1825: Resize (XML object) bar JS GUI addon.

Regardless of the above, I wonder if this is the first such feature for which we are popping an object at runtime from the global nether. That seems like a different direction from our current GUI items.

May 11 2019, 2:28 PM
nani added a comment to D1825: Resize (XML object) bar JS GUI addon.
In D1825#77538, @elexis wrote:
In D1825#77536, @elexis wrote:

This does sound like a 'core' c++ feature to me, but having a JS implementation first and then possibly porting it to C++ sounds like an interesting approach to me.

Is C++ the correct place to implement the feature idea or not?

Because if C++ is the right place to have it, then committing it in JS means that writing it in C++ is deincentivized as compared to not committing it in JS.
On the other hand we have JS because it makes coding much easier and quicker.
So if there is no performance issue of onTick and determined not to be a wrong layer of of abstraction, then JS would be ideal and porting to C++ later would be wrong.
If JS was the better choice, then one may consider allowing the developers to specify JS GUI object types in JS instead of C++, somehow (JSInterface_IGUIObject.cpp). Such a formalization might or might not have some advantages.
(Perhaps some part of it would be better in C++ and some other part in JS, hypothetically...)

May 11 2019, 2:23 PM

May 10 2019

nani awarded D1868: Add call-to-arms button. a Like token.
May 10 2019, 11:14 PM
nani updated the diff for D1825: Resize (XML object) bar JS GUI addon.
May 10 2019, 10:36 PM
nani updated the diff for D1825: Resize (XML object) bar JS GUI addon.

Added example.

May 10 2019, 8:58 PM
nani added inline comments to D1825: Resize (XML object) bar JS GUI addon.
May 10 2019, 5:20 PM
nani added a comment to D1825: Resize (XML object) bar JS GUI addon.

However I agree that the two resizeBars are a bit confusing and I'd put a full "example usage" on top of the component.

May 10 2019, 5:19 PM

May 8 2019

nani added inline comments to D856: Tab more names when autocomplete in chat (Autocomplete Cycling).
May 8 2019, 3:43 AM
nani awarded D856: Tab more names when autocomplete in chat (Autocomplete Cycling) a Like token.
May 8 2019, 3:42 AM

May 2 2019

nani awarded rP22239: Unify foundation sizes a Like token.
May 2 2019, 12:14 AM

Apr 23 2019

nani updated the diff for D1631: TileClass optimization..
Apr 23 2019, 1:03 PM
nani updated the diff for D1631: TileClass optimization..
Apr 23 2019, 3:04 AM
nani added inline comments to D1631: TileClass optimization..
Apr 23 2019, 3:02 AM

Apr 14 2019

nani updated the diff for D1825: Resize (XML object) bar JS GUI addon.
Apr 14 2019, 4:29 PM
nani created D1825: Resize (XML object) bar JS GUI addon.
Apr 14 2019, 12:19 AM

Apr 8 2019

nani awarded rP22171: Quarry stone a Like token.
Apr 8 2019, 2:47 AM
nani retitled D1702: GUI addon to animate objects proprieties from GUI addon to animate objects proprieties. to GUI addon to animate objects proprieties.
Apr 8 2019, 2:46 AM

Apr 7 2019

nani updated the diff for D1702: GUI addon to animate objects proprieties.

Fixed all but the loop logic.

Apr 7 2019, 10:20 PM
nani added inline comments to D1702: GUI addon to animate objects proprieties.
Apr 7 2019, 10:03 PM
nani updated the diff for D1634: Fert random map..

Cleanup & made it a little more pretty.

Apr 7 2019, 12:59 AM

Apr 6 2019

nani awarded rP22164: [CSlider] On click move the slider-button to the mouse position a Like token.
Apr 6 2019, 11:07 PM

Apr 5 2019

nani updated the diff for D1702: GUI addon to animate objects proprieties.

Minor fixes from comments (will do bigger ones later) + gamesetup
example

Apr 5 2019, 8:10 PM
nani added a comment to D1702: GUI addon to animate objects proprieties.
In D1702#74199, @bb wrote:

As elexis mentioned the color animation would in the vanilla game be dead code

Not committed but D1703 uses the three of them.

Furthermore it would help a lot when there was a simple test case, which uses this object already, something like the gamesetup options panel or so

Will try (or you could try the map browser diff D1703 which would show all the possibilities).

Apr 5 2019, 4:04 PM
nani added inline comments to D1637: BoolArray array wrapper..
Apr 5 2019, 2:31 PM
nani added a comment to D1637: BoolArray array wrapper..
MapSizesvnsvn + D1637 + D1631time reduction factor
MainlandNormal7.2 s2.3s3.1
MainlandGigant26.5 s5.8s4.5
Apr 5 2019, 1:41 PM
nani updated the diff for D1786: Refactor input.js.

Follow up

Apr 5 2019, 3:06 AM
nani updated the diff for D1786: Refactor input.js.

Follow up

Apr 5 2019, 3:05 AM
nani added inline comments to D1786: Refactor input.js.
Apr 5 2019, 2:59 AM

Apr 4 2019

nani added a comment to D1637: BoolArray array wrapper..

This diff does two things: reduce the size of the memory allocated needed for the array and exploit the 16 bit type values to to check the binary information of upto 16 tiles in one go.
Would improve generated maps times by 3~4x times for all sizes if combined with the other diff of TileClass.

Apr 4 2019, 7:22 PM

Mar 29 2019

nani added a comment to D1786: Refactor input.js.

Btw, thanks for reviewing.

Mar 29 2019, 6:55 PM
nani added a comment to D1786: Refactor input.js.

What uses the underscore?

None but given that the state can only be written with uppercase it might serve in the future as a word separator given that it doesn't conflict with the naming of the methods (but anyway I can just revert this change for now)

Defaults are an anti-pattern, because
(1) it means the caller omits mentioning the value, so when someone searches for the value, he won't find all matches
(2) the behavior of the default value might go unnoticed by the caller (assuming that default always fits because that's why it's the default) but mentioning the value makes the reader more critical as to whether the value is correct, and informs the reader directly which value is used.
(3) is all calls explicitly state the value, then it allows comparison between the calls, and in some cases one might find a better value than the default
That argument is mostly for function argument defaults function x(a, b = 123), I didn't investigate what you did with this default here, but I expect it will match the same pattern.

The default allows to ignore all the events that one might not want to process but still happen (e.g. if in a state "PLACING" you only want to process "onmousemotion" event and ignore all the other types of events) otherwise the FSM will warn you every time you try to process an event in that state that is not defined. Mostly the default method should be an empty function in this FSM case (unless we are talking about those two "default" that I had to define at "PRESELECTED" and "SELECTING.BOX" states given that I could not find a way to refactor them to non-defaults methods.
All in all, these possible unknown "default" calls that might happen can be easily seen uncommenting a warning in the FSM.js file to see what is being called at each processed event.

Mar 29 2019, 5:56 PM

Mar 28 2019

nani added a comment to D1786: Refactor input.js.

For now this patch moves:

  • INPUT_FOO
  • ACTION_FOO
  • the two big switch that evaluate the states (old fsm)
Mar 28 2019, 8:47 PM
nani added a comment to D1786: Refactor input.js.

@Imarok

Mar 28 2019, 8:35 PM
nani updated the diff for D1786: Refactor input.js.

Added a warning check

Mar 28 2019, 4:02 PM

Mar 27 2019

nani updated the diff for D1786: Refactor input.js.

Further cleanup, streamlined fsm states logic more.

Mar 27 2019, 11:55 PM
nani updated the diff for D1786: Refactor input.js.

Reupload (the formatter modified some unrelated lines)

Mar 27 2019, 3:14 AM
nani updated the diff for D1786: Refactor input.js.

Cleanup

  • Integrated all the ACTION_FOO into the FSM
  • Removed duplicated code
  • Moved most implementations specific methods to their corresponding files
  • Created corresponding functions calls to place/preview buildings/walls
  • Refactored double/triple click units selection
Mar 27 2019, 2:22 AM
nani added inline comments to D1786: Refactor input.js.
Mar 27 2019, 2:10 AM

Mar 26 2019

nani updated the diff for D1786: Refactor input.js.

Cleanup

  • Added minor helper functions
  • Removed duplicated code
  • Made easier to add new input events
  • Reorganized input states to a more logical naming/structure
Mar 26 2019, 5:27 PM

Mar 25 2019

nani updated the diff for D1786: Refactor input.js.

Cleanup

Mar 25 2019, 8:38 PM

Mar 24 2019

nani planned changes to D1786: Refactor input.js.
Mar 24 2019, 9:05 PM
nani updated the diff for D1786: Refactor input.js.

Turned the input events to a FSM from FSM.js (more o less)
Fixes #4848 and implements #2826

Mar 24 2019, 9:04 PM
nani awarded P133 Attempt at a better UI for external links a Pirate Logo token.
Mar 24 2019, 8:30 PM

Mar 19 2019

nani archived P137 gridBrowser + mapbrowser update + semi functional map browser diff.
Mar 19 2019, 7:15 PM
nani archived P136 Diff of GridBrowser + example.
Mar 19 2019, 7:15 PM
nani archived P135 Generic GUI Grid Paged addon .
Mar 19 2019, 7:14 PM
nani updated the diff for D1786: Refactor input.js.

Comments fixes.

Mar 19 2019, 12:54 AM

Mar 18 2019

nani updated the diff for D1786: Refactor input.js.

Added full context

Mar 18 2019, 8:52 PM
nani updated the diff for D1786: Refactor input.js.
  • Sent SDL codes to mod/gui/common (was a TODO).
  • Grouped related global variables and functions into an object.
  • Replaces var variables for let's.
  • Sent GUI events to input_events.js
Mar 18 2019, 2:59 PM

Mar 17 2019

nani accepted D1532: Reword the tooltip of the Disable Treasures option.
Mar 17 2019, 6:39 PM
nani added inline comments to D1532: Reword the tooltip of the Disable Treasures option.
Mar 17 2019, 6:35 PM

Mar 16 2019

nani updated the diff for D1702: GUI addon to animate objects proprieties.

Improved readability and code clarity.

Mar 16 2019, 10:09 PM
nani updated the diff for D1786: Refactor input.js.

Fixed from comments.

Mar 16 2019, 9:50 PM
nani added a comment to D1786: Refactor input.js.
In D1786#72871, @elexis wrote:

Would use arrow-functions while at it.

Mar 16 2019, 9:34 PM
nani added inline comments to D1786: Refactor input.js.
Mar 16 2019, 9:24 PM
nani added a comment to D1786: Refactor input.js.

Well my idea was to show this to test waters and see what people think of it, then I could refractor the rest if all is ok.

Mar 16 2019, 9:11 PM
nani created D1786: Refactor input.js.
Mar 16 2019, 7:29 PM
nani updated the summary of D1785: Custom building placement hotkeys + minor fix..
Mar 16 2019, 7:20 AM
nani added reviewers for D1785: Custom building placement hotkeys + minor fix.: elexis, ffffffff.
Mar 16 2019, 6:46 AM
nani created D1785: Custom building placement hotkeys + minor fix..
Mar 16 2019, 6:45 AM

Mar 6 2019

nani added a comment to D1781: Fix chat performance issue..

Still, it doesn't solve the problem of bloating the base object if we want to make a JS interface for each gui type.

Mar 6 2019, 9:01 PM
nani added a comment to D1781: Fix chat performance issue..

Not sure. But does look deceptively easy.

Mar 6 2019, 8:59 PM
nani added a comment to D1781: Fix chat performance issue..

Technically yes but I'm not sure it won't break something else (like the charts).

Mar 6 2019, 8:26 PM
nani added a comment to D1781: Fix chat performance issue..

The thing is I did look into to changing CText CTextOwnder and similar files but the current inheritance model that is made with is quite difficult to expand so I went for the most straight forward/short solution. Maybe composition over inheritance would give more leverage but that means a rewrite of the GUI.

Mar 6 2019, 8:06 PM
nani added a comment to D1781: Fix chat performance issue..
In D1781#72577, @elexis wrote:

As mentioned some polished version of the CList diff seems appropriate given that it relates to the TODO.

So can we have middle ground? The new method can be polished and use it at face value for the meanwhile so the chat doesn't hog the lobby.
All chat features will still be the same (needs that new extra tag to follow text bottom given that CList doesn't have it).
Nothing will change for the end user except 0ad being a little bit more performant. Not bad deal IMHO.

Mar 6 2019, 12:26 AM

Mar 4 2019

nani added a comment to D1781: Fix chat performance issue..

That means there is a textSmashup = chatHistory.join("\n") prior to that code, i.e. that the only thing you measure is the caption assignment?

Yes. I'm 100% sure c++ code is the problem.

So it takes 5 milliseconds for .caption = text if text is 500 lines long and 5ms equate to 1/200th of a second.
That is JSI_IGUIObject::setProperty which calls ScriptInterface::FromJSVal and GUI<CStrW>::SetSetting, the latter calls CText::SetupText(), which calls GetGUI()->GenerateText and computes the scrollbar properties.
So it's the GenerateText call on a 500line string that consumes 5ms?
But reading CList::AddItem, that also calls CList::SetupText which calls GenerateText for every item, but your diff replaces that call to a call to SetupTextLastItem removing all GenerateText calls except the one for the last item.
If there were numbers to back that up that would demonstrate that claim.

I did a chart in the previous demonstrating that is indeed GenerateText (what else could be? is clear as water that that for loop in GenerateText is unnecessary to add only another item-.-)

For instance one could call GenerateText to a 500 line string and see how much time that costs.

Already done in the chart.

I guess it's the parsing of the GUI tags that might take so long (linear complexity).

Parsing + text sprite generation

So if the analysis is correct, the SetupTextLastItem part of the diff might be correct to fix that removed TODO in CList.cpp (should just verify that one really doesnt need to rebuild texts or whatever else is rebuilt upon AddItem).
Now the remaining quesiton would be whether the same performance improvement could be achieved for CText and CInput.

Yes it can be done.

Perhaps they could store a vector of GeneratedTexts to implement an AddCaption with time complexity that has less than linear relation to the total caption length;
and then some day enable GUITag parsing for read-only CInputs, and thus make the chat both selectable and high-performant / O(1).

They already do have a vector, just needs someone to implement the JSinterface + methods for each case. :)

Mar 4 2019, 9:39 PM

Mar 3 2019

nani added a comment to D1781: Fix chat performance issue..

@elexis chat from the lobby for 2.5 h at sunday.

Mar 3 2019, 8:06 PM

Feb 26 2019

nani added a comment to D1781: Fix chat performance issue..
In D1781#72462, @elexis wrote:

If the slow part is the JS .join call concatenating and sprintf-formatting + 500 strings, we should remove that first and foremost (simply using .caption += new_line) before considering any C++ change.
It could be that this is already sufficient enough performance to provide sufficient performance.

I must say i haven't tried that (will try) but I'm 99% sure the problem is C++ given it needlessly deletes all computations as text parsing text sprite creation (expensive) and makes new ones for something which was already done.

Feb 26 2019, 9:33 PM

Feb 24 2019

nani added a comment to D1781: Fix chat performance issue..

Idk man.

Feb 24 2019, 9:04 PM

Feb 23 2019

nani added a comment to D1755: Fix line misaligment in gamesetup settings..

Will it get commited or do I need to change/do something? I made the change that broke it so I feel responsible :S

Feb 23 2019, 10:05 PM
nani added a comment to D1781: Fix chat performance issue..

@vladislavbelov is this ok?

Feb 23 2019, 10:01 PM
nani updated the diff for D1781: Fix chat performance issue..

Remove setting follow_last_if_visible as is orthogonal to the patch (will add in another patch if this goes through).

Feb 23 2019, 10:01 PM
nani added a comment to D1718: Decay/regenerate option for resources when not being gathered from.

There is a important difference between setTimeout and setInterval (at least in Node and web browsers in general)

Feb 23 2019, 9:16 PM
nani added a comment to D1781: Fix chat performance issue..
In D1781#72322, @elexis wrote:

The question is why this should become a CList to begin with

Feb 23 2019, 7:29 PM
nani added a comment to D1718: Decay/regenerate option for resources when not being gathered from.

This debounce thingy looks very nice, could be used in many places in gui.

Feb 23 2019, 6:40 PM
nani added inline comments to D1781: Fix chat performance issue..
Feb 23 2019, 6:24 PM
nani added inline comments to D1781: Fix chat performance issue..
Feb 23 2019, 6:22 PM
nani updated subscribers of D1781: Fix chat performance issue..
In D1781#72304, @elexis wrote:

So should optimize both performance and code complexity.

A little hard to add features without adding complexity. (can be refactored later tho but that's not the scope of this patch)

What is the performance critical part where FPS start to be dropped?

Having the lobby open for 1h (lots of comments on chat)

Is it the JS string building from the message history array or the passing of a long string?

Creates a big string from array.join("/n)

I.e. is Engine.GetGuiObjectByName("chat").text += newline similarly quick as the proposed diff?

First: += doesn't work as there is a JS <-> C++ conversion going on.
Second: even if it worked the C++ implementation would anyways delete all the list and make a new one.

Notice the session chat is not affected by this patch and it has to be rebuilt in case someone selects a different playerview or triggers the diplomacy colors feature (or muted/unmuted someone, or on other events).

Yep. Nothing can be done there (unless if <objects type="list"> is used for each filter but that sounds ugly.

I guess the lobby dialog UI performance is relevant FPS-wise because the lobby can be opened in-game.

Is not about the opening (first load) is about the accumulated text being added as if it were a whole new text each time.

Shouldn't selecting multiple lines of text become possible eventually? Would CList allow for that?

For the moment selected setting tag is a int type so no (an array of ints or a set could).

Feb 23 2019, 4:57 PM
nani updated the summary of D1781: Fix chat performance issue..
Feb 23 2019, 4:19 AM
nani created D1781: Fix chat performance issue..
Feb 23 2019, 4:18 AM

Feb 17 2019

nani updated the test plan for D1650: GridBrowser GUI addon.
Feb 17 2019, 2:38 AM
nani updated the summary of D1702: GUI addon to animate objects proprieties.
Feb 17 2019, 2:33 AM
nani updated the summary of D1702: GUI addon to animate objects proprieties.
Feb 17 2019, 2:32 AM