lilinitsy Posted June 23, 2018 Report Share Posted June 23, 2018 Hello, all. I'm new to 0. A.D. and interested in contributing. Mainly, the crowd simulation and the way that units move by default without a formulation and the way they bunch at one location is quite unrealistic. This can be solved with the pretty heavily researched topic of crowd simulation. I've implemented Boids crowd simulation (a pretty basic one that looks reasonably good) before and would probably like to reimplement it for 0. A.D (https://pdfs.semanticscholar.org/4183/faeef708a56b988742b5572fce9174caec7b.pdf). The codebase is pretty massive, and I've noticed that there is a lot of somewhat relevant AI code in source/simulation2/components. I'm mostly wondering if anyone can point me more specifically to where I'd look to begin modifying how units move and adding some better crowd simulation. 2 Quote Link to comment Share on other sites More sharing options...
gaius Posted June 23, 2018 Report Share Posted June 23, 2018 I made a mod with better unit behavior, regarding chasing, attacking and capturing. But no AI is used, but for example some randomness. But i think formation is the best way to go, it has several advandages: like better to micro, looks nicer, more tactical and less cost of pathfinding. U can look at my mod: https://0ad.mod.io/formation-fighting-mod. And look mostly on UnitAI.js. 1 Quote Link to comment Share on other sites More sharing options...
lilinitsy Posted June 23, 2018 Author Report Share Posted June 23, 2018 Hey, Gaius, nice mod! I skimmed it - it's a lot of JS, which I don't know very well - and it's cool. You should make a display video if you want to show off the differences between your mod and the standard. I'm mostly interested in making the clustering / flocking behaviour without a formation more realistic, disregarding improving other aspects for now. In a strict implementation, I shouldn't have to actually end up modifying the costs of pathfinding though. Many more advanced crowd simulations are either based on a spring-force type model, or a velocity space model, and the path doesn't exactly change. The units will move a little differently, but their goal will be to move along the path, while the crowd simulation aspects (forces, velocity spaces, etc.) will keep them very slightly offset from the path. It should result in a better looking group movement without a formation. 4 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 23, 2018 Report Share Posted June 23, 2018 @elexis Quote Link to comment Share on other sites More sharing options...
Guest Posted June 23, 2018 Report Share Posted June 23, 2018 Talking without much knowledge. But looks like vertex pathfinder material. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted June 23, 2018 Report Share Posted June 23, 2018 1 hour ago, Lion.Kanzen said: @elexis You wanna say @wraitii. 4 hours ago, lilinitsy said: I'm mostly wondering if anyone can point me more specifically to where I'd look to begin modifying how units move and adding some better crowd simulation. 0 A.D. doesn't have the crowd simulation, only a path finder for short and long paths. You can find it in source/simulation2/, files that contains the "path" word in their names. There are also UnitAI and UnitMotion components. 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted June 23, 2018 Report Share Posted June 23, 2018 Just now, vladislavbelov said: You wanna say @wraitii. 0 A.D. doesn't have the crowd simulation, only a path finder for short and long paths. You can find it in source/simulation2/, files that contains the "path" word in their names. There are also UnitAI and UnitMotion components. is rare see him in forums... so i trying some more regular. Quote Link to comment Share on other sites More sharing options...
elexis Posted June 23, 2018 Report Share Posted June 23, 2018 Also chek https://code.wildfiregames.com/source/0ad/browse/ps/trunk/docs/pathfinder.pdf and wraitii had started some pushing patch at D1490. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.