Page 2 of 2
Re: Structures with terrain-like properties?
Posted: 15 Apr 2008, 20:49
by Argh
What about that script by trepan where all the particles are calculated by the GPU. Using a similar approach you could lighten the load on the CPU or maybe even split it to maximize efficiency.
Unfortunately, that's not possible- the GPU isn't just another CPU sitting around, waiting to be used as a calculator- it only accepts certain kinds of information, and outputs that information on the screen. Doing the calculations required to make this work is strictly CPU-side stuff.
And when I say it's "slow", that's a relative term. "Slow" means that if it's running along with the thousands of other things that need to be calculated per-frame, every frame, it'd be a significant load.
You can do anything you want, if you're willing for it to take forever. However, in video game programming, we want things to take as little time as possible, because otherwise performance suffers- you don't have forever, you have 1/32nd of a second.
In programming stuff with Lua, you want to slow stuff down as much as possible, because a lot of the more expensive, brute-force searches require dipping into array values, or worse yet, arrays that are within arrays, which gets pretty expensive, even if you've already given the arrays to the program as a local variable (to shorten seek times). And a lot of the stuff that involves large-scale manipulation of the game world has to involve these kinds of searches.
There aren't any nice ways out of that. All we can do is to make it as efficient as possible.
Re: Structures with terrain-like properties?
Posted: 15 Apr 2008, 21:27
by Felix the Cat
[Krogoth86] wrote:Felix the Cat wrote:5) If a unit is in a "bridge loading area" and it has a move order to the corresponding "bridge unloading area", MoveCtrl it across the bridge. Give it a move order to its original destination.
So you can override the static precalculated things of the pathfinder? Until it's not amphibic it should refuse to actually move along your bridge or is this kinda "turning the unit off" and moving a dummie across the bridge and respawn it at the bridges end?
The short answer: yes.
The long answer: you can do whatever you want with MoveCtrl. It's not overriding the pathfinder, it's manually taking control of a unit and moving it places regardless of pathfinding and movement restrictions. Hmm... I guess that actually is overriding the pathfinder.
Re: Structures with terrain-like properties?
Posted: 17 Apr 2008, 07:13
by Alchemist
Well anyways, what if I just want units to be able to walk onto something such as a platform without having to terraform the ground beneath it?
Re: Structures with terrain-like properties?
Posted: 17 Apr 2008, 10:11
by AF
Thats possible but it would require a lot of lua code that hasnt been written yet, and it wouldnt be the best solution, which would be an engine refactor to allow multiple quadfields iirc =)
Re: Structures with terrain-like properties?
Posted: 17 Apr 2008, 16:16
by KDR_11k
Alchemist wrote:Well anyways, what if I just want units to be able to walk onto something such as a platform without having to terraform the ground beneath it?
Not supported. You can try luaing a workaround but it won't be easy.
Re: Structures with terrain-like properties?
Posted: 17 Apr 2008, 18:01
by SinbadEV
an RTS on the surface of 3D mesh would be like 10 kinds of awesome BTW...