Well I didn't change much from the ES code, I just cut the useful parts,
and tweaked them to fit the vehicle code I had. So yeah, its pretty much
the same thing they did, but I'm guessing maybe it was written that way to
fix bug they had with the old prediction system, so that might explain why
it doesn't work in my case.

Also, since I want this to work in multiplayer, I have to have it shared
between client/server. If its only server side the controls will be laggy,
and if its client side, it will be difficult to update the position on
other clients.

I already did override the GetRenderOrigin method and copied the smoothing
code for the player in there. The problem is that it works only if there
are prediction errors detected, and it detects none.

I think you're not far with the truth by saying it might be a battle
between smoothing and simulation. One odd thing I noticed, is that when I
run the game with maxplayer to 1, it runs only the server code, and the
jitter is still there...


On Sun, Apr 29, 2012 at 4:56 PM, Joel R. <joelru...@gmail.com> wrote:

> I'd start from scratch again.
>
> Quick question though...  Are the ships in Eternal Silence updating the
> client entity position and angles as you are?  Or is it server side only...?
>
> On the flip side... I would create my own custom clientside entity.  This
> way YOU control everything that happens to it, and not the server, because
> it appears like you are battling with the prediction system.  If the
> origin/angles are off by a small tolerance (defined in c_baseentity.cpp),
> the client will teleport immediately to the server values.
>
> Also, for the smoothing, I'd override the GetRenderOrigin and
> GetRenderAngles functions.  This way you can display a smoothed
> origin/angles, but the simulation origin and angles are still simulated
> perfectly.  This may be another reason why you are getting jitter, because
> of the battle between smoothing and simulation.
>
>
>
> On Sun, Apr 29, 2012 at 2:39 PM, Psy_Commando <psycomma...@gmail.com>wrote:
>
>> Finally got the dedicated server to work with my local network ip. It
>> does the same thing as with net_fakelag on the listen server, it doesn't
>> look broken to me...
>>
>> Still can't find what part of the code is causing the stuttering...
>>
>>
>> On Sun, Apr 29, 2012 at 10:43 AM, Ben Pye <bfh...@gmail.com> wrote:
>>
>>> With the dedicated server run with the argument "-ip 127.0.0.1" and then
>>> it should listen on localhost.
>>>
>>>
>>> On Sun, Apr 29, 2012 at 12:36 AM, Psy_Commando <psycomma...@gmail.com>wrote:
>>>
>>>> You're sure about that ? you're the first person to tell me that.
>>>> Besides, I can't connect to a dedicated server on the same machine for
>>>> some reasons, it just timeouts, whether I use 127.0.0.1 or my local network
>>>> IP.
>>>>
>>>>
>>>> On Sat, Apr 28, 2012 at 5:09 PM, Stephen Swires <
>>>> stephen.swi...@gmail.com> wrote:
>>>>
>>>>> Like I said. Fake lag does not work properly on listen servers in ASW.
>>>>> You can check for any lag prediction issues by creating a local dedicated
>>>>> server and connecting to it, then fake lag works as intended.
>>>>>  On Apr 28, 2012 8:32 PM, "Psy_Commando" <psycomma...@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> I made some progress changing the base class's base class to
>>>>>> CBaseAnimating instead of CPhysicsPropMultiplayer, it fixed some of the
>>>>>> stuttering, but once you add lag with net_fakelag it does it again. I 
>>>>>> can't
>>>>>> find the reason why the origin differs between client and server though, 
>>>>>> at
>>>>>> a glance it looks like the client is slightly ahead in time compared to 
>>>>>> the
>>>>>> server.
>>>>>> If it can help, here's the base class :
>>>>>>
>>>>>> Client :
>>>>>> c_prop_sfr_vehicle.h - http://pastebin.com/tqUFNGQZ
>>>>>> c_prop_sfr_vehicle.cpp -http://pastebin.com/eCKcE3VX
>>>>>>
>>>>>> Server :
>>>>>> prop_sfr_vehicle.h - h <http://goog_156218657>
>>>>>> http://pastebin.com/zPb3HbEh
>>>>>> prop_sfr_vehicle.cpp - http://pastebin.com/5y1m0S89
>>>>>>
>>>>>> On Fri, Apr 27, 2012 at 11:18 AM, Joel R. <joelru...@gmail.com>wrote:
>>>>>>
>>>>>>> Nick, if you knew anything about coding, you'd be able to make it
>>>>>>> work fairly quickly.  He is not going to give you all the SDK code 
>>>>>>> prepped
>>>>>>> and ready.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Apr 26, 2012 at 11:17 PM, Nick <xnicho...@gmail.com> wrote:
>>>>>>>
>>>>>>>> The code you posted certainly is impressive. I just can't find an
>>>>>>>> easy
>>>>>>>> way to put it in a sdk and run it? How to spawn the vech?
>>>>>>>>
>>>>>>>> Make an sdk with the files included that works, (with a working copy
>>>>>>>> of the mod) and all of the code and send a link to valve.. I am sure
>>>>>>>> they will help out.
>>>>>>>>
>>>>>>>> A single file isn't at all helpful compared to a working source code
>>>>>>>> copy, and actual files and a 10 step list to "test" the exact
>>>>>>>> problem
>>>>>>>> you are experiencing. WE HAVE TO BE ABLE TO RUN THE EXACT CODE IF U
>>>>>>>> WANT ANY HELP ON SUCH A MASSIVE "PROBLEM"..
>>>>>>>>
>>>>>>>> On Thu, Apr 26, 2012 at 12:18 AM, Psy_Commando <
>>>>>>>> psycomma...@gmail.com> wrote:
>>>>>>>> > I already posted a link to the pastebin with the whole code
>>>>>>>> earlier (
>>>>>>>> > http://pastebin.com/eMcKh1YL ). And who at valve would help ?
>>>>>>>> Most of the
>>>>>>>> > time I don't get answers when I mail devs. And what do you mean
>>>>>>>> share what
>>>>>>>> > the problem is with you, isn't it what I've been foing?
>>>>>>>> >
>>>>>>>> > Is there any examples of simple moving predicted entities,
>>>>>>>> besides the
>>>>>>>> > player ? I could really use an example...
>>>>>>>> >
>>>>>>>> > By the way, is what Stephen says accurate ? Is the net_fakelag
>>>>>>>> command not
>>>>>>>> > working on listen servers ?
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > On Thu, Apr 26, 2012 at 12:34 AM, Nick <xnicho...@gmail.com>
>>>>>>>> wrote:
>>>>>>>> >>
>>>>>>>> >> i think you should give us a basic code, and send it to valve...
>>>>>>>> only
>>>>>>>> >> valve can help you. Usually valve is quite nice, and I am sure
>>>>>>>> they
>>>>>>>> >> wouldn't mind helping you out, as long as you can share what the
>>>>>>>> >> problem is with the rest of us.....
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >>
>>>>>>>> >> On Sun, Apr 22, 2012 at 3:04 PM, Psy_Commando <
>>>>>>>> psycomma...@gmail.com>
>>>>>>>> >> wrote:
>>>>>>>> >> > Alright, what else could be causing jittering ? There is so
>>>>>>>> little going
>>>>>>>> >> > on
>>>>>>>> >> > in that entity.
>>>>>>>> >> >
>>>>>>>> >> >
>>>>>>>> >> > On Sat, Apr 21, 2012 at 8:40 PM, Tony "omega" Sergi
>>>>>>>> >> > <omegal...@gmail.com>
>>>>>>>> >> > wrote:
>>>>>>>> >> >>
>>>>>>>> >> >> As I said. looking at your prediction dump, it's not actually
>>>>>>>> >> >> predicting
>>>>>>>> >> >> properly.
>>>>>>>> >> >> Either they're not updating at the same rate, or they're not
>>>>>>>> running
>>>>>>>> >> >> the
>>>>>>>> >> >> same code producing the same results.
>>>>>>>> >> >> see your screenshot:
>>>>>>>> http://dl.dropbox.com/u/13343993/abox0003.jpg
>>>>>>>> >> >> notice in red, velocity is 0 0 0 that means
>>>>>>>> >> >> disabling VPhysicsUpdate is not the solution, as that means
>>>>>>>> you break
>>>>>>>> >> >> every vphysics object. Look at what it's doing, it's getting
>>>>>>>> it's
>>>>>>>> >> >> position
>>>>>>>> >> >> after vphysics simulates and updating the entity.
>>>>>>>> >> >> so unless you're trying to make a purely client-authoritive
>>>>>>>> ship, you
>>>>>>>> >> >> can't disable that without adding code to update the position
>>>>>>>> from the
>>>>>>>> >> >> client.
>>>>>>>> >> >>
>>>>>>>> >> >>
>>>>>>>> >> >>
>>>>>>>> >> >>
>>>>>>>> >> >> On Sun, Apr 22, 2012 at 7:40 AM, Stephen Swires
>>>>>>>> >> >> <stephen.swi...@gmail.com>
>>>>>>>> >> >> wrote:
>>>>>>>> >> >>>
>>>>>>>> >> >>> It maybe worth mentioning that net_fakelag is broken on
>>>>>>>> listen servers
>>>>>>>> >> >>> in
>>>>>>>> >> >>> Alien Swarm. It works on dedicated, however
>>>>>>>> >> >>>
>>>>>>>> >> >>>
>>>>>>>> >> >>> On Sat, Apr 21, 2012 at 10:05 PM, Psy_Commando <
>>>>>>>> psycomma...@gmail.com>
>>>>>>>> >> >>> wrote:
>>>>>>>> >> >>>>
>>>>>>>> >> >>>> I found what was causing the stuttering with 0 ping and in
>>>>>>>> >> >>>> singleplayer.
>>>>>>>> >> >>>> I disabled this code in cbaseentity_shared :
>>>>>>>> >> >>>>
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>
>>>>>>>> //-----------------------------------------------------------------------------
>>>>>>>> >> >>>>> // Purpose: My physics object has been updated, react or
>>>>>>>> extract
>>>>>>>> >> >>>>> data
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>
>>>>>>>> //-----------------------------------------------------------------------------
>>>>>>>> >> >>>>> void CBaseEntity::VPhysicsUpdate( IPhysicsObject *pPhysics
>>>>>>>> )
>>>>>>>> >> >>>>> {
>>>>>>>> >> >>>>>     switch( GetMoveType() )
>>>>>>>> >> >>>>>     {
>>>>>>>> >> >>>>>     case MOVETYPE_VPHYSICS:
>>>>>>>> >> >>>>>         {
>>>>>>>> >> >>>>>             if ( GetMoveParent() )
>>>>>>>> >> >>>>>             {
>>>>>>>> >> >>>>>                 Log_Warning( LOG_DEVELOPER_VERBOSE,
>>>>>>>> "Updating
>>>>>>>> >> >>>>> physics
>>>>>>>> >> >>>>> on object in hierarchy %s!\n", GetClassname());
>>>>>>>> >> >>>>>                 return;
>>>>>>>> >> >>>>>             }
>>>>>>>> >> >>>>>             Vector origin;
>>>>>>>> >> >>>>>             QAngle angles;
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>             pPhysics->GetPosition( &origin, &angles );
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>             if ( !IsFinite( angles.x ) || !IsFinite(
>>>>>>>> angles.y ) ||
>>>>>>>> >> >>>>> !IsFinite( angles.x ) )
>>>>>>>> >> >>>>>             {
>>>>>>>> >> >>>>>                 Msg( "Infinite angles from vphysics!
>>>>>>>> (entity %s)\n",
>>>>>>>> >> >>>>> GetDebugName() );
>>>>>>>> >> >>>>>                 angles = vec3_angle;
>>>>>>>> >> >>>>>             }
>>>>>>>> >> >>>>> #ifndef CLIENT_DLL
>>>>>>>> >> >>>>>             Vector prevOrigin = GetAbsOrigin();
>>>>>>>> >> >>>>> #endif
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>             for ( int i = 0; i < 3; ++i )
>>>>>>>> >> >>>>>             {
>>>>>>>> >> >>>>>                 angles[ i ] = AngleNormalize( angles[ i ]
>>>>>>>> );
>>>>>>>> >> >>>>>             }
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>> #ifndef CLIENT_DLL
>>>>>>>> >> >>>>>             NetworkQuantize( origin, angles );
>>>>>>>> >> >>>>> #endif
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>             if ( origin.IsValid() )
>>>>>>>> >> >>>>>             {
>>>>>>>> >> >>>>>                 SetAbsOrigin( origin );
>>>>>>>> >> >>>>>             }
>>>>>>>> >> >>>>>             else
>>>>>>>> >> >>>>>             {
>>>>>>>> >> >>>>>                 Msg( "Infinite origin from vphysics!
>>>>>>>> (entity %s)\n",
>>>>>>>> >> >>>>> GetDebugName() );
>>>>>>>> >> >>>>>             }
>>>>>>>> >> >>>>>             SetAbsAngles( angles );
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>>             // Interactive debris converts back to debris
>>>>>>>> when it
>>>>>>>> >> >>>>> comes
>>>>>>>> >> >>>>> to rest
>>>>>>>> >> >>>>>             if ( pPhysics->IsAsleep() &&
>>>>>>>> GetCollisionGroup() ==
>>>>>>>> >> >>>>> COLLISION_GROUP_INTERACTIVE_DEBRIS )
>>>>>>>> >> >>>>>             {
>>>>>>>> >> >>>>>                 SetCollisionGroup( COLLISION_GROUP_DEBRIS
>>>>>>>> );
>>>>>>>> >> >>>>>             }
>>>>>>>> >> >>>>>
>>>>>>>> >> >>>>> #ifndef CLIENT_DLL
>>>>>>>> >> >>>>>             PhysicsTouchTriggers( &prevOrigin );
>>>>>>>> >> >>>>>             PhysicsRelinkChildren(gpGlobals->frametime);
>>>>>>>> >> >>>>> #endif
>>>>>>>> >> >>>>>         }
>>>>>>>> >> >>>>>     break;
>>>>>>>> >> >>>>> .
>>>>>>>> >> >>>>> .
>>>>>>>> >> >>>>> .
>>>>>>>> >> >>>>> .
>>>>>>>> >> >>>>
>>>>>>>> >> >>>>
>>>>>>>> >> >>>> However I still have stuttering when I set "net_fakelag" to
>>>>>>>> anything
>>>>>>>> >> >>>> >
>>>>>>>> >> >>>> 0. And its gets worst the higher the FPS...
>>>>>>>> >> >>
>>>>>>>> >> >>
>>>>>>>> >> >>
>>>>>>>> >> >> _______________________________________________
>>>>>>>> >> >> To unsubscribe, edit your list preferences, or view the list
>>>>>>>> archives,
>>>>>>>> >> >> please visit:
>>>>>>>> >> >>
>>>>>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>>> >> >>
>>>>>>>> >> >>
>>>>>>>> >> >
>>>>>>>> >> >
>>>>>>>> >> > _______________________________________________
>>>>>>>> >> > To unsubscribe, edit your list preferences, or view the list
>>>>>>>> archives,
>>>>>>>> >> > please visit:
>>>>>>>> >> >
>>>>>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>>> >> >
>>>>>>>> >> >
>>>>>>>> >>
>>>>>>>> >> _______________________________________________
>>>>>>>> >> To unsubscribe, edit your list preferences, or view the list
>>>>>>>> archives,
>>>>>>>> >> please visit:
>>>>>>>> >> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>>> >>
>>>>>>>> >
>>>>>>>> >
>>>>>>>> > _______________________________________________
>>>>>>>> > To unsubscribe, edit your list preferences, or view the list
>>>>>>>> archives,
>>>>>>>> > please visit:
>>>>>>>> > https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>>> >
>>>>>>>> >
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> To unsubscribe, edit your list preferences, or view the list
>>>>>>>> archives, please visit:
>>>>>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> To unsubscribe, edit your list preferences, or view the list
>>>>>>> archives, please visit:
>>>>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> To unsubscribe, edit your list preferences, or view the list
>>>>>> archives, please visit:
>>>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>>
>>>>>>
>>>>>>
>>>>> _______________________________________________
>>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>>> please visit:
>>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> To unsubscribe, edit your list preferences, or view the list archives,
>>>> please visit:
>>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>>
>>>>
>>>>
>>>
>>> _______________________________________________
>>> To unsubscribe, edit your list preferences, or view the list archives,
>>> please visit:
>>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>>
>>>
>>>
>>
>> _______________________________________________
>> To unsubscribe, edit your list preferences, or view the list archives,
>> please visit:
>> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>>
>>
>>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders
>
>
>
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to