Previous Blog Next Blog
Prev/Next Blog
by date

Treeses ;) and Terrain

Treeses ;) and Terrain
Name:Nate "Nateholio" Watson
Date Posted:Dec 08, 2006
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Nate "Nateholio" Watson

Blog post
Just another screenshot of terrain with trees this time.

I spent about a week reorganizing the code into functional blocks, so progress has been a little slow.



As you can see, LOD hasn't been implemented yet so the engine stops drawing trees not too far in the distance, about 750ft.

The next important things I'll be working on are LOD and terrain/plant/scrounge placement so things don't end up on top of each other sometimes.

The following link is just to show how things are loaded into the engine, and how easy it can be to manage objects using names rather than object numbers.

ixeelectronics.com/K96/Code120706.html

When a request to load a resource such as a texture or mesh(object) is received by the various managers, they check to see if that particular file has already been loaded. If it has its just assigned a new number and cloned (in the case of objects). Otherwise its loaded from disk. After that its assigned the name specified by the "load" command. No two resources can have the same name, as this is the way resources are normally referenced by other processes. Resources also are grouped into classes for tasks such as collision checking, placement checking, etc. For example, "Foliage" would be a class, "Tree" a subclass, and "Scrub Pine C" the name of a particular object.

The reason for classes and subclasses is to allow easy parameter checking. The second block of code illustrates this. The line "Name$ = NearestMeshClass("Terrain", X#, Y#, Z#, "", "", "")" returns the name of the nearest mesh to the given x, y, z coordinates. A class can also be specified, which is "Terrain" in this case, so it will return the name of the nearest terrain feature. Also notice the three empty strings at the end of the line. They are used to exclude up to three different named objects from the check for other functions such as object placement calculations.

Recent Blog Posts
List:01/11/07 - Engine Progress - Zilch
01/05/07 - More Attempts at Texturing
12/29/06 - Buildings to Populate Demo Map
12/22/06 - Not game related, but a good post for the holidays
12/22/06 - Finally finished with "base" terrain...for now
12/14/06 - Posting to Keep in the Habit
12/08/06 - Treeses ;) and Terrain
12/02/06 - Slow Progress on K96

Submit ResourceSubmit your own resources!

Radoslaw Marcin Kurczewski   (Dec 08, 2006 at 17:19 GMT)
Looks great. How are you going to influence location of various vegetation types (to avoid water lilies on snow or trees in river for example) ?

Eric Forhan   (Dec 08, 2006 at 17:44 GMT)
It's too bad Ben ( I think it was Ben) hasn't had a chance to finish his forest pack.

Those trees look very nice too, btw.

Nate "Nateholio" Watson   (Dec 08, 2006 at 17:48 GMT)
I'm planning a couple different checks for object placement in general, not just vegetation.

But for vegetation, each species will have a database entry that specifies all kinds of parameters about it. Things such as temperature, soil type/content, average light, ground water, precipitation, terrain slope, elevation, plant density limits, and on and on. Keep in mind that in my engine, water is also treated as a terrain item, so checks against terrain will also work for areas covered by water.

Oh, ad I forgot one important thing in my rush to post.

The trees were made by Matt Jones, and I'm modifying them to meet my requirements.

Matt's Trees

Chris \"C2\" Byars   (Dec 08, 2006 at 20:44 GMT)
I want Ben's forest pack to be done :( I love the old demo of it that was out.

Good job on your work, btw.

You must be a member and be logged in to either append comments or rate this resource.