#Calculation Issues
1 messages · Page 1 of 1 (latest)
that's
not how you calculate speed to begin with
horizontal speed I assume
what are they using the speed value for by the way? because often times it's better to use an approximate look up table with a predicate to check horizontal speed
and if this is running every tick, it's a disaster.. so yea if possible specify why you need the speed
(ask your friend I mean)
So then what can we do instead?
I feel like a lookup table is the exact opposite of what they want, they clearly decided to make it dynamic
Depends on why you need that value
I get that, dynamic = cool & often better. But with the tools we have, we sometimes need to do compromises
cuz ain't no way it's a good idea to run all of that every tick
I guess that's fair
considering it's calculated wrongly to begin with
but a bunch of lookup tables is?
a wall of predicates is better than math?
yep
predicates are processed very swiftly
of course as long as you don't go too far
in this case both are bad
Then what's good 😭
ask her what is she tryna do so we could determine 🥲
She's from like ireland I'll be waiting all day for an answer 😭
What are the options?
math is bad, wall of predicates is good but too many is bad
predicates as a look up table, if the number of them is too large we could divide them into some kind of tree to greatly reduce checks
if they're too too many we could try a tree
that'd cut them by log of 2
but again still wouldn't recommend every tick unless necessary
I mean how would you collect the players speed without checking that tick? Just running every few ticks instead?
I've never understood why running things tickly is bad when the other option is to run every 5 ticks instead that feels like the same thing to me
ok so don't be mad but... || that depends on why she needs to do that to begin with 💀 ||
I mean
5 ticks
Alright I'll get back to you whenever she gets back to me
that's ture...
I mean less weight
doing operations so long like this is tiring
and by the way, as I said this math here is completely wrong, you should square both X and Z first and take their root. And as you know we don't have a root in mc, so you gotta use an approximation formula, which is so expensive
In some cases players don't store their motion, but they always store position apparently
Yeh ok I will share