Tag Info

New answers tagged


This is a shot in the blind, but I can see two potential solutions: Per-pixel collision detection: This is probably too much for the job, but using per-pixel collision detection would solve the issue, as only one tile would have opaque pixel under the cursor at a time. Distance: When multiple tiles could be selected, calculate the absolute distance ( ...


Sorting Use a quad- or oct-tree. Basically, the single bucket (vector/array) you are using now represents the outer-most tree-node; it contains everything. In addition to containing all game objects, it will contain 4/8 child nodes (sub-buckets) that are exactly 1/4(quad) or 1/8(oct) the size of the orginal and fit entirely inside it with no "empty space" ...

Top 50 recent answers are included