Jump to content

Why are there no bridges?


Recommended Posts

There were a nuber of discussion is the subject e.g. the one below, but it seems to be quite complex to implement. My sugestion is to create bridges as a structure like a wall (with very low height) and the properties of a field (you walk on it and can cross it).

Bridges need these properties: 

  • they need to be buidable - animations will be needed (builders cannot step left and right to the bridge unlike building a wall).

Question: where should we allow building bridges: on map-defined points only (as in settlers IV) or everywhere? (I'd rather opt for predefined points as a start - simply to avoid that one clutters the entire naval map with criss-cross bridges that block ships.

  • they need to block pathfinding for ships while they exist, and not anymore if completely destroyed
  • they need to enable pathfinding for land objects while they exist - and not anymore if they are damaged to more than a percentage to be defined (or completely destroyed?)
  • they need to be destroyable (ships only or also land-based siege engines? If ships only, which ones?)
  • they need to be repairable by land forces - animations will be needed

I anyone could come up with a test implementation as a mod on one test map, this would be phantastic! Unfortunatly, I am more or less illiterate in programming...

Edited by Grautvornix
  • Like 1
Link to comment
Share on other sites

11 hours ago, Grautvornix said:

My sugestion is to create bridges as a structure like a wall (with very low height) and the properties of a field (you walk on it and can cross it).

The prospect of bridges is great, but the prospect of walls you can walk on is awesome.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I think we can look into the game Stronghold for some guidance or maybe ask them how they did it.

Link to comment
Share on other sites

@OutisWalking on top of walls along their extent while being a bit protected could indeed be an interesting side-effect.

Which brings me to a (most likely stupid) question: A soldier positioned on a wall has some protection against enemy fire. I the same soldier is behin that wall, does he have the same level of pretection, more protection, or less protection? 

From my simple mind I would guess being behind a wall shoudl provide more protection.

Most likely implemented as expected. Can anyone confirm, please?

 

Link to comment
Share on other sites

54 minutes ago, Grautvornix said:

A soldier positioned on a wall has some protection against enemy fire. I the same soldier is behin that wall, does he have the same level of pretection, more protection, or less protection?
[...]
Most likely implemented as expected.

:rofl:  The last sentence is very funny!

It's implemented as what's the easiest to do currently. When the unit is on a wall, he has a state of being "turreted", this is what boost his defenses. When not, it doesn't have any bonuses, regardless of if he is behind a wall or whatever. The projectiles make their lives without ever acknowledging walls.

For sure would be nice to have this enhanced.

On 23/03/2026 at 9:13 PM, Grautvornix said:

My sugestion is to create bridges as a structure like a wall (with very low height) and the properties of a field (you walk on it and can cross it).

You are right that bridges might have similarities with potential bridges (entities, not terrain as currently is) about how we could build them. But there aren't anything supporting walking across them currently. Units don't walk on fields, they just don't get any obstruction from them, so they actually walk on the ground. :(
So yes, not really a simple task to get this into the game.

  • Thanks 1
Link to comment
Share on other sites

Thanks, I knew it! And sorry for the change in topic.....

There was a lot of discussion in the past if walls protect at all except against direct access, i.e. they block movement but nothing else.As a consequence, you should ideally build your walls around your buidings/troops at a distance that exceeds enemy firing range (might cost a lot of stone).

Would it be possible to provide walls with an aura that reduces firing range by some margin? (from any side, except if positioned on that wall)

  • Like 2
Link to comment
Share on other sites

  • 3 months later...
12 minutes ago, Nicolaus_von_Kues said:

Stronghold , Praetorians anda AoE IV

They have good concepts of how to make walkable bridges and walls.

Multi-layer / Multi-level Pathfinding.

Pathfinding: Grid-based (CCmpPathfinder) with passability classes tied to terrain. Bridges must support land units on top while blocking naval units below.

Dynamic changes: Construction, destruction, or damage must update passability in real time.

 

Performance: Avoid full global recomputation on every change.

It would be a huge problem to be constantly destroying and building bridges.

 

Other ideas with bridges and walls.

Portals / Vertical Links: Define connection points (ramps, stairs, ladder zones) between layers.

When a bridge is built:

Mark upper tiles as walkable for land units.

Keep lower area impassable for ships.

Destruction: Remove the upper layer passability and force path invalidation/recalculation.

This is similar to how Stronghold, Age of Empires IV, or modern Total War titles handle elevated walkable structures.

 

ii- Dynamic Navmesh + Grid Hybrid

Use a grid for fast coarse terrain movement.

Use a recast/detour-style navmesh (or equivalent) for precise dynamic obstacles and walkable surfaces.

On bridge build/destroy:

Locally re-bake or update the affected navmesh region.

Add/remove off-mesh links for vertical movement.

Advantages: Handles complex shapes well; good support for dynamic environments.

Many modern engines and assets (e.g., Unity's A* Pathfinding Project or Recast) support this.

Another interesting alternative is:

Passability masks / cost maps + obstruction system.

It sounds complex...

Link to comment
Share on other sites

@Nicolaus_von_Kues If the pathfinding issue could only be solved - which appears to be quite complex - then we can define these features: 

  • bridges, that block ships, allow passage of any civilians or troops, can be built up to a limited length, but also destroyed, e.g. by ships (also by whales?)
  • ramps (iirc there might exist historical evidences of this being used in siege tech) - can be built up to a limited height and destroyed
  • tunnels/portals/secret passageways (you discover an entrance and when entering it, reappear at another place on the map, must work in both directions, could start somewhere in a mountaineous area but never ends in or under a building). This needs to be defined when creating a map. Alternatively short passageways could be built by the player himself with a limited radius from his CC or fortress.transfer capacity shouold be limited though (cannot send a whole army through). 
  • roads that have an accelerating aura for everyone, inlcuding enemies - pathfinding being particularly complex here as roads can be entered and left anywhere, as opposed to the other structures that have an entry point and an exit point.

Still brainstorming...

 

  • Thanks 1
Link to comment
Share on other sites

14 minutes ago, Grautvornix said:

tunnels/portals/secret passageways (you discover an entrance and when entering it, reappear at another place on the map, must work in both directions, could start somewhere in a mountaineous area but never ends in or under a building). This needs to be defined when creating a map. Alternatively short passageways could be built by the player himself with a limited radius from his CC or fortress.transfer capacity shouold be limited though (cannot send a whole army through). 

This is very common in RTS.

Link to comment
Share on other sites

10 hours ago, Nicolaus_von_Kues said:

This is very common in RTS.

Is it? I can remember proper tunnels one could make only in Earth 2150, and an underground level in Heroes of Might and Magic… but then barely anything else, the Zerg tunnels in StarCraft, which I don’t think 0 A.D. should aim for (to avoid a teleporting effect).

Link to comment
Share on other sites

1 hour ago, Thalatta said:

Is it? I can remember proper tunnels one could make only in Earth 2150, and an underground level in Heroes of Might and Magic… but then barely anything else, the Zerg tunnels in StarCraft, which I don’t think 0 A.D. should aim for (to avoid a teleporting effect).

In theory, tunnels are a point A and a point B.They don't always appear as such, but they are more common in sci-fi or magic RTS games.

Link to comment
Share on other sites

  • 2 months later...

Oh no!

Here I am again with another crazy concept how we could implement bridges  (sorry I don't give up :P)

  1. Bridges could actually be walls with the turrets being the bridges pillars (appropriate art still to be designed. Like building that surface during the build process, the bridge could survface from the water until it reaches a certain  height above seal level.
  2. They can onyl be built in shallow and possibly medium shallow water.
  3. Building is done using fisherboats (animation needs to be invented).
  4. Bridges cannot be undercrossed by ships.
  5. Briges can be destroyed by siege engines and by war ships
  6. Now the most difficult and special thing: Bridges can be crossed by individual units one at a time if we garrison them onto the bridgehead, then they would automatically move "sideways" along the wall  from position to postion (if I remember correctly, walls have garrison positions), from segment to segment, until they reach the other side where they are automatically ungarissoned.
  7. there could be simple wooden bridges (cheap) only for infantry and civilians, and more expensive/wider wooden bridges also for cavalry, and heavy expensive stone bridges (you would afford only in special conditions) able to transport also siege engines and elephants.

I would like to do some testing using standard walls and sideways "movement". It will look clumsy initially but we might eventually find a way to generate the right animations. 

 

Gameplay-wise, bridges can serve as bridges, but also as barriers to protect a river mound or the space between islands. Their high cost may prevent unconditional use though.

 

Again, I'd be curious to know your thoughts on this!

Edited by Grautvornix
typos...
Link to comment
Share on other sites

1 hour ago, Grautvornix said:

Oh no!

Here I am again with another crazy concept how we could implement bridges  (sorry I don't give up :P)

  1. Bridges could actually be walls with the turrets being the bridges pillars (appropriate art still to be designed. Like building that surface during the build process, the bridge could survface from the water until it reaches a certain  height above seal level.
  2. They can onyl be built in shallow and possibly medium shallow water.
  3. Building is done using fisherboats (animation needs to be invented).
  4. Bridges cannot be undercrossed by ships.
  5. Briges can be destroyed by siege engines and by war ships
  6. Now the most difficult and special thing: Bridges can be crossed by individual units one at a time if we garrison them onto the bridgehead, then they would automatically move "sideways" along the wall  from position to postion (if I remember correctly, walls have garrison positions), from segment to segment, until they reach the other side where they are automatically ungarissoned.
  7. there could be simple wooden bridges (cheap) only for infantry and civilians, and more expensive/wider wooden bridges also for cavalry, and heavy expensive stone bridges (you would afford only in special conditions) able to transport also siege engines and elephants.

I would like to do some testing using standard walls and sideways "movement". It will look clumsy initially but we might eventually find a way to generate the right animations. 

 

Gameplay-wise, bridges can serve as bridges, but also as barriers to protect a river mount or the space between islands. theri high cost may prevent unconditional use though.

 

Again, I'd be curious to know your thoughts on this!

Good idea! With gates, units can go under, or turret on top. So, something similar could probably work for this

  • Like 1
Link to comment
Share on other sites

10 minutes ago, Grautvornix said:

@Asher darn! You are right! Walls can have gates, so why not have a gate under water for a ship to undercross the bridge? The animation could be challenging though...

But maybe we could start something, we would just have to figure out how to allow building certain structures underwater. Also, is there any structure that units can walk on top of? I can't think of any

Link to comment
Share on other sites

1 hour ago, Grautvornix said:

crossed by individual units one at a time if we garrison them onto the bridgehead, then they would automatically move "sideways" along the wall  from position to postion

This would look goofy as hell :P. I think (hopefully) the engine can be modified to deal with these things properly, considering there's the Immortal air-walking exploit around right now, units walking on top of buildings shouldn't be impossible to implement, unless I'm missing something.

In any case, and as I've mentioned before: prohibiting the positioning of pillars in deep water should be enough constraint (this allows a very short bridge over deep water).

Going a bit chronologically, rafts pulled by a rope would have come quite early (a much later version of this was apparently used by Hannibal to ferry his elephants across the Rhône). Wooden walkways in shallow water were made from at least the Neolithic. In the Bronze Age, stone bridges would be made to deal with uneven terrain (Arkadiko Bridge). Workers should be able to build all these things. To build pillars (from wood, later stone) on medium water, fishing boats would be too small and unrelated for the task, if anything I'd prefer the use of merchantmen, which were (obviously) cargo oriented, and were historically used for a variety of things (even warfare when needed). They could also be used for earlier Pontoon bridges. If a bridge was meant to be permanent, there were ways to allow navigation: either movable (pontoon) parts, or maybe simple enough for the game, enough clearance, since masts were removable and most ships were at most around 3 m above water, not counting later huge cargo ships, but soon enough the Romans would have mastered great arches.

Edited by Thalatta
Of course, the pathfinding issue would still be present, whatever the case.
Link to comment
Share on other sites

2 hours ago, Grautvornix said:

Oh no!

Here I am again with another crazy concept how we could implement bridges  (sorry I don't give up :P)

  1. Bridges could actually be walls with the turrets being the bridges pillars (appropriate art still to be designed. Like building that surface during the build process, the bridge could survface from the water until it reaches a certain  height above seal level.
  2. They can onyl be built in shallow and possibly medium shallow water.
  3. Building is done using fisherboats (animation needs to be invented).
  4. Bridges cannot be undercrossed by ships.
  5. Briges can be destroyed by siege engines and by war ships
  6. Now the most difficult and special thing: Bridges can be crossed by individual units one at a time if we garrison them onto the bridgehead, then they would automatically move "sideways" along the wall  from position to postion (if I remember correctly, walls have garrison positions), from segment to segment, until they reach the other side where they are automatically ungarissoned.
  7. there could be simple wooden bridges (cheap) only for infantry and civilians, and more expensive/wider wooden bridges also for cavalry, and heavy expensive stone bridges (you would afford only in special conditions) able to transport also siege engines and elephants.

I would like to do some testing using standard walls and sideways "movement". It will look clumsy initially but we might eventually find a way to generate the right animations. 

 

Gameplay-wise, bridges can serve as bridges, but also as barriers to protect a river mound or the space between islands. Their high cost may prevent unconditional use though.

 

Again, I'd be curious to know your thoughts on this!

Possible, that'd be something to have an AI look into if you want this implemented. Also note that for a bridge, pathfinding isn't really needed, so just to have the units "walk" across the bridge should be easy.

55 minutes ago, Grautvornix said:

The animation could be challenging though...

Not really.

44 minutes ago, Asher said:

But maybe we could start something, we would just have to figure out how to allow building certain structures underwater.

That's a bit difficult, I've done it before tho:
A: make the "bridge" a unit
B: give it Build Restrictions like a regular building
C: give it a unique "amphibious" passability class in passability.js
D: work out any small details like cost and foundation and stuff.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...