0
\$\begingroup\$

I have been making mobile RTS game in Unity look like Clash Royale similarly.

Unfortunately, I faced to two big problems.

First is two phones(clients) to be synchronized each other in game state. And second is "path finding" or "local avoidance"(collision check).

To solve the path finding issue, I have searched about "Flow Field".

  1. Should I do consider on 3 layer map(cost field, integration field, flow field) to apply "Flow field"?

  2. If I do apply "flow field" to my game, can I have a liberty from the problem of Sync two clients?

Thank you in advance.

\$\endgroup\$
0
\$\begingroup\$

(1) You should consider at least a 2-field map since you otherwise will be reading from the same map you are writing to, at the same time, which breaks spectacularly. I see no reason not to use the 3 fields you mentioned, if that keeps the data clearer and easier to debug.

(2) But no, I see no reason why flow fields in particular (which are just another pathfinding algorithm) should particularly solve any sync problems, since if the map is out-of-date by the time it arrives at another client, you will face exactly the same issues you would with any other solution.

What you need to look into is ways to deal with latency. Pathfinding algorithms themselves are not for that purpose, and flow fields are a pathfinding approach.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.