Bridges and overhangs
Moderator: Moderators
Bridges and overhangs
What I'm thinking of is a form of bridges and overhangs and I know it is probably been discussed before and decided to not be possible.
But what about using multiple height maps. One height map would be the low land and ramps, another would be bridges and overhangs. When deciding which height map to read the code must then consider the current Z position (presuming Z is up in spring) of the querying object. The other height maps would not need to be rendered, instead features should be placed to trick the user into thinking that units are moving on a bridge (or what ever).
Thoughts? (not flames)
But what about using multiple height maps. One height map would be the low land and ramps, another would be bridges and overhangs. When deciding which height map to read the code must then consider the current Z position (presuming Z is up in spring) of the querying object. The other height maps would not need to be rendered, instead features should be placed to trick the user into thinking that units are moving on a bridge (or what ever).
Thoughts? (not flames)
Re: Bridges and overhangs
Would require massive rewrite, patches welcome.
Re: Bridges and overhangs
What major things can you think of that would need rewriting?Das Bruce wrote:Would require massive rewrite, patches welcome.
-
- Posts: 916
- Joined: 27 Jun 2009, 01:32
Re: Bridges and overhangs
For what you suggest? Spring's entire pathfinder...
Zwzsg and Argh are working on sort of hackish ways of doing something like that though using lots of Lua magic...
Zwzsg and Argh are working on sort of hackish ways of doing something like that though using lots of Lua magic...
Re: Bridges and overhangs
Pathing, collision, aiming, rendering, terrain deformation, LOS, LOF.
Re: Bridges and overhangs
jesus we had like 3 threads on this!?! read some of the forum before posting.Petah wrote:What major things can you think of that would need rewriting?Das Bruce wrote:Would require massive rewrite, patches welcome.
- Guessmyname
- Posts: 3301
- Joined: 28 Apr 2005, 21:07
Re: Bridges and overhangs
Can you *under* those bridges though?
Re: Bridges and overhangs
It would be awesome if we had FPS (I'm thinking quake3) style terrain...
The reason we don't have "working" bridges and overhangs is because no RTS had ever done them at the time of the making of our engine... they are still very rare in RTSes... though you can fake them with 3D models embedded in the map already... just can't let units walk on them... of you don the "space platform" option as the image suggests to fake the effect.
The reason we don't have "working" bridges and overhangs is because no RTS had ever done them at the time of the making of our engine... they are still very rare in RTSes... though you can fake them with 3D models embedded in the map already... just can't let units walk on them... of you don the "space platform" option as the image suggests to fake the effect.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Bridges and overhangs
And what if there are a hundred tiny flea-sized units under a bridge and you want to select one of them. Oh, and there are also units on and around the bridge. It would be a UI pain to have multiple layers of units (we already have this occur sometimes with air units but bridges would be worse). Obviously there are always ways to resolve it, but they would not be simple.
Re: Bridges and overhangs
You cannot go under the bridges, no. Could probably make that happen, but it'd just be a massive headache, control-wise.
Re: Bridges and overhangs
DO IT, i could live with you having headacheArgh wrote:You cannot go under the bridges, no. Could probably make that happen, but it'd just be a massive headache, control-wise.

Re: Bridges and overhangs
How about enclosed bridges that act like tunnels? Unit arrives at entrance and after a little appears at the exit.
Not fancy nor does it allow bridge combat but it should be easier to implement with less hacks, no?
Not fancy nor does it allow bridge combat but it should be easier to implement with less hacks, no?
Re: Bridges and overhangs
if it needs rewrite, then would be better making terrain & bridges damageable like on worms 3d.
Anyway pathing will be A LOT more cpu expensive cause we'll go from 2d pathing to 3d pathing
Theorically, you need to check 26 blocks to find nearest accessible one, instead of 8 with current pathing and you need also to do raycast on map mesh with ray starting at unit current height to ground, so it's a lot of work.
Another way is raycasting directly and check 8 raycasted heights around the unit.
Also planes that didn't need pathing, with that modification they will have to.
Also there's need of something to see underground
Anyway pathing will be A LOT more cpu expensive cause we'll go from 2d pathing to 3d pathing
Theorically, you need to check 26 blocks to find nearest accessible one, instead of 8 with current pathing and you need also to do raycast on map mesh with ray starting at unit current height to ground, so it's a lot of work.
Another way is raycasting directly and check 8 raycasted heights around the unit.
Also planes that didn't need pathing, with that modification they will have to.
Also there's need of something to see underground
Re: Bridges and overhangs
a bit off topic but i have been planning to make a very simple bridge ingame, using the lua-heightmap trip. I want it to be a bit like CnC bridges were, where you need an engineer to rebuild it. If would start to be built up if you had a unit (maybe a specific unit i dunno) in a box on both sides. Of course it wouldnt be proper 3d bridge only a place where you can raise the land to cross a ravine but it would be similar for gameplay.
Re: Bridges and overhangs
That is very easy, yes.How about enclosed bridges that act like tunnels? Unit arrives at entrance and after a little appears at the exit.
Not fancy nor does it allow bridge combat but it should be easier to implement with less hacks, no?
That's essentially all I'm doing, with a few minor adjustments here and there, and zxswg made a fairly good demonstration of dynamic heightmap stuff.a bit off topic but i have been planning to make a very simple bridge ingame, using the lua-heightmap trip.
The problem is, just doing it that way is, for lack of a nicer way of putting it, ugly. The stretching and distortion caused by SMF is really awful, due to the height changes.
Re: Bridges and overhangs
How? Sauce?Argh wrote:
Re: Bridges and overhangs
I will release source when it's worth seeing. ATM, it isn't, and won't be until I deal with certain issues. This was a quickie demo project, and is not currently in a state where I'd feel comfortable releasing it, even for just-looking purposes yet.
Re: Bridges and overhangs
Argh wrote:I will release source when it's worth seeing. ATM, it isn't, and won't be until I deal with certain issues. This was a quickie demo project, and is not currently in a state where I'd feel comfortable releasing it, even for just-looking purposes yet.

Re: Bridges and overhangs
maackey wrote:Argh wrote:I will release source when it's worth seeing. ATM, it isn't, and won't be until I deal with certain issues. This was a quickie demo project, and is not currently in a state where I'd feel comfortable releasing it, even for just-looking purposes yet.
