Original Post
i used WM_KEYDOWN procedure by the message of windows to handle the key input Look:
WPARAM StartMessageLoop()
{
MSG msg;
while(1)
{
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
if (msg.message == WM_QUIT)
break;
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
g_Engine.GetDevice();
g_Engine.HandleKeys();
g_Engine.ProcessGame();
}
}
return msg.wParam;
}
, but it was much slow, so i put g_Engine.GetDevice(); to get the DEVICE and g_Engine.HandleKeys(); to handle the Key statement, in the WPARAM StartMessageLoop() function (because it is call more fastly)... But now my palyer moves very fast, jamps very fast, and i see it very blurred. If i jump its tiles are a lots confused and disorderly because it seems that i don''t get a good buffer of the scene but seems it is present a tile at the time... (but in the code there is only one present function when i finish to assemble all the tiles of the scene and the player).
Tnx to who can help me!