|
|
Re: Wasteland, the Clanwars (reworked)
[Re: Damocles]
#94271
10/19/06 21:57
10/19/06 21:57
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Quote:
The fogmap is 64x64 Pixels, the Terrain has a 512x512 maintexture for the shadow and multitexturestuff,
so painting the 512x512 texture with fog twice a second will be quite slow without a dll ,and I dont want to waste much calculations with the fogmap. In my current version, the fog also greys out areas that cant be seen by units, so it is more than painting it one time.
I can raise the fogterrain, so that it will not collide with the mainterrain.
Well.. as for the texture size you are wrong, sizes dont make any difference.. just use the 64*64 texture in the terrain shader. use the standard mask coords and it will be correct. Trust me that its more efficient to do it that way than to draw two terrain models.
Simply use the fog map as a skin the terrain shader and mulitply it over the final color.
|
|
|
Re: Wasteland, the Clanwars (reworked)
[Re: Matt_Aufderheide]
#94272
10/19/06 23:42
10/19/06 23:42
|
Joined: Jan 2003
Posts: 4,305
Damocles
OP
Expert
|
OP
Expert
Joined: Jan 2003
Posts: 4,305
|
It is not mainly about painting the texture, it is that every playerunit needs to draw a circle around it twice a second, and this in c-script. (the maps gets greyed out at every point that was discovered, and then the units uncover it again) This would result in a lot of code to be processed in c-script, when drawinf circles that are in the 100x100 pixels range for 50 units, twice a second (or more)
Also I use the template multitexture terrain, that works pretty good, and I also use the shadowlayer, so the resolution needs to be at least 512x512 to have a usable shadowresolution.
A way might be to alter the terrainshader, to support the fogmap additionally, as a fifth skin, is that what you ment?
for the demo: buld bunkers early, to protect better aginst the rushes... The bunker shootes if flames or troopers are in it (there is no effect to visualize the shooting yet)
|
|
|
Re: Wasteland, the Clanwars (reworked)
[Re: PHeMoX]
#94274
10/20/06 07:19
10/20/06 07:19
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Quote:
A way might be to alter the terrainshader, to support the fogmap additionally, as a fifth skin, is that what you ment?
Yes of course 
easy to do.. set the terrain skin like this in the material defineiiton:
Skin3=fogmap;
and then in the shader file sample the skin like this (put this right near the other samplers):
texture mtlSkin3;
sampler fogMapSampler = sampler_state { Texture = (mtlSkin3); MinFilter = Linear; MagFilter = Linear; MipFilter = Linear; AddressU = clamp; AddressV = clamp; };
and in code for the pixel shader do this at very end, right before the line "return FinalColor;":
float fogmap = tex2D(fogMapSampler,In.MaskCoord); Finalcolor.rgb*=fogmap;
|
|
|
Re: Wasteland, the Clanwars (reworked)
[Re: Matt_Aufderheide]
#94275
10/20/06 17:34
10/20/06 17:34
|
Joined: Dec 2005
Posts: 490 Germany/Berlin-Velten
kasimir
Senior Member
|
Senior Member
Joined: Dec 2005
Posts: 490
Germany/Berlin-Velten
|
lol i like your game - its great!!! I have played it for many times... so i found a bug in the latest version:  this trooper get "boring" so he began (without i have done something) to build all visible buildings on this screen without increase the resources... if he had finished one he began the next. I have clicked him and ordert him to go away - so he stopped to build - he was still a "normal tropper again. It was possible to create units at the barrack. Hope you will fix this bug - good luck^^
|
|
|
Re: Wasteland, the Clanwars (reworked)
[Re: kasimir]
#94276
10/20/06 20:24
10/20/06 20:24
|
Joined: Jan 2003
Posts: 4,305
Damocles
OP
Expert
|
OP
Expert
Joined: Jan 2003
Posts: 4,305
|
Haha, funny  this is actually the AI- scavangers "soul" building things, you have killed him, and the trooper got his ID number, and started building like the AI. I will fix that  I should play my own game more often, to find such errors...
|
|
|
|