#Any resources for a “grid overlay”

4 messages · Page 1 of 1 (latest)

manic juniper
#

New to building games but I’m making a 3d game that controls like a traditional RTS. I have units that I can select and control, and from my best guess my next steps to have things like pathfinding and moving groups would be to kind of divide the map into a grid, so they spaces could be marked as occupied or moveable or whatever.

Anyone have any resources to share on doing something like this? I’m kind of having trouble of even think of the best approach to start with something like this, not sure if I should draw something that’s maybe invisible that is aware of what’s in it or basically divide it up and keep it in some sort of data structure that units add to as they move into it only in the code. Any advice or input on making this type of game is greatly appreciated

unborn lichen
#

I know in the map editors for broodwar and AOE2 the map is divided into tiles. I would guess those tiles are stored in a matrix and the a* pathfinding algorithm is used to move units. The units could also have bounding boxes to detect collisions and use a physics engine to slide them around each other while they try to get to their destinations like how units move in sc2. I've never implemented anything like this but just my best guess.

manic juniper
#

Or the engine loads the 3d map and applies this grid