Questions tagged [space-partitioning]
The space-partitioning tag has no summary.
32 questions
19
votes
1
answer
2k
views
How to achieve the Steel Division 2 frontline? (Dividing area smoothly with curves using a few points)
The game Steel Division 2 has a very nice looking frontline system, where a smoothly curved line is drawn between friendly and enemy units, dividing the map into territorty owned by two teams.
Does ...
2
votes
1
answer
274
views
Fill a non rectangular grid with rectangles
I'm developing a city builder with a zoning system similar to Cities: Skylines.
What I would need is an algorithm that would find all the way to fill this grid (in red) but with some constraints:
In ...
4
votes
0
answers
214
views
How can I render geometry represented in a 64-bit floating point environment?
In this video about Star Citizen, right at the 12:30 mark on the timeline you can see the player zooming in on a space station who's location is clearly out of the limit of 32-bit floating point ...
2
votes
2
answers
677
views
Where should I store an object? - QuadTree
I'm designing a QuadTree to scene partitioning, I've read theory and seen some code examples.
When a node has more than 4 objects, it will be splitted into 4 sub-nodes and its objects will be put ...
4
votes
2
answers
2k
views
understanding spatial hash function behaviour and Knuth for int64
I implemented open-indexing sparse 2D spatial HashMap, and I'm quite satisified with performance ( ~30-70 CPU cycles to get object at particular location for size ~16 Milion objects ).
However, I ...
0
votes
1
answer
125
views
3D space indexing for nearest neighbor searching
I am developing a CAD-like application where the user can draw (digitize) new geometries (points, polylines & polygons). While digitizing, I want the user to be able to (optionally) snap the ...
2
votes
2
answers
2k
views
Spatial Partitioning - Objects larger than cell?
I'm developing a top down 2D tile based game. Recently I started working on collision detection and have gone down the route of simply using spatial partitioning.
Each object belongs in a cell and ...
1
vote
1
answer
1k
views
Collision, triggering, and range detection in an RTS. What are the optimal solutions for unit spatial awareness?
I've finally ran into the problem of multiple triggers and collisions within my 2D RTS. Up till now I've been using unities sphere colliders as a way of simulating spatial awareness. To trigger when ...
3
votes
4
answers
860
views
Is moving entities between sectors of a grid spatial partitioning inefficient?
I'm using a grid system for spacial partitioning. If I have moving entities, will I have to reassign every entity to its correct section every frame?
Surely this is inefficient. Have I got the wrong ...
6
votes
2
answers
11k
views
When would you use an octree in a voxel Engine?
I've been reading about Octrees, and I understand how they work (or at least I think I do). However, I can't figure out why you would use octrees instead of a simple multidimensional array.
In my ...
9
votes
2
answers
526
views
World Bounds - (0, Size) or (-HalfSize, HalfSize)?
When creating a game space in which to move, draw and collide objects, is it better to have the (0,0) point, or the (0,0,0) point, be in the very center of your space, such that the bounds of the ...
4
votes
2
answers
395
views
Spatial Partitioning - How do I find the object is in the tree?
I understand the structure of Spatial Partitioning Trees - BSP, Quad and Octal. You just take a space and split it into however many parts specified by your tree - BSP:2, Quad:4, Octal:8. I've written ...
3
votes
3
answers
1k
views
How to choose cell to put entity in in an uniform grid used for broad phase collision detection?
I'm trying to implement the broad phase of my collision detection algorithm. My game is an arcade game with lot of moving entities in an open space with relatively equivalent sizes.
Regarding the ...
1
vote
1
answer
383
views
Dynamic quadrees
Recently I started writing a Quadtree for creature culling in Opendungeons game.
Thing is these are moving points and the bounding hierarchy will quickly get lost if the quadtree is not rebuild very ...
2
votes
2
answers
789
views
What are the possible options for AI path-finding etc when the world is "partitionned"?
If you anticipate a large persistent game world, and you don't want to end up with some game server crashing due to overload, then you have to design from the ground up a game world that is ...
8
votes
1
answer
610
views
Chunking/caching large levels in a singleplayer game
Does it make sense to try to offload a large nonlinear level into file-based chunks, and load those on demand? We've implemented level chunking to improve rendering performance, but still all level ...