Structures with terrain-like properties? - Page 2

Structures with terrain-like properties?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Structures with terrain-like properties?

Post 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.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Re: Structures with terrain-like properties?

Post 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.
User avatar
Alchemist
Posts: 81
Joined: 21 Oct 2005, 23:46

Re: Structures with terrain-like properties?

Post 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?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Structures with terrain-like properties?

Post 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 =)
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Structures with terrain-like properties?

Post 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.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Structures with terrain-like properties?

Post by SinbadEV »

an RTS on the surface of 3D mesh would be like 10 kinds of awesome BTW...
Post Reply

Return to “Game Development”