Hacker News new | past | comments | ask | show | jobs | submit login

Is there any way to eliminate mouse lag? For example, in http://gamemechanicexplorer.com/#raycasting-2 the light source lags visibly behind the pointer. I'd prefer it it was locked to the pointer.

I think that example is recalculating the wall positions for every frame. That works for an example of a mechanic, but you wouldn't do that in a real game.

I think the problem is worse than that. Here's a small jsfiddle showing that JavaScript's onmousemove is inherently laggy: http://jsfiddle.net/z8h6y787/

Also see this page: http://atebits.github.io/browser-input-latency/

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact