   Lights for a 2D game
  Hello all, I could use a little help.I'm using DirectX9 to make a 2D game. I'm using D3DXSprite, and it's working like a charm. But then I thought about how cool it would be if I could use lights in my game. So like the little character's torch is like a point light so you can only see stuff close to him. The light would fade off as the distance increases and it would be super awesome. I could also have some kind of lasers at some point.Anyhow, I cannot for the life of me get it to work.I know that D3DXSprite won't accept lights, but that's only because it sets that renderstate. So I fiddled around and told it not to change the render states and instead I manually set all of the render states that it normally does (except the "lighting, false" one, I set that to true). So I tested it and it draws fine. Then I turned on the ambient lighting and it affects the sprites draw by D3DXSprite. So I can now turn the ambient light up, and down and that's super awesome.But I can't get a point light working. I think it's because of this world view transforming matrix that makes absolutely no sense to me whatsoever. The DirectX documentation for D3DLIGHT9 says that the position values are in world coordinates, but I don't know what that means.I tried using 0 and 0, like top left, but it doesn't work. I tried playing with the range, that didn't work. I fiddled with attenuation values, that didn't work.Also, I haven't set any world or view matrix transformers or anything. Do I need to for D3DLight9 to go where I want it?Here's the code I used to setup my point light:----D3DLIGHT9 light;ZeroMemory(&light, sizeof(light));light.Type = D3DLIGHT_POINT;light.Diffuse.a = 1.0f;light.Diffuse.b = 1.0f;light.Diffuse.g = 1.0f;light.Diffuse.r = 1.0f;light.Specular.a = 1.0f;light.Specular.b = 1.0f;light.Specular.g = 1.0f;light.Specular.r = 1.0f;light.Ambient.a = 1.0f;light.Ambient.b = 1.0f;light.Ambient.g = 1.0f;light.Ambient.r = 1.0f;light.Position.x = 0.0f;light.Position.y = 0.0f;light.Position.z = 0.0f;light.Range = 1000.0f;light.Attenuation0 = 0.0f;light.Attenuation1 = 1.0f;light.Attenuation2 = 0.0f;m_lpd3dd->SetLight(0, &light);m_lpd3dd->LightEnable(0, TRUE);----This does not put the light at the top left corner of my screen with a range of 1000 pixels like I assumed it would. Oh and ambient light is turned right down so I would see if this light is working (it's not).Any help? What the hell is a matrix world transformer? I tried learning it but it's full of some kind of space math wizardry (I'm not from space so I don't understand it). Also I don't even know if it's the transforming matrix world that's the problem.Thanks in advance, fellows.   
  Point lights require normals (all vertices which are to be lit must have normal vectors). Do sprites have normal vectors? (I don't know so this is not just a rhetorical question, but I suppose they do not have normals....)EDIT - also, if you want the effect you described and you are using textured rectangles (quads) with just 4 vertices at the corners (which is what sprite does if I'm not wrong), it would look really ugly for bigger objects (bigger than really small).You'd need per-pixel lighting via shaders.   ;  I figured this out. It was the attenuation values, I just set att1 & att2 to 0 and set att0 to 1.0f and it works fine. Oh and I copied like 3 lines of code from somewhere that makes some kind of ophonopornographic viewport (or something).   