Open andrew-peng-144 opened 3 years ago
currently using 1d array of "buckets", each bucket having 10 numbers max representing the entities in that cell. possible solutions:
or just use fewer cells. Cell size increased to 32x32 instead of 16x16 (unzoomed) pixels, this lowers number of cells by factor of 4, but has a lower maximum # of entities.
WOW! dont always iterate thru each tile every time. for a 50x50 its already ~2500 wasted computations per frame.