Author Topic: Improving Warcraft II unit pathing (idea, poll inside)  (Read 8293 times)

Offline Buttercraft

  • Grunt
  • ***
  • Posts: 56
    • View Profile
Improving Warcraft II unit pathing (idea, poll inside)
« on: March 08, 2023, 12:26:20 AM »
In my opinion

The most archaic feature of Warcraft II is the unit pathing, units get into jams going one way across the map but move freely in the opposite direction

First, how difficult would it be to improve the pathing without building from source code? the A* algorithm has been mentioned elsewhere (but without source might not be realistic)

and second is this something the community would want? poll below

https://strawpoll.com/polls/w4nWrWK0xyA

Offline Buttercraft

  • Grunt
  • ***
  • Posts: 56
    • View Profile
Re: Improving Warcraft II unit pathing (idea, poll inside)
« Reply #1 on: March 08, 2023, 01:32:59 AM »
It's a multifold problem but not too complex to tackle (I think).

The main issue is pathing around static entities, yes I have had patrolling units freeze on collision but it's rare and insignificant.

Some extra reading for anyone interested in this topic.

https://forum.gamemaker.io/index.php?threads/warcraft-2-grid-based-pathfinding-with-dynamic-objects.31432/post-195109
https://web.archive.org/web/20180714090519/https://www.codeofhonor.com/blog/the-starcraft-path-finding-hack
https://gamedev.stackexchange.com/questions/160400/rts-pathfinding
https://devcrumbs.github.io/Warcraft-II/Sandra_Alvarez.html

Offline Mistral

  • Administrator
  • Axe Thrower
  • *****
  • Posts: 408
    • View Profile
Re: Improving Warcraft II unit pathing (idea, poll inside)
« Reply #2 on: March 08, 2023, 06:53:01 AM »
not happening
need to rewrite game engine itself
i saw source codes and also disassmed binaries
i can only say that for 1995 this pathfinding was revolutionary cuz they was needed with limited resources calculate path for up to 800 units, so they maked it very optimized, any other algorithm of that era would have been even worse or too complicated and hard for those old computers with the amounts of units war2 had.

but ofc for modern era this pathfinding is VERY cursed but unfortunately its beyond salvation u simply cannot fix it, only way is to rewrite new algorithm from 0 but problem is that this stuff is so hardcoded and also tied very closely to other things in game engine itself so this task becomes even more cursed

also there is not much programmers except me and fois and lamb now who can work with war2 code on this super low level byte code and etc.
i not saw others long ago and myself is too busy with real life work
i even very rare update mod now (like once a month rare, before was times when i maked some things almost every day)
and even not have time to make custom campanign that was needed to maked long ago
so i even more not have time for fixing pathfinding

Offline dannyldd

  • Grunt
  • ***
  • Posts: 225
    • View Profile
Re: Improving Warcraft II unit pathing (idea, poll inside)
« Reply #3 on: March 09, 2023, 12:56:40 PM »
There's one little thing that can be done about unit pathing but it depends from Ed for such.

Very recently, I have tested up his BruhCraft mod and he managed to enable RALLY POINTS for computer on X missions for even specific computer factions.

If Ed wants to release Rally points code, I can make a try to make this thing functional for future mods.

I actually think this is very cool and it's a nice way to control somehow unit pathing, besides it's NOT an universal feature for computer in any situation.

Actually, Warcraft 1 HAD RALLY POINTS to improve its already poor unit pathing, and computer managed to set up some sort of decent rally point for their units in most, if not all of Warcraft 1 missions.

I even checked this Alpha mod out here to remaster Warcraft 1 in Windows 10 and indeed, the original maps had actual rally points for such purpose.

In Warcraft 2, there're a few missions that "attempted" to showcase this rally points feature but in my very honest opinion, if you're an experienced Warcraft 2 player, you may see how it's a bit flawed.
Example of this is, Human11 mission. Alterac-Orange humans have an actual rally point to the entrance of their base (next to towers) so units may not fall too far away from home before attacking, besides they are just planned to just have ONE BARRACKS to produce their entire army in that map, LuL.

Maybe there're other missions which have rally points but I can't remember at the moment... Well I just remembered another one: XOrc2. Green orcs attempt to send their units across the base bridges they have and set them around those, before launching the next attack. Again, since Warcraft 2 original missions are so slow to produce units OR to ever produce anything OR lack of testings, you simply cannot embrace to see it's proper functionality in all it's glory....

If you're willing to check out way faster those rally point features for them, you can check my  DAIFE mod either in Up to v6.940 version OR DAIFE v7.0+:
https://gamebanana.com/members/submissions/mods/1738346

Yes, I remember quite a couple of CUSTOM MAPS by Blizzard which had this issue about unit pathing, most specially on maps that were intended to be played by ONLY PLAYERS, but with this rally points feature I bet there may be no map where units " should " get stucked with the proper amount of testings.
« Last Edit: March 10, 2023, 06:36:51 AM by dannyldd »

Offline Buttercraft

  • Grunt
  • ***
  • Posts: 56
    • View Profile
Re: Improving Warcraft II unit pathing (idea, poll inside)
« Reply #4 on: March 10, 2023, 05:10:22 AM »
Thank you both for your input  :thumbsup:

I have deleted the poll, case closed on pathing.

Waypoints in mulitplayer would change the game dynamics quite alot, so if it is a option (in future) it should be enforced across all players on a per game basis, not "always on" or individually optioned.