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 «Previous 1 2
#1
09/08/2006 (9:01 am)
I found I couldn't add light data blocks, or indeed create any lights at all.
after some probing I found:


To get the new lighting system working, you will have to edit the
"starter.fps\server\scripts\game.cs"

after

exec("./aiPlayer.cs");

add

exec("common/server/lightingSystem.cs");


Disclaimer: I'm 99% sure this is all you need todo, but I have been messing around
with some of the other scripts... let me know if this helps anyone, if so I guess we should get
Joseph's blog updated :)

Hewster
#2
09/08/2006 (1:43 pm)
I get to this point before it locks up

//-----------------------------------------------
Synapse Gaming Lighting Pack

Starting scene lighting...
Starting TGE based scene lighting...
Lighting with light #1 (TGE vector light)...
Lighting object 1 of 28...
#3
09/08/2006 (3:19 pm)
I only got it to work after i put the same initRenderInstManager(); in both "function loadMaterials()" and "function reloadMaterials()".
I put it last in function loadMaterials() and after loadMaterials(); in function reloadMaterials().
I dont know if it actually needs to be in both but it worked for me, and it didnt work if i just put it in function reloadmaterials.
#4
09/09/2006 (8:02 am)
Have you guys noticed that in main menu, if you open the console and put the cursor over the console windows edge (to resize the window), that the main menu turns black?

Todd
#5
09/21/2006 (7:53 am)
Hi,
when i will start a lan session and a client will join the game then the game of the client will crash. Do you have the same problem ?
#6
09/29/2006 (2:34 pm)
Thanks for this, Jaimi. It will be invaluable for me learning to get players, weapons, etc. into the engine.
#7
10/06/2006 (3:59 am)
Hey Jaimi, great thanks.. as an absolute newbie to TSE this really helped.

For what it's worth, I corrected the horrible glow problems on the Orc as follows...

I copied the folder from the demo data folder called spaceorc into the starter.fps data directory, deleted the player directory in the same directory. Renamed the spaceorc directory to player and then in the materials.cs file inside the directory, changed all the references to player from spaceorc.

Now I have a nice functional player model that looks good.

Only problem I have now with the model is that the crossbow string doesn't work, but I am sure that's fixeable as well :)

Next is to work out the terraign lighting and cut down the brightness :)

Regards

Graham
#8
10/07/2006 (10:37 am)
It was easy to get it working with MS4. A few notes not mentioned.

-There are a handful of materials that need to be defined, such as the crossbow's ammo clip.

-I found it easier to simply remove the glow/emission lines from the orc_blades material definition, than copy over the space_orc from the demo folder.

-I had also attempted to convert the .cu and .tqt files to an atlas terrain file via the import/generate functions. Hoped it would get rid of the funky effects. While the geometry exported perfectly torque would crash each time I tried to do the same with the texture file. In the end, I simply created a new mission using the atlas terrain from terrain_water_demo. It looked far better anyhow! Was anyone successful in importing the .tqt file?

-The particle/decal eye candy such as bubbles underwater and footprints don't appear to work. Haven't yet taken a look at it.

-Jac
#9
10/24/2006 (8:17 am)
@Graham Theres a much easier way to correct the orc glow... if you open up the materials.cs file in the player directory and do the following:

A: go through and comment out all the glow[X] = true; (or delete or set to false etc)

B: go through and comment out all the emissive[X] = true; (or delete or set to false etc)

C: on all the orcblades and gunmetal materials where it says
specularPower[1] = 32.0; turn this down to a more reasonable number such as
specularPower[1] = 12.0;

and the results should be the same :)
#10
11/04/2006 (10:30 pm)
Shiny orc blades fix replace old section in player/materials.cs with this...
------------------------------------------------------------------------------------------

new Material(OrcBlades)
{
baseTex[0] = "~/data/shapes/player/orc_ID5_blades";
bumpTex[0] = "~/data/shapes/player/orc_ID5_blades_bump";
cubemap = WChrome;
pixelSpecular[0] = true;
specular[0] = "0.8 0.8 0.8 1.0";
specularPower[0] = 12.0;
};
-----------------------------------------------------------------------------------------

also to fix the healthpacks make a new material.cs
in "items" and paste in this...
-----------------------------------------------------------------------------------------

new Material(healthkit001)
{
baseTex[0] = "healthkit";
};
-----------------------------------------------------------------------------------------

add this to the material.cs in crossbow to fix clips and debris...
-----------------------------------------------------------------------------------

new Material(clip)
{
baseTex[0] = "clip";
};
new Material(debris)
{
baseTex[0] = "clip";
};
-----------------------------------------------------------------------------------
the debris does use the clip texture LOL,i found out with hex edit
looking into the models to find where the texture was,
i havent figured out the shadow thing could it be because the player
model is not specified correctly as it is called "playerbody" i dont know.
or why theres no clouds but i did see a thread about it,ill check it out tomorrow
#11
01/07/2007 (6:50 am)
Thanx guys, got mine running.

The shadow seems chopped off at the far end. Just thought i'll mention it.
#12
01/08/2007 (9:25 pm)
Anyone get anywhere with the shadow problem?
#13
01/18/2007 (7:20 am)
Hi I got teh shadow problem. I tried to fix it by changing teh direction of teh sun it improved but still it is chopped off by one end.

Can anyone instruct me to resolve this problem? Help would be greatly appreciated.

Thank you.
#14
01/18/2007 (8:54 am)
I have the same problem :(

The orc shadow looks like this:

www.outlineinter.com.br/sylker/garagegames/shadow_problem.jpg
#15
01/18/2007 (10:26 am)
The thing with the shadow has been mentioned 3523326 times before and John Kabus has told how to fix it several times as well.
#16
01/18/2007 (11:17 am)
@Stefan - although I share your 'damnit try using the search' attitude, you should at least post the link to where John pasted the fix if you're gonna criticize.

#17
01/19/2007 (1:52 am)
Yes, mentioning the link would help me than the criticize.

Thank you
#18
01/19/2007 (3:15 am)
Quote:
@Stefan - although I share your 'damnit try using the search' attitude, you should at least post the link to where John pasted the fix if you're gonna criticize.

Criticize? I said it had been discussed before and that John had mentioned the fix somewhere, then I had to run off to work. If that's not being helpful then I don't know what your post is.

Perhaps you think it's more useful not to mention anything at all so the OP doesn't even know a solution exists? I'll try to remember that the next time I see a question from you guys pop up. Obviously help is not appreciated if it's not served on a silver platter.

If you want to be babysitted with links then all fine, but if I have to hurry somewhere - then I'll give as much as info as I can before I go. Call that being a critic if you want.
#19
01/19/2007 (6:40 am)
@Stefan: I absolutely understand that you were very busy at that time. And being a critic is not bad at all. Infact I didn't take it negatively.

But a clear link would help me in better way ... :-)
#20
01/21/2007 (10:48 am)
@ Mahmud
I dont know if you ever resolved this problem, but after much searching my fix to this problem was to paste this into the bottom of the player block in player.cs and to fix kork also paste in the PlayerData(DemoPlayer : PlayerBody) of aiPlayer.cs. Hope this helps.

shadowSelfShadow = true;
shadowSize = 512;
shadowSphereAdjust = 1.5;
shadowBias = 0.001;
Page «Previous 1 2