Battlezone Universe

Battlezone Universe => Archive Vault => Public 1.3 Beta 4 Archive => Topic started by: ScarleTomato on December 25, 2008, 02:52:22 AM

Title: Deployed Buildings and uneven terrain
Post by: ScarleTomato on December 25, 2008, 02:52:22 AM
Ive found that deployed buildings when being constructed do not check for adjacent structures like regularly constructed ones do, Neither in the building preview or the actual construction. The problem is that sometimes the deploy preview goes red when the terrain is slightly uneven, which for one square buildings is easy to fix by pointing at the terrain close to the existing building. When it will let you build though if the average height of the terrain deployed on is different than the existing adjacent building height, the deployed building wont be the same height as the existing one. Leaving a small gap in the terrain.

For any TLDR guys here's a vid of what im talking about:
http://www.youtube.com/watch?v=wNRpACyv1jg

Is there a way to fix this?
Title: Re: Deployed Buildings and uneven terrain
Post by: Dataanti on December 25, 2008, 03:47:59 AM
i h8 that glitch to and i hav another 1 to do with the same thing and sean was there and i deployed my rec on a peace of terrain like that 1 and it sunk down to the bottom of bottomness of the map, i went off the edge and couldnt hit the bottom in 5 minutes.
Title: Re: Deployed Buildings and uneven terrain
Post by: Steeveeo on December 25, 2008, 03:51:23 AM
Quote from: Dataanti on December 25, 2008, 03:47:59 AM
i h8 that glitch to and i hav another 1 to do with the same thing and sean was there and i deployed my rec on a peace of terrain like that 1 and it sunk down to the bottom of bottomness of the map, i went off the edge and couldnt hit the bottom in 5 minutes.
Reading that gave me a headache...


@OP: Bane is infamous for that glitch, along with Crystal Castles.
Title: Re: Deployed Buildings and uneven terrain
Post by: Nielk1 on December 25, 2008, 04:10:06 AM
I didn't think to check for that when I made my Deploys Rec. for MRVP 2.0
Title: Re: Deployed Buildings and uneven terrain
Post by: Dataanti on December 25, 2008, 04:38:26 AM
You better think of it cause it drives me MAD!!! :x :x :x
Title: Re: Deployed Buildings and uneven terrain
Post by: Avatar on December 25, 2008, 12:29:14 PM
When deploying a Recy OR constructing a building the game takes where the reticule is and calculates the highest and lowest terrain height for the building being built.  If this difference is within an acceptable range it lets you build there.  You can affect this range by pointing the reticule to 'middle ground', so that higher and lower isn't too much higher or lower than where you're pointing.

That's been the case from the beginning, and is more of a terrain height issue than something with deploying buildings, mostly occurring after a large building flattens the terrain it's built on. 

The Recyclers are especially large and can really cut into the terrain at the edges depending on where you deploy them.  In the case of the video there are TWO Recyclers deployed near the bumpy ground by the cliffs on Chill, and you can see that the edge of one has cut into the bumpy terrain.

Think of it this way:

Stock gameplay has only the one freely deploying building, the Recycler.  All constructed buildings have to lock in at the terrain height set by deploying the Recy.  Think of the Recy as the anchor for the rest of the base IF you're building adjacent structures.  (Scions don't have to, but ISDF does)

If you deploy the Recy somewhere near the edge of the buildable area it'll cut into the terrain.  If it flattens the terrain right up to the edge, but leaves the next area a little bumpy, that area becomes sortof buildable by carefully selecting where the reticule points, as shown in the video.

There are worse situations, such as Scavs having to deploy on a pool which is supposed to be at terrain height.  There are maps where deploying the Recy in the wrong spot near a pool can lead to a ring of squares you can't build on.  (A swampy, hilly, waaay too dark FE map has this bigtime)  Some of the map making tutorials I've seen stress placing the pool first, THEN flattening the area around it wherever you want the base buildings to be.

Bumpy terrain can 'straddle the line' and make building or deploying a little tricky.  I look on this as part of being a good base builder...  you have to know the map and the limits of where you can build.

For instance, there are some maps where you can build a GT very close to the top of a ramp and actually raise the terrain at the edge, making a small wall the AI has trouble getting over.  This is the perfect setup, letting the GT pound on the enemy while it's trying to figure out how to get over the bump...

-Av-
Title: Re: Deployed Buildings and uneven terrain
Post by: TheJamsh on December 25, 2008, 05:49:32 PM
really, its map makers not finishing maps off very well... if a terrain square comes up as buildable, it should be made level and flat. that way, the issue is solved
Title: Re: Deployed Buildings and uneven terrain
Post by: bigbadbogie on December 25, 2008, 08:52:42 PM
I think that buildings should only ever be allowed to be built on perfectly flat terrain. That should fix this problem forever.
Title: Re: Deployed Buildings and uneven terrain
Post by: TheJamsh on December 25, 2008, 09:53:03 PM
agreed
Title: Re: Deployed Buildings and uneven terrain
Post by: ScarleTomato on December 26, 2008, 03:45:45 AM
I was just wondering if there was a way to make the deploy vehicles use the constructors code that checks for adjacency. Or might this be a future beta fix?
Title: Re: Deployed Buildings and uneven terrain
Post by: Dataanti on December 27, 2008, 02:48:48 AM
there are units in FS that do that lake the powers, GT's, ect.
Title: Re: Deployed Buildings and uneven terrain
Post by: TheJamsh on December 27, 2008, 05:45:30 PM
what do you mean adjacency?

wether buildings have to be constructed Adjacent to another is defined by the buildings ODF file, (BuildRequire = "A", "F", "N", "B" [Adjacent, Flat, None, Base]

Or are you talking about flat ground? The Buildings and constructors probably use the same code to check what squares to build on. I assume GSH/KEN programmed in some kind of tolerance as to how level it had to be). This is a good thing really.

If you want buildings to build dead flat, the map should be changed so the terrain is equal, not the code. Im sure that would have nasty knock-on effects.
Title: Re: Deployed Buildings and uneven terrain
Post by: Avatar on December 27, 2008, 06:45:22 PM
The point of it is that stock gameplay has only the one deployable building, so this would never happen... it's only Mods that can suffer from it,  if they have more than one deployable building.

A proper fix would be to have deployable buildings do the same thing as the Constructor, and align the terrain__h of the deployer with any adjacent terrain__h it finds.

-Av-
Title: Re: Deployed Buildings and uneven terrain
Post by: GSH on December 27, 2008, 07:46:23 PM
Avatar - where that breaks down is when the 'adjacent' items aren't at the same height to begin with. Imagine deploying spires (for example -- an item that's buildable anywhere, and is effectively 1x1) into what makes a 'L' shape, from the pointy ends first. The two ends could be slightly different heights, and the bars of the L would inherit those heights. But, when the joining piece is connected, then it's got two, competing heights to try and match.

Basically, yes, you can call this a worst-case scenario, and you'd be right. But, with a lot of players out there, eventually, there'll be someone who'll do just that. I do agree that the best fix is at the map level. Plenty of people know how to submit tweaked maps to me, hint hint. :)

-- GSH

Title: Re: Deployed Buildings and uneven terrain
Post by: OvermindDL1 on December 29, 2008, 03:20:10 AM
I do still prefer the BZ1 building style, far less issues to deal with...  although not as pretty without the base plates...
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) that OvermindDL1 did manually since Greasemonkey does not work in Firefox 3.1 yet...

Title: Re: Deployed Buildings and uneven terrain
Post by: ScarleTomato on December 29, 2008, 03:51:38 PM
oh yeah! ill just do all my deploy buildings without terrain. thx for the reminder
Title: Re: Deployed Buildings and uneven terrain
Post by: Commando on December 29, 2008, 03:59:31 PM
QuoteI do still prefer the BZ1 building style, far less issues to deal with...  although not as pretty without the base plates...

I agree.  I miss the build anywhere and not having to be centered in a square system that bz1 used. 
Title: Re: Deployed Buildings and uneven terrain
Post by: Avatar on December 29, 2008, 09:20:03 PM
Quote from: GSH on December 27, 2008, 07:46:23 PM
Avatar - where that breaks down is when the 'adjacent' items aren't at the same height to begin with.

That happens now and it makes the square unbuildable...  which is how it should be.

I'm not sure what checks a deploying building (recycler) does when deploying but it looks like maybe all it does is use the terrain height.  Would be nice if it looked for COPLANAR* terrain__h objects along the deploy square and used their height to deploy to. 


Quote from: Commando on December 29, 2008, 03:59:31 PM
I agree.  I miss the build anywhere and not having to be centered in a square system that bz1 used. 

You can almost do the same thing in BZ2, but the terrain square size still puts things in odd places.  I'd love to have build anywhere as an option but who knows how that would affect pathing, collisions, that sort of thing.  I think everyone forgets just how frustrating BZ1 AI pathing was...   and would hate to see anything that made the still touchy BZ2 AI path any worse than they do now.  :)

-Av-

*and they said I'd NEVER use that word after High School...   :lol:
Title: Re: Deployed Buildings and uneven terrain
Post by: TheJamsh on December 30, 2008, 01:42:58 PM
that would affect ODF tunnels and everything i think. Build anywhere would be nice for walls and things though, but all really good strat games use terrain squares anyway...

i never played BZ1, but BZ2 pathing frustrates me sometimes, so i hate to think what it was like. if ODF tunnels are set up properly though they can make it much better
Title: Re: Deployed Buildings and uneven terrain
Post by: Commando on December 30, 2008, 01:47:10 PM
BZ1 was also affected by the hill humping bug, where ai units would get stuck on a steep hill then would try to climb said hill until something interfered with them.  Other than that, I think BZ1 units got caught on builings a lot less frequently than BZ2 units.  It has been a very long time since I have played BZ1 so I'm only going off of what I can remember.
Title: Re: Deployed Buildings and uneven terrain
Post by: Avatar on January 04, 2009, 05:33:20 PM
Lol...  that's a "Scav Trap".  They'd notice some scrap at the top of a hill, try to climb up to it only to find the hill too steep to get up.  They'd then start back down and lose their memory.  After that they'd notice the scrap and start up the hill again...  Bumping them out of the way didn't break the cycle, they'd keep going for that scrap as long as they lived.  Made killing them sortof satisfying...

As to buildings yes, BZ1 units had all kinds of troubles with buildings, which is why BZ1 buildings were 'soft'.  After a few minutes of shoving a vehicle would push right through them.  This was listed in one review as a major issue for the reviewer, spoiling the 'reality' of the scene.  It was necessary, though, to stop units becoming stuck on buildings.

It was explained as they had too few processor cycles to do decent pathing...  remember THOSE days??? :)

-Av-
Title: Re: Deployed Buildings and uneven terrain
Post by: Commando on January 04, 2009, 05:39:27 PM
In bz2, combat units do the same thing so I doubt scrap pieces are 100% to blame.  In bz2 anyways, its as if the ai can't see a steep hill as unclimbable.
Title: Re: Deployed Buildings and uneven terrain
Post by: Red Devil on January 04, 2009, 07:36:49 PM
An entry was added in PB4_4a to stop combat units from doing that:


[CraftClass]
OffensiveProcessIsDistractable = false
OffensiveProcessIsDistractableAITeam = true

   This can be used to undo the mantis #892 fix above. In short, if
the appropriate (i.e. human or AI team) flag is false, then AI units
will 'stay on target' -- focus on their target until it (or they) are
dead. If the flag is true, then if they get hit by enemy fire on the
way to their target, they'll break and return fire on their attackers.
(And, like before, they may not get back to their original target if
they kill those interruptors).  [NM]