Well basicly i almost finished programming the gameplay and now i started working with some UI. So i wanted to replace the original mouse cursor with some nice custom one. So yeah, ive hidden the cursor and made a sprite object and an event
+Always = Set SpirteX to MouseX and SpriteY to MouseY
Now heres what happends.
If the mouse is being moved rapidly and fast the Sprite is falling behind! And not only that! whenever the mouse is being moved in such a rapid manner - the CPU usage grows preety noticeable.
At first i though its because i have about 1200 events running, so it creates the delay. But no.
So ive gone and made a new, perfect clean project.
Added 16^2 sprite
Same event. Always>set PosX/Y to MouseX/Y
If the mouse is still, then the CPU wainting on circles around 95% (+/- 0.30%.
But when ill start moving the mouse like a crazy monkey then blam: down to 88%(!!!!). Thats a Whoping 7% CPU usage just for mouse movement O_O The heck?
And obviously, even at such empty, newborn project - the sprite falls behind the mouse cursor.
And its not a Debugger error - ive checked the CPU usage also via windows Task Manager. It shows the same. At worst the usage is 41% without the mouse movement. With the mouse going crazy - up to 51%. And thats with Dual AMD Phenom CPU.
1. Why position updating leave the sprite behind?
2. What the heck is wrong with the CPU usage?
3. How to fix the CUP usage and/or Sprite Pos updating?