This Week In Veloren 7
This week, we've seen a few different contributors getting tasks completed. There is also more discussion about networking and character animation. This week's blog was written by @AngelOnFira, with the art section curated by @Pfau.
@imbris has been working on the chat box. The network side of programming is far enough that an event calls can be made once a message is received. @imbris was able to get a prototype working, that displays a message from the server being broadcast to the client.
@Zesterer and @LunarEclipse sat down to go over more updates to the networking code. Most of the work consisted of guaranteeing matching client and server entities. Moving towards a Universal ID (UID) system will help with this. Another topic was distributing messages to clients. There are many cases to be handled, such as update a single player, update all players, update all player except X, and so on. An example of updating all players would be sharing players movement each server tick. An example of updating all players except X would be sending a chat message. If X sent the message, then they don't need to receive it.
A bigger topic that was discussed is how to choose what the client should know about entities in its area. A player should know about units that are moving around them, but they shouldn't know about a unit moving around three cities away. The solution that was found is to subscribe the player to the region or chunk they are in. They would also be subscribed to the surrounding chunks. Then, any units that are in that region will have their information sent to the player.
Finally, there were more discussions about animation. The character animations in Veloren are quite simple compared to ones seen in AAA games, where you have to use techniques like inverse kinematics, or complex skeletal structures. In Veloren, there is simple movement of each part of a character's body, such as an arm moving back and forth while walking. Therefore, Veloren is able to make use of vertex shaders to do these movements. This offloads lots of the CPU work to the GPU when rendering characters. In the long run, it will hopefully allow Veloren to be run on lower performance computers.
But there are problems while using vertex shaders for animations. For the 3D modelers and animators, they will have to put in some extra work to prepare models for Veloren. Hopefully, we can create a process that allows this to be more seamless. On top of that, we may run into restrictions if there is something that we're not able to do wither vertex shaders. But I think that bridge will be burned when we arrive at it.