Post 12 Dec 2012, 01:38 by Lewin
@Pawel: Yes I got your emails, I haven't had time to look into it though.
KaM game logic updates 10 times per seconds, so actually all of the animations you see are at 10 FPS (e.g. serfs walking, flags moving, etc.). The only time you will notice FPS is in stuff like scrolling across the map. In fact if your computer is running the Remake at 10 FPS and you don't scroll (leave it still) then you won't be able to tell the difference compared to if it was running at 60 FPS since the animations are only changing 10 times per second anyway (unless you use speed up). Compare scrolling across the map in TPR to the KaM Remake, you'll see that the Remake is MUCH smoother.
The reason why we are showing the player's FPS to everyone in multiplayer is to indicate when that player is causing lag for the other players (it's not about the game looking smooth, it's about causing the game to run slowly). If his computer can't render the game 10 times per second, then it cannot update game logic at 10 times per second (since you can't update the game and render it at the same time) and therefore the game runs slowly, which means all other players have to run slowly too otherwise they will get ahead of that player in the game simulation. One way to improve this would be to make the game take a "snapshot" of its internal state and render that in a different thread (so it can render the game and update the game logic at the same time and waiting for the GPU will not cause the game logic updates to be delayed), but this would only improve performance for people who are GPU limited, and given that the Remake has very low GPU requirements it's probably not worth the large amount of work it would take (and it can make bugs more complicated/harder to fix). Although it would be good experience to implement a threaded rendering engine, so maybe we'll do it eventually.
Regarding the colours, in my tests the game does not lag at all at 10 FPS, but it becomes noticeable at <10 FPS. The reason why we have yellow/orange is to indicate that the player might cause lag if he looks at a busy part of the map or zooms out (putting additional load on his graphics card). It's basically a warning, and red means "this player IS causing lag".