[DiscordArchive] though if it's just 300 soldiers, couldn't you just random them around across the 32 bits you alread
[DiscordArchive] though if it's just 300 soldiers, couldn't you just random them around across the 32 bits you alread
Archived author: <o> • Posted: 2022-07-18T20:15:52.068000+00:00
Original source
_or_ extend the grid notifiers to accept entries as well
Archived author: <o> • Posted: 2022-07-18T20:17:03.482000+00:00
Original source
and then yeah, use some map to track visibility and update the players phasemask (just to trigger a visibility update) whenever it changes
Archived author: <o> • Posted: 2022-07-18T20:17:35.529000+00:00
Original source
though you'll soon notice a boolean map is often just a more memory-intensive bitfield
Archived author: <o> • Posted: 2022-07-18T20:18:50.306000+00:00
Original source
it's apt when you have a very common default behavior (like 290 are in one state and 10 in the other that you track)
Archived author: whatwere • Posted: 2022-07-18T20:19:54.802000+00:00
Original source
Wonder if an unordered map would be faster for this than a normal map
Archived author: <o> • Posted: 2022-07-18T20:20:55.921000+00:00
Original source
that's just a toggle so just measure it
Archived author: <o> • Posted: 2022-07-18T20:21:10.460000+00:00
Original source
doesn't impact your design more than the name you use
Archived author: <o> • Posted: 2022-07-18T20:22:01.198000+00:00
Original source
if your numbers are accurate (~300), it wouldn't surprise me if a big fat bitfield is still faster than a map
Archived author: <o> • Posted: 2022-07-18T20:23:05.769000+00:00
Original source
but maybe not, that would end up impacting every query and fuck up the cache for the visibility system
Archived author: <o> • Posted: 2022-07-18T20:23:32.104000+00:00
Original source
it's among the few things in the core that's actually cache optimized