|
Re: Simple moving example
[Re: giorgi3]
#95249
10/31/06 03:59
10/31/06 03:59
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
Expert
|
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
I took a quick glace at how your code is written Dark_samurai,
I would check out these 2 dplay variables and make sure they are set correctly for how you have your code written.
dplay_smooth & dplay_entrate.
You probably need to adjust those if you are going to be updating entities with ent_sendnow() manually.
Loco
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: Simple moving example
[Re: giorgi3]
#95250
10/31/06 18:26
10/31/06 18:26
|
Joined: Sep 2002
Posts: 8,177 Netherlands
PHeMoX
Senior Expert
|
Senior Expert
Joined: Sep 2002
Posts: 8,177
Netherlands
|
Thanks for your explanation Giorgi3! At the moment I'm still gathering and looking into mp tutorials, but since I'm also trying some stuff out at the same time, it's very tempting to just ask around. Sorry for this, sort of lazyness.
Cheers
Last edited by PHeMoX; 10/31/06 18:31.
|
|
|
Re: Simple moving example
[Re: giorgi3]
#95252
11/01/06 19:06
11/01/06 19:06
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
@Locoweed: I played around with the variables and the code, but I still can't get it run without overshootings. Should I use dead reckoning, or is it better not to make use of it? I recognized that your MPbarebones also has overshootings. Can you please give me a modified version of it, without overshootings?
Dark_samurai
Last edited by Dark_samurai; 11/01/06 19:06.
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: Simple moving example
[Re: Dark_samurai]
#95253
11/02/06 02:49
11/02/06 02:49
|
Joined: Oct 2002
Posts: 2,256 Oz
Locoweed
Expert
|
Expert
Joined: Oct 2002
Posts: 2,256
Oz
|
Try to set dplay_smooth = 0; to start with.
Professional A8.30 Spoils of War - East Coast Games
|
|
|
Re: Simple moving example
[Re: Dark_samurai]
#95254
11/02/06 03:04
11/02/06 03:04
|
Joined: Jan 2003
Posts: 517 Illinois
giorgi3
User
|
User
Joined: Jan 2003
Posts: 517
Illinois
|
Hi Dark_samurai Unfortunately the dplay_smooth algorithm has (or at least had) some bugs in it that causes overshooting. The ent_sendnow was suppose to help, but it didn't completely eliminate the problem. The issue seems to be the algorithm doesn't handle rapid changes in motion very well. You might start by just shutting it off, but that presents some other issues. Here are a couple of MP form threads that might be of interest. locoweed's script - overshoot revisited MP Smoothing via c-script
Giorgi3
10,000 parts flying in a close formation does not constitute an airplane. Some assembly is required.
|
|
|
Re: Simple moving example
[Re: giorgi3]
#95255
11/03/06 16:39
11/03/06 16:39
|
Joined: Jul 2005
Posts: 1,930 Austria
Dark_samurai
OP
Serious User
|
OP
Serious User
Joined: Jul 2005
Posts: 1,930
Austria
|
@giorgi3: Thanks for the Links!
I had an idea: The client controls his own character and also starts c_move. Then he saves the position of his character. He sends it to the server, which sends it to the other clients. Those correct the position of the character (for example Player3.x = Send_position[1];...). But now I noticed, that the last part don't work. If the script should correct the position, I can't see a difference. Isn't it possible to change the position of an entity localy?
I hope you understand my idea and problem.
Dark_samurai
ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)! get free version
|
|
|
Re: Simple moving example
[Re: Dark_samurai]
#95256
11/03/06 17:37
11/03/06 17:37
|
Joined: Jan 2003
Posts: 517 Illinois
giorgi3
User
|
User
Joined: Jan 2003
Posts: 517
Illinois
|
Um...... Yes, I understand your idea. From the MPSmoothing script referenced above: Code:
/******************************************************************************************************* Design Concept: This concept is rather simple. I'm going to change the rotation and movement to be handled on the client side. The servers job will then be to simply 'echo' each clients movements to all the other clients. Traditionally 3dgs expects this to be handled on the server. To prevent the server from sending it's automatic updates, I am setting nosend_angles and nosend_origin flags on all entities. As we gather_input from the client keyboards, each client will apply the keyforces to it's own entity. Then each client will send the movement coordinates of the entity via skills to the server. The server will take these coordinates coming in from the clients and 'move' the corresponding entity. Then the server will 'echo' these movements to all the other clients via other skills. And finally a "client_move" function will use these 'echo' skills to move the 'echo entities' of other clients. To smooth the movement effect client_move will use vec_lerp to interpolate the current position and rotation of the clients' entities with these 'echoed' position updates coming from the server. Simple huh! Note: This is not a prediction algorithm. Under very high latency this code will break down. **********************************************************************************************************/
So, you can use that script as a reference if you like. Also note that in the thread of discussions about this script, we kinda concluded that this method wouldn't scale well in a real game. I wrote it just so I could 'see' the client movement smoothed out without the overshoot problems you get with dplay_smooth enabled.
Last edited by giorgi3; 11/03/06 17:49.
Giorgi3
10,000 parts flying in a close formation does not constitute an airplane. Some assembly is required.
|
|
|
|