I played with some settings, added randomnes but it never really feels like chaos, where Agents run around everywhere are small 1v1 or 2v1 battles going on … it always stays ordered, like “there is a block of agents and they stay in formation”.
When you have those “blocks” (formations) of agents facing each other with ranged weapons - how would you mix it up so that there is more chaos?
might start by randomizing spawn location and times. Probably that changes it 100%.
How are they targeting each other? A few simple rules mixed with the randomized spawn might make a big difference. Like do a check to see which enemy is closest, and target them. With taht you’ll have some units shooting, others moving.
Could add in inaccuracy - or rather, make only a percentage of shots fired successfully hit target. How oyu implement kinda depends on how the dudes are shooting. But if you can either assign percent to hit for total group or individual basis, and introduce some randomness there, then battle woudl play out different every time. Or you could still weight it to one side.
When characters get blasted, maybe ragdoll them too, rather than just disappear. Bodies all over place will add a lot. And smoke FX. And blood. All that stuff.
Yes and no. Spawn locations won’t really matter because troops will spawn in groups, period. Those groups will move across the map and face each other. And when they do, it’s quite boring when they stay in formation and shoot each other.
Animations for death, explosion, particle effects will all be added, but it won’t change the ordered way battles play out when troops stay in their formations.
Targeting is done by finding the closest enemy within a range.
I think the core problem is having two groups with ranged weapons. On a flat plane, they will never get close, break out of their group or even mix with the other group (meaning A troops inside group B).
Leveldesign & flanking could help somewhat. But IDK if that’s the solution to all problems with the concept. Maybe I need things breaking formations? Like an explosion and agents in a certain range start running away for a few seconds, then return to battle …
Well for your spawn thing… he means don’t make them all spawn in neat grid-like rows. It’s way too basic. Make each group spawn around a radius around a point (https://docs.unity3d.com/ScriptReference/Random-insideUnitCircle.html). This will make a huge difference. You’re wrong if you think it won’t.
Make them move at random speeds. People don’t all walk at the same speed.
I am kind of surprised you can make something this intricate, but not be able to figure out how to make stuff random.
for starters, you are probably not gonna want to use a random number generator for every random number.
Games like this have too many numbers going on to be burning through the CPU like that.
you will want to make a random number array.
basically make an array of random int’s, and cycle through it.
that random math function is way too expensive for games like this.
as for the randomness of your people, just throwing those random numbers all over the place.
have it affect their accuracy.
Have it affect The delay before they start shooting.
have it affect the delay before they start walking.
just really anything that will scramble it.
this is kind of the whole point of macro systems.
Games like dwarf fortress, ecosystem simulators, and Battle simulator games like this one need lots of different randomize variables that make interesting outcomes.
This difference is visible at the prototype stage without death animations, particle effects or any of that.
I can’t think of any start scenario where this would happen. Whenever an enemy is spotted, the agent stops and starts shooting.
So when two (or more) groups of agents meet each other and start fighting, they will just stay in place and shoot. How should they ever end up in
you can assign priorities and do range checks. if priority target is not within range, move until it is, then shoot.
instead of one big unit, use many smaller units. If each is seeking out its own priority targets and moving to get in range, it will look like a battle.
if you want to keep semblance of a larger formation, have smaller unit compare distance from some leader unit and clamp its distance from that. So even if a priority target asked them to move further, they wouldnt get too far from the leader.
the total war example isn’t doing anything fancy - just lots of little simple things.