Player id to client id translation

Hey there,



I’ve got OGF to the point where I can actually start sending chat messages from the server to all the players in the room. Now I have a small problem. In the chatroom, all I know are the player ids. In the network layer of my server I only know the client ids.



What would be a good place to have the translation map between the two? I’m currently setting it up as a seperate entity in my server, but this feels a bit weird. The most logical place would be the network layer, but that wuld give my network layer knowlegde of the player, which is something I’m a bit unhappy with. I thing the network layer should only know data…

I’d recommend saving the client id as part of your player data. Leave it transient so it doesn’t get passed around, but at least then you have it server side and it’s easy to reference when needed.