Multi-agent path finding for an rts(-ish) game.

#1
Given n playable entities (entities that the player can select with the mouse and move from their original locations to a set of destination locations without intersection). My implementation is an extension of the Isometric Game template with a few modifications, namely the camera moves freely like in StarCraft, or, more accurately, the game Kenshi; Currently I'm able to select as many playable entities as desired, sending their Ids to a buffer to apply logic such as move them to
m_pCursorEntity->GetWorldPos(); ofc what is intended is to move them to different but proxy locations, otherwise they'll collide and diverge.
I'm also doing most of the work in c++; Any ideas/recommendations on how to procced ?


My naïve idea goes like this:
1. create a circumference of radius r (r is a function of the length of the buffer, meaning if I have a lot of To Walk Entities then the destination circumference should be bigger) and center m_pCursorEntity->GetWorldPos().
3. Create a vector W, such that W = m_pCursorEntity->GetWorldPos() + random vector && W.len() < r.
2. Apply W to entity with navigation component, aka p_NavComp->NavigateTo(W).

Peace.

Who is online

Users browsing this forum: No registered users and 3 guests

cron