Game Development Community

Starter.fps for MS4

by Jaimi McEntire · in Torque Game Engine Advanced · 09/06/2006 (8:27 pm) · 25 replies

If anyone is interested, I've got the starter.fps from This Blog working.

In starter.fps/client/init.cs (as specified in the blog comments)

Right after this line:
loadMaterials();

Add a call to this function:
initRenderInstManager();

In starter.fps/client/scripts/shaders.cs

Modify the path on the legacy terrain shaders so they read from the right location (as follows):

new ShaderData( TerrShader )
{
DXVertexShaderFile = "shaders/legacyTerrain/terrainV.hlsl";
DXPixelShaderFile = "shaders/legacyTerrain/terrainP.hlsl";
pixVersion = 1.1;
};

new ShaderData( TerrBlender20Shader )
{
DXVertexShaderFile = "shaders/legacyTerrain/terrainBlenderPS20V.hlsl";
DXPixelShaderFile = "shaders/legacyTerrain/terrainBlenderPS20P.hlsl";
pixVersion = 2.0;
};

new ShaderData( TerrBlender11AShader )
{
DXVertexShaderFile = "shaders/legacyTerrain/terrainBlenderPS11AV.hlsl";
DXPixelShaderFile = "shaders/legacyTerrain/terrainBlenderPS11AP.hlsl";
pixVersion = 1.1;
};

new ShaderData( TerrBlender11BShader )
{
DXVertexShaderFile = "shaders/legacyTerrain/terrainBlenderPS11BV.hlsl";
DXPixelShaderFile = "shaders/legacyTerrain/terrainBlenderPS11BP.hlsl";
pixVersion = 1.1;
};


This will get it running. The Atlas terrain in the first mission is seriously messed up from certain directions (file format change, maybe?), but the main mission looks mostly OK - the glow on the orc is way too bright, and the shadow is clipped incorrectly (Sun angle is too steep, perhaps?) but it runs and works. My thanks to the initial poster of this resource!
Page«First 1 2 Next»
#21
01/22/2007 (6:39 am)
I'm sorry to cause all this trouble. Sometimes is realy dificult to find something obvious in GarageGames community.

Thanks Charles, I'll try your suggestion.

Edit: Works great Charles. Thanks again.
#22
01/31/2007 (3:54 am)
@Charles
Thank you for your help. It worked like a magic.

I got another issue in the starter.fps. When I old TGE terrain lighting got flicked when I move the player.
I tried to check all the lighting configuration, but I could not find any solution.

Can anyone help me in this regard.

Thanks a lot.
#23
01/31/2007 (7:34 am)
@Mahmud
If you are referring to the flickering in the starter.fps merged to the new MS 4.2 TSE there is a change in the materials.cs file. Merge these changes into example/starter.fps/data/materials.cs


new CustomMaterial(AtlasDynamicLightingMaterial)
{
   texture[0] = "$dynamiclight";

   shader = AtlasDynamicLightingShader;
   version = 1.1;
};
Then a few lines below is changed as well.
new CustomMaterial(TerrainMaterialDynamicLightingMask)
{
   texture[2] = "$dynamiclight";
   texture[3] = "$dynamiclightmask";
   
   shader = TerrDynamicLightingMaskShader;
   version = 1.1;
};

new CustomMaterial(TerrainMaterial)
{
   shader = TerrShader;
   version = 1.1;
   
   texture[3] = "~/data/terrains/details/detail1";
   
   dynamicLightingMaterial = TerrainMaterialDynamicLighting;
   dynamicLightingMaskMaterial = TerrainMaterialDynamicLightingMask;
};

After merging this in the terrain flicker was solved. There were a few other changes as well but im not at home on my personal computer to see if this was the only thing I changed when I merged to 4.2. Hope this helps.
#24
01/31/2007 (8:34 am)
@ Charles,

Thanks a lot for this quick solution. I'll take a look in the material.cs.

If you get any other changes ...when you are back home please put a post for me.

Thank you very much for the help.
#25
04/20/2007 (3:03 am)
Does TGEA 1.0.1 SDK support the Light(DRL & HDR) and shadow On Atlas??
Page«First 1 2 Next»