Game Development Community

dev|Pro Game Development Curriculum

Super Environment Package

by Michael Perry · 02/19/2008 (6:31 am) · 32 comments

Super Environment Package contains a collection of the most popular and useful new environment upgrades and objects. The resources have been updated to work with TGE 1.5.2, and include new replicators, Ben Garney's forest pack, terrain deformation, and more.

This package has been set up for the easiest possible integration if you are starting with a fresh build of Torque Game Engine v1.5.2. You will only need to add a few files to your engine solution, and the rest is simple drag and drop. If you are not starting with a fresh build, I highly recommend you use a manual integration program such as WinMerge.

The following resources (followed by the authors) were used in the creation of this package. Some resources had multiple authors, so if I left a name out be sure to correct me as everyone involved deserves a mention for this awesome code.

Forest Pack
by Ben Garney

Environment Package System
by Michael Perry

Grass Replicator
by Bendik Stang and Ken Finney

Updated Terrain Deformer
by Ron Nelson, Robert Brower, Stephen Zepp, Gary Preston, and others

Relative Paths for Terrain Textures
by Ed Zavada

fxShapeReplicator Update
by James Laker (BurNinG)

Animated fxShapeReplicator
by Vincent BILLET

fxShapeReplicator: Up to 16 random shapes
by Ben Sparks (Warspawn)

fxSquareFoliageReplicator
by Jon Jorajuria

Clustering in the Foliage and Shape Replicators
by Jeff Loveless

Changing the hard coded paths to script driven ones
by Gregory "Centove" McLean

Terrain Textures: Place by Latitude
by Andy Schatz


These directions are aimed at Windows users who compile in Visual Studio. If you require help with integration on a different OS, please post in the comment section.

Start by clicking HERE to download the files

ENGINE INTEGRATION
Step 1: Back up all your files, both engine and script

Step 2: Copy this resource's engine directory over your local engine directory.

Step 3: Open the Torque SDK solution (Torque SDK.sln)

Step 4: Under the Torque Demo project, right click on the Source Files filter (folder)

Step 5: Left click Add->New Filter

Step 6: Name the new filter "forest" (without the quotes)

Step 7: Right click the new forest filter

Step 8: Add->Existing Files

Step 9: Navigate to the engineforest directory

Step 10: Select all forest files and click "OK"

Step 11: Just as in steps 9-11, add the following files to the dgl filter:
  • gTextureSheet.cc[li]gTextureSheet.h
Step 12: Add the following files to the gamefx filter:
  • fxGrassReplicator.cc[li]fxGrassReplicator.h[li]fxSquareFoliageReplicator.cc[li]fxSquareFoliageReplicator.h[li]terraindeformer.cc[li]terraindeformer.h[li]twSurfaceReference.cc[li]twSurfaceReference.h
Step 13: Recompile your debug and release builds



SCRIPT INTEGRATION
This resource was built around the default example folder, mainly the starter.fps mod. If you are working with a fresh example folder, you can simply drag the example folder in this resource to your directory. Make sure you delete any .dso files before you run.

The alternative is to manually merge the files in this resource to whatever directory you are working from. Again, software like WinMerge is a good idea.

I've provided sample missions for you to view the upgrades and new environment objects. If you want more detailed descriptions and instructions, post your questions in the resource comments or visit the original resources.

Also, you will find a local copy of the directions and a kind of "coder log" in the Super Environment Resource.doc file.

This resource is a work in progress, both the code and the text found here. Please inform me of any errors or failure(code, grammar, steps, etc)

*Note - Restored links to files
Page«First 1 2 Next»
#21
05/12/2008 (8:58 am)
Thanks for the pointer! I don't need server capability (yet...), as it's just me working. I found a handy little tutorial on the net to figure out the basics and get my repository running. Right, first things first... super environment package, here I come!

EDIT: You beauty. Dropped right in, and worked fine after I got rid of the DSOs. TMK is next :)

EDIT:
"Cut the head in half using a band saw and scoop the brains out. Blast the brain out with water or air. Suck the brain out through a hole in the head."
Uploaded the wrong TGE to the repos in the first place :P. Back to the beginning... with the right verison of TGE this time...

EDIT:
It works! The problem, I found, actually wasn't in the engine at all :P. It was a script problem caused by data/init.cs being execed before initServer() and initClient() are called.
Great...
Well, at least I got a SVN repository out of this episode...
#22
08/26/2008 (9:38 am)
Download link doesn't work.
#23
08/26/2008 (12:01 pm)
Tek0 - Are you talking about the (Start by clicking HERE to download files) link?

I just clicked on it and got the .rar file.
#24
06/13/2009 (9:44 am)
404 not found.
#25
06/13/2009 (9:47 am)
Unfortunately all my resources have gone down since the site hosting the files has a dead subscription. I'm still trying to find local copies of everything.

@ALL - PLEASE! If you have a copy of this resource, can you host it for me or e-mail me the files so I can get these back online. I would be very appreciative!
#26
12/11/2009 (7:56 pm)
@Michael
Here is the file hosted on my site Ragdoll Games. It can stay there as long as my bandwidth doesn't get killed.

ragdollgames.com/enviro_resource.rar

PayPal donations are always welcome =]
www.ragdollgames.com/donation.php

-Trent
#27
12/27/2009 (2:53 pm)
Awesome! Thanks Trenton!
#28
12/28/2009 (1:14 pm)
Michael, would be awesome to have your "Environment Package System" in T3D :-P
#29
12/28/2009 (2:47 pm)
@Joz - Perhaps, but let's go down the list to see what is already taken care of in Torque 3D:

Forest Pack - Torque 3D Forest Editor

Environment Package System - Prefabs

Grass Replicator - Ground cover

Relative Paths for Terrain Textures - Stock Torque 3D feature

Animated fxShapeReplicator - Ambient shapes take care of this I believe

Clustering in the Foliage and Shape Replicators - Much better to use ground cover and Forest Editor

Changing the hard coded paths to script driven ones - Stock Torque 3D

Terrain Textures: Place By Latitude - Terraformer no longer in Torque 3D.

This leaves very little of this super resource to work with, which is actually a great testament to what Torque 3D is capable of.


#30
12/31/2009 (12:40 pm)
Tnx Michael, the "Prefabs" name put me in error, never thought about package environment settings like clouds, sky, precipitations and so on in a prefab... I think I must experiment a little more with prefabs... :-)
#31
01/05/2011 (7:23 am)
Greets All...

I've been trying to integrate this with my TGE152/AFX2 project and have run into a strange issue. In xCode, I get the following error when compiling fxFoliageReplicator.cc:

addField( name_buf,			TypeFilename,	Offset( mFieldData.mFoliageFile[ idx ],		fxFoliageReplicator ) );

error: 'idx' cannot appear in a constant-expression
#32
01/05/2011 (7:25 am)
[arrgh message cut off]

...wanted to add that I've been compiling concurrently both OSes for over a year and have not seen this before. Any ideas why VC++ will allow it to compile but xCode won't?
Page«First 1 2 Next»