Skip to content

WIP: Auto-generate navmesh for brush ladders#1833

Draft
Rainyan wants to merge 16 commits intoNeotokyoRebuild:masterfrom
Rainyan:feat/laddergen-v2
Draft

WIP: Auto-generate navmesh for brush ladders#1833
Rainyan wants to merge 16 commits intoNeotokyoRebuild:masterfrom
Rainyan:feat/laddergen-v2

Conversation

@Rainyan
Copy link
Collaborator

@Rainyan Rainyan commented Mar 13, 2026

Description

WIP, not ready for review.

Toolchain

  • Windows MSVC VS2022

Linked Issues

  • fixes #
  • related #

@Rainyan Rainyan added the Bots Related to bot players label Mar 13, 2026
@DESTROYGIRL
Copy link
Contributor

Better than what I had in mind!

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 13, 2026

Better than what I had in mind!

To my understanding the ladders are omitted from the final world brush, so there's quite a lot of plumbing to retrieve them from the BSP brush lump which roughly corresponds to the geometry that Hammer sees. Although I'd love to be wrong, since that would simplify matters a lot.

Still some jank that needs cleaning up, like not generating ladders for un-climbable normals (up/down), and some angled ladders getting funny normals. But it kinda works! Hopefully I can clean it up to something mergeable for more convenient nav generation.

@Rainyan Rainyan force-pushed the feat/laddergen-v2 branch from f2483c9 to cfbd985 Compare March 13, 2026 19:13
@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 14, 2026

So the basic case works. Here's a ntre_dawn_ctg ladder with nav_generate_debug_brushladders debug. Green line marking a good side, orange too slim a side for bots to climb ("too slim" is arbitrarily chosen, they could climb them but it's hard to get good results in terms of the actual bot movement). And pink marks a side with insufficient clearance or inside a wall. Up and down facing sides are also removed from consideration.

laddergen_debug

There's some issues still with more exotic orientations that need fixing. This ladder "works", but obviously the rotation of the generated nav node is incorrect.

orientation

Also some interesting unintended routes which I would not probably have thought of manually adding, but are totally valid. This is an alternate climb path generated from the left side of the fence ladder:

routes

@AdamTadeusz
Copy link
Contributor

I don't have a map to check, can we climb upside down ladders in source? I know of at least one source game that lets you do that https://youtu.be/bbpG3iptMLE?si=GjWWkg2AiXMrovdX&t=749

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 14, 2026

I don't have a map to check, can we climb upside down ladders in source? I know of at least one source game that lets you do that https://youtu.be/bbpG3iptMLE?si=GjWWkg2AiXMrovdX&t=749

I will need to check but I think not. Would be kind of cool, although probably looks quite silly in third person without hand animations.

Up-facing ladders players can mount of course, and it's a mechanic for the ladder boosts etc. But it seems the bot ladder navigation system doesn't like that, so at least for now I'm choosing to skip those cases entirely.

@AdamTadeusz
Copy link
Contributor

I don't have a map to check, can we climb upside down ladders in source? I know of at least one source game that lets you do that https://youtu.be/bbpG3iptMLE?si=GjWWkg2AiXMrovdX&t=749

I will need to check but I think not. Would be kind of cool, although probably looks quite silly in third person without hand animations.

Up-facing ladders players can mount of course, and it's a mechanic for the ladder boosts etc. But it seems the bot ladder navigation system doesn't like that, so at least for now I'm choosing to skip those cases entirely.

I think that's perfectly valid

@Rainyan
Copy link
Collaborator Author

Rainyan commented Mar 14, 2026

I don't have a map to check, can we climb upside down ladders in source?

I am happy to confirm this is possible, and it's parity!

laddergoat.webm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bots Related to bot players

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants