Trees.

Trees.

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

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

Trees.

Post by Argh »

I've looked at Spring's sourcecode, and I do not think that Spring's trees are hardcoded, and if they are, making them not hardcoded would be very easy. More once I've done some experiments.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Argh, AF and I told you they are... we have the code for them in the coding forum at FGJL.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

I have looked at the code, and I think that you can return fake values to it. If not, it is a very small change to the current map-handling code to allow it to get and return a Feature.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

correct, I believe that is the case.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

all you ahve todo is create a tree feature called "tree*1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16*", I'm not sure fi the engine then replaces the feature with the procedural version but I'm thinking its probably the other way round.

But indeed they are procedural. Spring create a tall cone cyclinder, applies a bark texture from the bitmaps folder then adds the trunks, how it does this depends on which trees. for tree1-tree8 it starts at the top and moves down at small but random intervals rotating around the trunk adds quads with the branch texture in bitmaps. For tree9-16, it does the same but instead fo drawing a texture it instead creates on from scratch by drawing a brwn line with a black outline down the middle, adds random green shapes around virtual branches shooting off at 45* angles in a dark green colour. tree9-16 is used in supreme battlefield.

Mapconv places these trees randomly, but they're not special trees, features in their own right, mapconv just places the features tree+random number between 1 and 16 on the map according to the algorithm specified. The same is true of geothermals.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

It replaces whatever feature is called with procedural trees, not the other way around. I *think* that's a one-line code fix... still looking into this, but I have other things I need to get done tonight.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Or you could just tell mapconv to not places trees and then place them yourself using a different featurename....
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Yes, that's also an option. However, wouldn't it be cooler if we simply had a very large variety of random, good-looking foliage that was placed on the map every time you started a game?

I think I'm going to need to look at MapConv's source and study what it's doing to set the DRAWING_TYPE=TREE for trees, which is the sticking point.
Post Reply

Return to “Map Creation”