Re:Functional Reactive Programming in Java
by hacker_9 on Thursday October 22, 2015 @05:15PM
(#10435131)
I'm afraid you would just be moving the problem to another area of the game. By updating the camera matrices on a separate loop, the render thread may draw some objects with one view-proj and then the last few objects with another. This would lead to the objects look like they are flickering. If you queued up the input then you could imagine this would be quite undesirable if the game suddenly unfroze and did all the movements that made sense a second ago but not now (but for a 3d viewer tool this would be desirable, much like how a text editor will sometimes freeze but then catch up with everything you typed during the pause).
[ Parent
| on HN ]
Re:Functional Reactive Programming in Java
by eurekin on Friday October 23, 2015 @01:30AM
(#10436966)
I wouldn't update the view matrix directly. Rather let the input events update one matrix and the game loop would copy it only once per frame. This way all the input events would be summarized in that matrix and the view would follow the dragging cursor, even at 3FPS.
So, many input events are seen as a summarized version in the game loop. Not many of them.