Jump to content
  • Latest updates

  • Newest Posts

    • int CompareLengthSquared(u64 cmpSquared) const { u64 d2 = SQUARE_U64_FIXED(X) + SQUARE_U64_FIXED(Y); // d2 <= 2^63 (no overflow) if (d2 < cmpSquared) return -1; if (d2 > cmpSquared) return +1; return 0; } https://code.wildfiregames.com/source/0ad/browse/ps/trunk/source/maths/FixedVector2D.h#:~:text=int CompareLengthSquared(,} ok so, yes the precision for lengths is 1 meter, but the differences are found for x^2+y^2, so for a 70 meter range archer, 1 meter out of up to 4900 is very little. So basically, the precision when sorting lengths gets higher the farther away the unit is: a single integer represents a range differences of 0.014 meters near 70 meters range. The relationship looks like this:  The only thing is the relationship needs to be a parabola, so you can't just do (x^3/Px^2) because this would incorrectly rank units distances. I suppose the thing to do would be to use an integer square root estimation algorithm.
    • Well like anything it depends. Would need to be profiled. @wraitii had an optimization for the range manager here https://code.wildfiregames.com/D5022 not sure what it's worth.  
    • This one https://code.wildfiregames.com/D5006 Wraitii had a bunch of performance patches that might be worth looking at https://code.wildfiregames.com/search/query/1SOtiSQV9ik8/#R
    • Well, this is some intresting news: https://www.omgubuntu.co.uk/2024/06/linux-mint-will-hide-unverified-flatpaks
    • Weird that it doesn't work in single player. Did you enter it in gamesetup or after the game started? I'll give it a try later.
    • real_tabasco_sause, I tried this command on the console. It fails on single player mode, so I had to open 2 instances of 0AD, one as host and one as client. As soon as I entered the command on the host machine I got an OOS. And when I tried this command on the client it failed telling me only hosts can enter this command. So apparently both host and client should be patched via mod before the game starts.
    • Can this command be entered during a 4v4 replay? It would be an interesting test to make for sure. But, while testing turn length on a single computer might be interesting, I want to test it on actual multiplayer games from the lobby. Testing it just on my own CPU does not give us the whole picture probably.
×
×
  • Create New...