Max tunnels?

Moderators: GSH, VSMIT, Red Devil, Commando

Post Reply
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Max tunnels?

Post by bigbadbogie »

Is there a maximum number of tunnels that a single building can have?
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Red Spot
Attila
Posts: 1629
Joined: Mon Feb 21, 2011 6:14 pm
Location: The Netherlands

Re: Max tunnels?

Post by Red Spot »

As in how many does the game allow, or as in does the AI use them?

In case of the AI, it may be inclined to use the boundries, but it will never be forced to use them.
I once used an 'invisible tunnel' to create borders around lava to 'stimulate' the AI in not going over/through the water, which works, but in a dogfight/cramped space/... the AI feels very comfortable to go straigh over what is set as a tunnel and for some reason isnt to forced going back over it again without anything stimulating it to get back on land.

How many the game will take in a single building should be easy to test.
User avatar
General BlackDragon
Flying Mauler
Posts: 2408
Joined: Sat Feb 19, 2011 6:37 am
Contact:

Re: Max tunnels?

Post by General BlackDragon »

Not sure, Most I've done is like 14. Could be 16, or more. Just keep going, use Shift +F9 to see if they work, or if the game crashes, you know you hit the limit.
Battlezone Classic Public Forums
*****General BlackDragon*****
User avatar
GSH
Patch Creator
Posts: 2486
Joined: Fri Feb 18, 2011 4:55 pm
Location: USA
Contact:

Re: Max tunnels?

Post by GSH »

Tunnels are a gross hack for BZ2 that works only kinda-sorta well with AI. And it's probably going to remain that way.

The history of BZ2 is that it has AI and gameplay source code mostly descended from Mechwarrior 2, Interstate '76, and Battlezone 1, with some non-gameplay source code from Dark Reign 2 and Heavy Gear 2 (less sure on the last one). For MW2, I76 & BZ1, there were no tunnels. Those three games are 2D terrain patches with heightfields for elevation baked on top. All the AI for MW2, I76, BZ1 & BZ2 is 2D. Interstate '76 was cars driving over terrain, where all vehicles were -- by gravity -- very close to the ground, or falling right back down to it. BZ1/2 add hovercraft to reduce the cost of terrain heightfield lookups, but they were still meant to be close to the ground. The BZ2 shift-F9 view of pathing and paths is 2D and what the AI uses. Look at a BZ2 ascii save - AiPath data structures store only an X & Z component -- 2D -- the height (Y axis) is implied by the terrain heightfield. By history from the MW2, I76 & BZ1 engines, AI just follows a 2D path. Tunnels utterly break that -- there are connections other than just the 2D heightfield.

Note: it's not "realism" that keeps craft close to the ground in BZ2. The game is simply not built for infinite flight. By default, things don't shoot up because there wasn't supposed to be anything there except for bomber/APCs in transit. The AI is not 3D. That is why infinite flight is a game-breaking bug that causes systems to break. Making the BZ2 AI use tunnels, 3D, etc would require a major re-architecting that I don't see as worthwhile.

-- GSH
User avatar
Zero Angel
Attila
Posts: 1536
Joined: Mon Feb 21, 2011 12:54 am
Contact:

Re: Max tunnels?

Post by Zero Angel »

I've made a 16 tunnel building once. The building was a multi-level building which AI infantry was meant to be able to go inside to attack the player. It worked well for the most part. The setup of the tunnel would allow the AI to go upstairs sometimes just enough for the AI to not be really exploitable. It works somewhat for multilevels so long as you never let linking tunnel edges overlap with other linking tunnel edges and if you use simple ramps instead of spiral stairs or other complex mechanisms (remember the AI cannot tell if you are on floor 1 or floor 2 when pathing, so you must keep that in mind when designing multi-level tunnels)
Regulators
Regulate any stealin' of this biometal pool, we're damn good, too
But you can't be any geek off the street
Gotta be handy with the chains if you know what I mean
Earn your keep
User avatar
bigbadbogie
Bull Dog
Posts: 586
Joined: Mon Feb 21, 2011 8:12 am
Location: Ecuadorian Embassy

Re: Max tunnels?

Post by bigbadbogie »

Cool. Thanks. I probably wont get over 16.

Hey. I just had a thought. Would it be possible to add a new feature in 1.3 to see tunnels in regular editor mode, and even add pathpoints?

Shift-F9 is still extremely annoying as it tends to obscure objects on dense maps and you can't see pathpoints behind objects.
"You think that you can wipe out an entire civilisation without consequences?" - Rachel

http://www.moddb.com/mods/qf2-essence-to-a-thief
https://www.indiedb.com/games/husky-ashcon-i/
User avatar
Red Devil
Recycler
Posts: 4398
Joined: Fri Feb 18, 2011 5:10 pm
Location: High in the Rocky Mountains

Re: Max tunnels?

Post by Red Devil »

agreed about path points behind objects
If given the truth, the people can be depended upon to meet any national crisis. The great point is to bring them the real facts - and beer.
Abraham Lincoln

Battlestrat, FE, G66, In The Shadows, Starfleet, Uler, & ZTV

Lifetime member of JBS and NRA
Post Reply