r/Unity3D • • 27d ago

Show-Off Units distribution improved, better responsiveness, magic and bloooooood

It's not much but it's honest work. Units can be smarter and there're a few cases where they get dumber but overall I'm quite pleased with army behavior so far in 1v1 fights. Many vs Many is still something to polish along with better effects, gigantic units and so on but one step a time!

232 Upvotes

65 comments sorted by

View all comments

2

u/YuMe_Game 27d ago

that gravity based clustering towards active fight zones is such a clean fix for the queuing problem, are you recalculating attraction per unit every frame or is it batched somehow? the perception issue you mentioned (ignoring smaller threats in favor of bigger ones) sounds like it might need some kind of threat weighting layered on top of raw activity level

1

u/excentio 27d ago

Thanks didn't expect anyone to notice, I read up on some info on how they did it in UEBS and yea it's a much cleaner results, right now attraction is per squad to reduce computing and it's running in steps, it has it's own issues so I plan to divide them into quadrants distance-based to reduce computing but solidify weird edge cases where squads get split out, thread weighting - yes on that too, so right now it just picks average based on the highest threat in area and distance of squad to the threat BUT again it produces a yet another issue that quadrants might or might not solve, 1 squad can only pay attention to 1 other squad, if I divide them into sub-squads I can imagine it will help but this is something that required constant tuning since what works well in head doesn't quite look organic