Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures  (Read 3508 times)

omega_dwarf

  • Bay Watcher
  • Adequate Architect, Dabbling Modder
    • View Profile
Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« on: September 09, 2015, 10:40:04 am »

Multi-tile creatures are planned. These creatures will have to path - similarly to normal units, but checking that the area they choose to path through can actually fit them.

When this is achieved, squads could mooch off of this kind of pathfinding. I think that currently they just follow their leader, each guy still individually pathing after him. Which is an improvement over completely individual pathfinding, but not as good as it could get.

My suggestion is this: let the squad leader find paths as if he were a multi-tile unit. His troops will be arrayed around him in formation. Once he finds a successful path, his troops just stay around him, each corresponding to a square in the multi-tile creature. It seems like 9-man squads (3x3, resizable to 1x9), up to even 16-man squads (4x4, 2x8, 1x16) would be quite easy to model using this method, with the added bonus that they can actually stay in formation, not abandoning each other or rushing ahead, etc.

The overall goal is a performance boost from thinking of troops less like individual units than as almost graphical elements or moving obstacles (at least while they're pathing as a squad), allowing theoretically larger sieges. A 50% save in pathfinding using this method could correspond to a doubling of siege numbers, resulting in more realistic (and epic) warfare that a large portion of the userbase would appreciate.

If civilizations cannot actually support these larger sieges with historical figures, they could have each historical figure (who's a soldier) count for ten people, or something similar - a fixed ratio that still reflects available resources. Armies could be modeled solely by their squad captains and a number corresponding to how many soldiers each squad captain has, with every squad-member the same type of fighter as their captain.

Inspiration for this came when reading this thread, the most recent posts about a 2,000-human siege. That would still be out of the realm of feasibility (probably), but 500-man with usable FPS might not be.

Oh, and as always, if this idea exists elsewhere, let me know and I'll delete this topic and repost the relevant bits. But it doesn't seem to.

crazyabe

  • Bay Watcher
  • I didn't start the fire...Just added the gasoline!
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #1 on: September 09, 2015, 11:26:00 am »

wow, this sounds like a good idea!
Logged
Quote from: MonkeyMarkMario, 2023
“Don’t quote me.”
nothing here.

Skullsploder

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #3 on: September 10, 2015, 02:01:33 pm »

The multi-tile creature would have to break apart for most combat otherwise this risks becoming a very different game... although it could be an interesting way to implement hoplite-style shield walls and such. Overall I think this is an excellent suggestion for allowing larger sieges with better FPS and at the same time getting formations into the game. Excellent suggestion. Full support :)
Logged
"is it harmful for my dwarves ? I bet it is"
Always a safe default assumption in this game 

rampaging-poet

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #4 on: September 11, 2015, 06:30:25 pm »

There are a few other potential problems to deal with too.  First, what happens when members of the squad are captured (cage traps) or killed?  The squad needs to recognize that it is now smaller and pathfind accordingly.

Second, this is probably open to pathfinding abuse.  If squads always path as multitile creatures, they can be kept out of secure areas just by making the path too small.  Any formation wider than one square flat-out can't fit, so anyone behind a one-square passage would be completely out of their reach.  If the try to path as a multitile creature first before breaking off into smaller squads if they can't get there, then larger squads could be delayed an arbitrary amount by digging long, wide, rambling passages with narrow shortcuts and leaving the wide passage accessible.  The multitile squad would see the wide path and ignore the shorter path.
Logged
Lame excuse? 'Having a drink instead' is the dwarfiest reason to not get something done, short of accidentally flooding your home with magma. Or intentionally flooding your home with magma.

Heretic

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #5 on: September 16, 2015, 12:26:07 am »

Idea looks really great, but u forget one thing: we don't know how pathfinding for multile creatures will work. I meant that one giant creature can be probadly more harmful for FPS then 9 units in sqad.
Logged

Icefire2314

  • Bay Watcher
  • Programmer and Space Enthusiast
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #6 on: September 17, 2015, 09:13:22 pm »

Idea looks really great, but u forget one thing: we don't know how pathfinding for multile creatures will work. I meant that one giant creature can be probadly more harmful for FPS then 9 units in sqad.
Unlikely. As the idea suggests, each squad is computed as a single unit moving. Rather than having 9 units all path separately, and forcing your computer to do that strain, you are having 9 units path as a squad, so the squad counts as one unit. So you could have 9 squads path for the same computer memory cost as 9 individual units. (if i understand correctly)
Logged
"ERUTH PULL THE DAMN LEVER THE ZOMBIES ARE ABOUT TO GET INSIDE!"
"zzz"
BAY 12 MINI CITY: http://bay-12.myminicity.com/

Heretic

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #7 on: September 19, 2015, 01:42:48 am »

...
Unlikely. As the idea suggests, each squad is computed as a single unit moving.
Hmm... that you think about point that for pathfinding for one multitile creature you must create algoritm that finding bigger hole for actor... and in some situation it should takes into account the surface irregularities... And it's really big deal and difficult, harmful for FPS alghoritm...
Example that i meant is here
Logged

Insanegame27

  • Bay Watcher
  • Now versio- I mean, age 18. Honestly not an AI.
    • View Profile
    • Steam ID
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #8 on: September 29, 2015, 10:18:09 pm »

I like this idea a lot. Impplemented in adventure mode it would be heaven.


Personal addition to this: In the squads menu make a 'formation' option. Have a choice of single file, single rank, double rank, double file, x by x, x by y. x2 by x2, x2 by y2 etc.


those pesky Humans wont know what hit them when my wasps advance in perfect hivemind unision, slingers behind soldiers. (see my sig if you dont know what I'm on about)
Logged
Power/metagaming RL since Birth/Born to do it.
Quote from: Second Amendment
A militia cannot function properly without arms, therefore the right of the people to keep and bear Arms, shall not be infringed.
The military cannot function without tanks and warplanes, therefore the right of the people to keep and bear tanks and warplanes, shall not be infringed.
The military cannot function without ICBMs, therefore the right of the people to keep and bear ICBMs, shall not be infringed.

expwnent

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #9 on: October 01, 2015, 02:19:35 pm »

Idea looks really great, but u forget one thing: we don't know how pathfinding for multile creatures will work. I meant that one giant creature can be probadly more harmful for FPS then 9 units in sqad.

Seconded. It would be tricky to know what would be best for performance. There are many optimizations DF has to do pathfinding for units that move in a "standard" way. Fliers, swimmers, magma swimmers, etc require extra work and currently can't path anywhere unless there is also a path on foot. I think currently the leader of a squad does pathing and everyone else just huddles around the leader.
Logged

Shazbot

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #10 on: October 06, 2015, 11:47:43 am »

The important bit about formations is not only walking in a group, but being able to relieve the man in front of you when he's tired or bleeding. A force that uses this system has fresh men in the middle ranks and recovering men in the back ranks, while forces that don't use this system are a mass of men wearing themselves out without hope of relief short of an entirely new wave they can retreat behind. And one unit trying to relieve another unit on an active battlefield remains among the hardest things to do. There will necessarily need to be some AI moving men around inside the formation as they become exhausted or incapacitated.
Logged

GoblinCookie

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #11 on: October 06, 2015, 01:22:15 pm »

The important bit about formations is not only walking in a group, but being able to relieve the man in front of you when he's tired or bleeding. A force that uses this system has fresh men in the middle ranks and recovering men in the back ranks, while forces that don't use this system are a mass of men wearing themselves out without hope of relief short of an entirely new wave they can retreat behind. And one unit trying to relieve another unit on an active battlefield remains among the hardest things to do. There will necessarily need to be some AI moving men around inside the formation as they become exhausted or incapacitated.

There is also the matter of supplying the individual soldiers.  Do we give the whole squad a single stomach for instance? 
Logged

Shazbot

  • Bay Watcher
    • View Profile
Re: Possibly Larger Sieges: Squad Pathfinding via Multi-tile Creatures
« Reply #12 on: October 07, 2015, 09:42:08 am »

You know, we've already seen a form of pathfinding for multi-tile creatures with wagons. So far it declares a tile passable to a wagon if it is in the center of a 3x3 square. From what I'm reading of the suggestion, the squad leader would simply remain in those multi-tile passable squares as he marches around and his squad mates would march with him in close order formation. I don't see a need to unify their pathfinding as one entity; they should all remain individuals so dodging, wrestling and ducking into side rooms to slaughter cowering civilians can all happen seamessly. The Discipline skill would weigh how much the soldier values staying in formation with the squad leader's leadership adding some weight as well.
Logged