4 ms·
Is there any way to eliminate mouse lag? For example, in http://gamemechanicexplorer.com/#raycasting-2 http://gamemechanicexplorer.com/#raycasting-2 the light s
by cousin_it 11y ago
Is there any way to eliminate mouse lag? For example, in http://gamemechanicexplorer.com/#raycasting-2 http://gamemechanicexplorer.com/#raycasting-2 the light source lags visibly behind the pointer. I'd prefer it it was locked to the pointer.
- onion2k 11y agoI 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.
- cousin_it 11y agoI think the problem is worse than that. Here's a small jsfiddle showing that JavaScript's onmousemove is inherently laggy: http://jsfiddle.net/z8h6y787/ http://jsfiddle.net/z8h6y787/ Also see this page: http://atebits.github.io/browser-input-latency/ http://atebits.github.io/browser-input-latency/