|
DeleD Community Edition Forums
|
View previous topic :: View next topic |
Author |
Message |
djoke Member
Joined: 07 Jun 2007 Posts: 1
|
Posted: Thu Jun 07, 2007 3:50 pm Post subject: simple map demo ;) |
|
|
Ok, I'm new to this site
this is 1 smal demo from my dx engine
with delgine map is nothing fancy and
have lots o bugs buts is just 4 show
the key is
w,a,s,d and space
shows=
decals,particle system,md3 model (joints rotate),delgine map,3d entities and collision with coldet.
http://pwp.netcabo.pt/LuisRosaSantos/duke.rar
sory my bad inglish
|
|
Back to top |
|
|
Andreas233223 Member
Joined: 29 Jul 2007 Posts: 359 Location: Germany
|
Posted: Sat Aug 04, 2007 7:35 pm Post subject: |
|
|
i'm on a litle game, too, but i don't know how to use an engine/c++.
is there any programm in the web with wich i can easily play my maps? _________________ ♥♦♣♠♥♦♣♠♥♦♣♠♥♦♣♠♥♦♣♠♥♦♣♠♥♦♣♠♥♦♣♠ |
|
Back to top |
|
|
ally DeleD PRO user
Joined: 08 Jul 2007 Posts: 24
|
Posted: Wed Aug 15, 2007 4:57 am Post subject: |
|
|
I love the laser particle beam, looks really cool!
You probably already know this, but some simple fixed pipeline lighting is really easy to achieve in DirectX and would add a lot of flare to your level, here is some quick and easy code you can plug right into your engine ( I'm assuming you aren't using shaders, if so this won't work, but I can give you a few quick and dirty shaders that would achieve the same effect)
Code: |
void SetSpotLight(const D3DXVECTOR3* position, const D3DXVECTOR3* direction, const D3DXCOLOR* color)
{
D3DLIGHT9 light;
ZeroMemory(&light, sizeof(D3DLIGHT9));
light.Type = D3DLIGHT_SPOT;
light.Ambient = *color * 0.4f;
light.Diffuse = *color;
light.Specular = *color * 0.6f;
light.Position = *position;
light.Direction = *direction;
light.Range = 10000.0f;
light.Falloff = 1.0f;
light.Attenuation0 = 1.0f;
light.Attenuation1 = 0.0f;
light.Attenuation2 = 0.0f;
light.Theta = 0.5f;
light.Phi = 0.7f;
pd3dDevice->SetLight(0, &light);
pd3dDevice->LightEnable(0, true);
}
|
pd3dDevice is just a pointer to an IDirect3DDevice9 object.
All you need is the light position (as a vector) and the target's position(as a vector). Here's a quick way to have the light always shine on the camera position:
Code: |
pd3dDevice->SetRenderState(D3DRS_LIGHTING, true );
pd3dDevice->SetRenderState(D3DRS_AMBIENT, 0x00151515);
D3DXCOLOR color(0xff446666);
D3DXVECTOR3 LightPosition( 0.0f, 1000.0f, 0.0f );
D3DXVECTOR3 TargetPosition = mCamera.getPosition( );
D3DXVECTOR3 LookDirection;
LookDirection = TargetPosition - LightPosition;
D3DXVec3Normalize( &LookDirection, &LookDirection );
SetSpotLight( &LightPosition, &LookDirection, &color );
|
You can replace mCamera.getPosition( ) with any vector you want. The look direction is just the two vectors subtracted from each other.
Just set the light every render pass (or if you want the light to not move you can just set it once).
You can turn the light on and off with this line of code:
Code: |
pd3dDevice->LightEnable(0, true);
|
If you already knew this, sorry! I just think your engine looks awesome, and a little light would really spice it up! Especially in that screenshot where you have the floodlight! I think it's an awesome effect =] I think a cool little red spotlight coming from the player and shooting in the direction of the particle beam would also make a really cool effect. (Just set the color of the light, the player's position, and you can use the players look vector instead of the subtraction and target vector!)
Keep up the good work and keep posting more pictures pleeeease! |
|
Back to top |
|
|
Willakan Member
Joined: 10 Jul 2007 Posts: 22 Location: Britain
|
Posted: Tue Aug 21, 2007 3:24 pm Post subject: |
|
|
Nice! Apart from the fact that door you can see is taken form the FPS Creator software's stock media that comes with it. You can use that media in FPS Creator only. Using it like this and you could be sued _________________ Argh!! Nothing I lay my hands on works! |
|
Back to top |
|
|
handless DeleD PRO user
Joined: 11 Jan 2005 Posts: 274
|
Posted: Wed Aug 22, 2007 6:20 pm Post subject: |
|
|
very cool so far. keep it up |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|