Author Topic: excessive trees as map barriers (was: pathfinder lag)  (Read 1940 times)

roflcopter

  • Guest
excessive trees as map barriers (was: pathfinder lag)
« on: 6 August 2011, 06:20:19 »
Lately I've been experimenting with custom maps with a barrier of trees to avoid early zerg-rushes (which seem to be the goal of every AI faction, friend or foe). This way I can cut the trees when I'm ready to fight, or just make it a purely air battle.

The last map I tried I had to quit due to unplayable lag, with only 234 total units existing on the map. I have a feeling that a fully blocked path confuses the AI (which, again, seems programmed to invade other bases as soon as possible) to the point of causing extra lag.

Anybody know anything about this?
« Last Edit: 13 August 2011, 23:06:22 by roflcopter »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: pathfinder lag?
« Reply #1 on: 6 August 2011, 06:24:56 »
The last map I tried I had to quit due to unplayable lag, with only 234 total units existing on the map. I have a feeling that a fully blocked path confuses the AI (which, again, seems programmed to invade other bases as soon as possible) to the point of causing extra lag.
Well, the AI's use the four corners as a search pattern, and not being able to reach them properly could cause some problems unless the game can expect this. Should perhaps be changed to "wait" when it cannot find a path repetitively.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

roflcopter

  • Guest
Re: pathfinder lag?
« Reply #2 on: 6 August 2011, 06:45:23 »
Well, the AI's use the four corners as a search pattern, and not being able to reach them properly could cause some problems unless the game can expect this.
Interesting. Perhaps I'll try blocking myself in the middle of the map and put the opposing factions on the outside (with free access to all corners).

The other thing I noticed a couple times when I tried having an allied CPU faction on my side of the tree wall:
The allies would form a "human shield" between my base and the tree wall. In this way the friendlies would block my peasants/workers from cutting the right trees, or from returning after they cut the trees. So I had to kill some of the friendlies just to allow my guys to cut the trees. But each time I got one friendly out of the way, another one would come stand in the same place... so I had to quit that game too.

Quote
Should perhaps be changed to "wait" when it cannot find a path repetitively.
Yes, or at least refrain from trying again until the number of trees/resource squares decreases?



Incidentally is there some easier way to delay the onset of battle, roughly until all factions have unlocked "good" units?

I was hoping to test how much better the AI units would perform if they all attack at the same time rather than sending a few guys on suicide missions every other minute.

Edit by Omega: Merged double post. For posts within 12 hours of eachother without a reply inbetween, please edit the previous post.
« Last Edit: 6 August 2011, 16:53:50 by Omega »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: pathfinder lag?
« Reply #3 on: 6 August 2011, 16:55:41 »
Incidentally is there some easier way to delay the onset of battle, roughly until all factions have unlocked "good" units?
Not in regular games, only in scenarios (technically speaking, that is. However, it wouldn't be a real battle as you'd have to create all the foes units as well, etc).

https://docs.megaglest.org/Scenarios
« Last Edit: 18 June 2016, 18:42:58 by filux »
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

roflcopter

  • Guest
Re: pathfinder lag?
« Reply #4 on: 6 August 2011, 20:58:03 »
The other thing i did was make a super-peasant that can cap an entire tree in one sitting, which helped somewhat.

Do you know if there's a way to design a unit that can simply destroy trees (at a faster pace than harvesting them and without returning any wood)?

Quote
Edit by Omega: Merged double post. For posts within 12 hours of eachother without a reply inbetween, please edit the previous post.
Ok, not used to that. Most forums I frequent either do not allow editing posts, or make it impossible after a grace period (of less than 12 hours) and discouraged until then except for spelling/grammar errors.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: pathfinder lag?
« Reply #5 on: 7 August 2011, 02:27:40 »
Do you know if there's a way to design a unit that can simply destroy trees (at a faster pace than harvesting them and without returning any wood)?
To make a long answer short: No.

Quote
Edit by Omega: Merged double post. For posts within 12 hours of eachother without a reply inbetween, please edit the previous post.
Ok, not used to that. Most forums I frequent either do not allow editing posts, or make it impossible after a grace period (of less than 12 hours) and discouraged until then except for spelling/grammar errors.
We're special. :angel: You can read our special rule set here. Or not, at your discretion. :P
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

roflcopter

  • Guest
Re: pathfinder lag?
« Reply #6 on: 13 August 2011, 23:05:14 »
The other thing i did was make a super-peasant that can cap an entire tree in one sitting, which helped somewhat.
I also found if I set the wood-harvesting unit's <resources-stored> to a number other than zero, that unit does not need to carry wood back to the base.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: pathfinder lag?
« Reply #7 on: 14 August 2011, 06:14:02 »
The other thing i did was make a super-peasant that can cap an entire tree in one sitting, which helped somewhat.
I also found if I set the wood-harvesting unit's <resources-stored> to a number other than zero, that unit does not need to carry wood back to the base.
Yes, that's because it makes the unit just like how to castle stores resources, by making it think it can take the resources to it (adding it to the total viewable in the HUD). Some modders could find that desirable to make the mod different (eg, set the max carried to 1 and give it storage for that resource so that it simply harvests away without taking to any building), though none currently use such a thing.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

roflcopter

  • Guest
Re: pathfinder lag?
« Reply #8 on: 14 August 2011, 07:42:21 »
Yes, that's because it makes the unit just like how to castle stores resources, by making it think it can take the resources to it (adding it to the total viewable in the HUD).
It appeared as though the harvested logs were immediately teleported to the base because the woodcutter's load went to zero upon reaching max-load (or the amount of wood in the tree, whichever was lower).

Quote
Some modders could find that desirable to make the mod different (eg, set the max carried to 1 and give it storage for that resource so that it simply harvests away without taking to any building), though none currently use such a thing.
Yes, that would effect a constant acquisition rate of that resource, and probably mean 0 or 1 resources forfeited if the unit dies while harvesting.

I'm still curious whether anybody can think of a way to make a unit that can destroy trees instantly with the penalty that you collect no wood, in some way other than self-destructing.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: pathfinder lag?
« Reply #9 on: 14 August 2011, 08:31:30 »
I'm still curious whether anybody can think of a way to make a unit that can destroy trees instantly with the penalty that you collect no wood, in some way other than self-destructing.
Not possible, currently, I'm afraid.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Mr War

  • Guest
Re: pathfinder lag?
« Reply #10 on: 14 August 2011, 08:45:55 »
The other thing i did was make a super-peasant that can cap an entire tree in one sitting, which helped somewhat.

Do you know if there's a way to design a unit that can simply destroy trees (at a faster pace than harvesting them and without returning any wood)?
maybe make the "tree" a new type of harvestable resource, and make a special unit able to harvest it. But make it so that no building stores it and nothing needs it.

Or maybe give an artillery unit a harvest wood capability with long range and an animation that looks like attacking. But give it no load ability.

Just brain storming

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: pathfinder lag?
« Reply #11 on: 14 August 2011, 17:39:26 »
Some modders could find that desirable to make the mod different (eg, set the max carried to 1 and give it storage for that resource so that it simply harvests away without taking to any building), though none currently use such a thing.
*cough* Undead *cough*

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: pathfinder lag?
« Reply #12 on: 14 August 2011, 21:14:35 »
maybe make the "tree" a new type of harvestable resource, and make a special unit able to harvest it. But make it so that no building stores it and nothing needs it.
Can you harvest things that cannot be stored or used, though?

Or maybe give an artillery unit a harvest wood capability with long range and an animation that looks like attacking. But give it no load ability.
Since when can you specify a range on harvest skills?

Some modders could find that desirable to make the mod different (eg, set the max carried to 1 and give it storage for that resource so that it simply harvests away without taking to any building), though none currently use such a thing.
*cough* Undead *cough*
Oops, nice catch.

Going pretty overboard though just so you could have a "wait" before the first attack begins...
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

titi

  • MegaGlest Team
  • Airship
  • ********
  • Posts: 4,239
    • View Profile
    • http://www.titusgames.de
Re: excessive trees as map barriers (was: pathfinder lag)
« Reply #13 on: 16 August 2011, 15:55:48 »
The pathfinder is not perfect as it turned out that very deep and complicate searches take too much time to calculate .....
This means you have to create maps which fits to the current pathfinder settings :/.

GAE states to have a better pathfinder but I cannot tell too much about its performance with some more units. A bit older version of the GAE pathfinder is available in MG too, but it was always buggy and made multiplayer games go out of sync so better don't use it ....

Best is to simply take it as it is and design maps which fits to the pathfinder. ( and the AI will also play better in these maps )
Try Megaglest! Improved Engine / New factions / New tilesets / New maps / New scenarios

roflcopter

  • Guest
Re: excessive trees as map barriers (was: pathfinder lag)
« Reply #14 on: 17 August 2011, 03:54:00 »
The pathfinder is not perfect as it turned out that very deep and complicate searches take too much time to calculate .....
This means you have to create maps which fits to the current pathfinder settings :/.

Perhaps it needs some way to perform such searches less frequently, based on how much time the CPU observes them to be taking.

 

anything