Hi there Let me first explain my goal. I have experience in dev, so this topic is not for code suggestion, but if there are some examples about my question, i will be appreciated.
So... For now i have self made C# server part, and some test cases and some samples of client on C++. But im totally new in gamedev. I have read many tutorials, ask this question on other forum but still can't figure out how to. I hope someone of you can help me.
Client: 3d game world, coords double x, y, z.
Question is the next. What is the best way to simulate client movement? But there are few conditions. Im not sure if this can be done at all, but... I want to make dynamic speed for clients(e.g. client on vechicle, client on fast mount, client on slow mount). My server supports dynamic scripts, so in theory i can make new vechicle and set speed what i want, but i don't know how client know about that? This is not required part) If this is immposible, so ok. Next, i cant figure out what is the common way to make player move with prediction and in the same time ask to server.
My last thought was: for example i stay on (10,10,0), press forward(on X axis), and get(1, 0, 0). And this is my first trouble, why 1? How client knows how far move camera? For example in walk i move with +1, in vechicle +10, in mount +5. But this values are genuine only for server, right? I can't alvays move on client with this speed. One client may have 50FPS and move slover, than client with 100FPS, but in new location 100FPS can fall to 40 and so on... Is this mean that i should dublicate speeds array to client, and calculate it depending on current FPS and use Frame based movement? And also i have read few nearby posts and ther are people say, that i should send only packet like "Forward pressed". How then i should calculate prediction if i don't know how far i move?
Sorry for my awful english