.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2, Source and Source Games (http://forums.bots-united.com/forumdisplay.php?f=58)
-   -   CS:S is terrible (http://forums.bots-united.com/showthread.php?t=3064)

Pierre-Marie Baty 28-11-2004 15:01

Re: CS:S is terrible
 
Quote:

Originally Posted by dead bwoy
So I guess what you're saying, PMB, is that the client-side prediction needs to be improved to be able to use HL2 physics in CS:Source?

Look, if you know, at an instant T, the position, shape, center of gravity and mass of an object, and if you know the position, direction and velocity of a force that you apply to it, you can compute precisely what will happen to this object over time, right ?

Client-side prediction should work just that way. It doesn't - it shouldn't - require any more parameters to be sent over the network.

Unfortunately many game physics involve randomness (which is something completely irrelevant in pure physics but very handy to simplify computations a lot), and this is why physical phenomenons differ between computers (i.e, you explode a barrel, and on some PC it would land somewhere, while on the other it would land elsewhere, given the exact same initial conditions). This is why randomness has to be synchronized between all clients. To do this, one very simple way is to send the server's random seed state over the network. Because "randomness" doesn't intrinsically exist in a PC. Randomness is in fact just a math suite, where the number to come is computed using the number that came out already. The random "seed" is just the current position on this suite, i.e this number. Not two PCs can output a different random result if they share the same random seed. This latter phrase look weird, but it makes sense ;)

@$3.1415rin 28-11-2004 15:20

Re: CS:S is terrible
 
you don't even need random numbers involved. When calculations are running at different fps on different machines, the rounding errors using floating point arithmetric will sum up and in special situations ( player hitting the edge of a crate, a barrel hitting an edge of a wall ) , you will get different results. I once wrote a little simulating program using simple strings and masses to simulate simple things, and it wasnt that easy to avoid oscillations and stuff due to this inaccuracy of the calculations. So I guess this might be a main reason.

sfx1999 28-11-2004 21:28

Re: CS:S is terrible
 
PMB, the problem is that when a player walks in front of one of these flying barrels, lag will cause an error. On one computer he may not be in front of it, and on the other he might be past it.

stefanhendriks 28-11-2004 21:52

Re: CS:S is terrible
 
In fact that should also not be even a problem. Because the server should know the exact position of the players as well. From a server side of view you can calculate the reaction to the player and send this data to the client.

MarD 28-11-2004 23:21

Re: CS:S is terrible
 
Heyyo,

Like I mentioned before guys, HaloPC does pretty much what stefan said above, just minus the accurate calculations... I'm sure this is why valve took this approach. ;)

sfx1999 01-12-2004 22:56

Re: CS:S is terrible
 
I am saying the problem is with client-side prediction and lag. That is why a barrel hitting a player could cause odd effects.

Pierre-Marie Baty 01-12-2004 23:38

Re: CS:S is terrible
 
Lag as you say shouldn't cause any problem but for the client. The only machine on which the game really happens is the server. If the server updates its clients correctly, then all clients will be in the exact same state. Bear in mind that lag also means a time shift, hence it's not ONE entity which is out of sync but the WHOLE client pack which is late about the server. But minus that time shift all the entities and the forces applied to them should be in the exact same state, which is why accurate client-side prediction is more than possible, it should be a must for such games.

*edit*
If you want me to be more accurate in the answer, I'll just say that in fact what can cause the problems you are talking about is not the lag, but any attempt of lag compensation.

dead bwoy 02-12-2004 02:19

Re: CS:S is terrible
 
I found a quote in the SrcSDK documentation related to this:
Quote:

For a mapmaker it's pretty easy to placed physics entities in Hammer. For single player maps the entity class physics_prop must be used to create server-side controlled physics entities. The player does correctly collide with these entities, can walk over them, push them around or pick them up. Unfortunately this class can't be used in multiplayer mode since player interaction with physics entities isn't predicted on the client and would cause jittery or delayed movement. Therefore a special entity class prop_physics_multiplayer must be used, which implements a simpler collision behavior (COLLISION_GROUP_PUSHAWAY). Multiplayer physics entities can only be pushed away, but not be used to walk over or picked up. If they are larger, a player just bounces off. Whether a multiplayer physics entity becomes a server-side or a client-side simulated entity, is defined by the object model.

T(+)rget 10-12-2004 04:48

Re: CS:S is terrible
 
How did the guy from SVEN-COOP manage then? He has multiple AI entities running around all at once, surely Valve could fix this problem with the physics?

stefanhendriks 11-12-2004 22:36

Re: CS:S is terrible
 
who said he did? Afaik the sven-coop just released details on their plans. Not on how they encounter difficulties implemtenting them... if they do succeed, i am sure everybody (especially valve) wants to know what they did.


All times are GMT +2. The time now is 09:44.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.