Programming role-playing games with DirectX