I think it's a bit off-topic, but you should read the book "Programming Role-playing games with DirectX 8.0". It explains a lot.