Code center > Bugs and fixes
Torroidal Trouble 2.43n RESOLVED 2.43p
Numsgil:
I don't mean to lecture, but this strikes me as an instance of premature optimization. What sort of perf hit are we talking? 1%? Less? When you say that a feature will create a slight perf hit, most people probably imagine something like 3 to 7 % slower. If it's in the 1% to less range, I'd call it a negligable perf hit.
Right now you're probably doing a point vs. axis aligned bounding box collision test, right? When you probably want to be doing a circle vs. axis aligned bounding box collision test. How many extra calculations are required? I think it's on the order of maybe double for a naive test. Maybe less with a sophisticated algorithm. Maybe the SAT.
Of course, it all takes time to implement, so if implementation time is the deciding factor instead of perf hits, that's another matter entirely.
EricL:
Its four additional additions and comparisons per bot per cycle plus the drawing hit. The total imapct on perf is certainly less than 1% so it's not a big deal, but every little bit helps. Do people really care that they can't see bots that are more than half off the screen when zoomed? If people really care, I'd be happy to fix it generally.
shvarz:
I don't really care. Rubber borders work for me, and I don't usually keep track of particular bots to be troubled by their disappearance. And even if I did, I could always unlock the edges and see everything.
Testlund:
--- Quote from: EricL ---Do people really care...
--- End quote ---
Nope. Especially if it reduces performance, even just 1%. It may be too much when my sim is down to 0.1 cycles/sec.
EricL:
Fixed in 2.43p. I fixed this in a general way. In all cases, zoomed or locked, all parts (skin, aim, etc.) of a bot are displayed for any visible bot, even those only partially visible.
Navigation
[0] Message Index
[*] Previous page
Go to full version