Please Help me fixing my elevator jitter bug

JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
edited June 2014 in Modding
Guys,

please help me fixing my elevator / train jitter bug!

I want to fix this now for more than a year, now that we have a community developing crew and also
we combat guys have access to the engine, I should finally be able to fix this somehow.

A vid about the problem I'll be talking about:


See this jitter of the Elevator? I'll be moving the elevator OnUpdate() with SetOrigin().
Any idea, what I could do to fix this ??

I can't find my old post, someone posted something about a time differ at client / server.
Anybody knows a bit more about this?

Comments

  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    So no more jitter at my elevator? That would be fantastic.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    matso wrote: »
    Yea, I have been trying to have the environment move players for a long time, but there has always been engine bugs around that made it impossible to do so well. First players were not moving correctly, then the AI units were not either... hopefully, this fix will make it work as smooth as it should.

    So maybe... just maybe those smelting buckets won't suck quite so hard anymore? :D
  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    Well, those buckets are a bit of fake - I think the server and client don't really keep those in sync properly - they are probably not lag-compensated or something. So they will still suck in 267. Making them work properly is a future project...

    However, I hope that being moved by properly lag-compensated entities will work smoothly in 267...
  • deathshrouddeathshroud Join Date: 2010-04-10 Member: 71291Members
    edited June 2014
    if it does work smoothly i would love to add an elevator to my level, will elevator entities be added to the engine offical if it does work? or will it remain a mod?
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    @matso is there a way for me to test it out now?
  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    Yea. Become a playtester, the fix is active in the playtest build :-)

    Seriously though, do apply.

    https://docs.google.com/spreadsheet/viewform?formkey=dEVyVlRkUDRibHNXQWM2MHFXWXBwVkE6MQ#gid=0
  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    OK give it to me, now!
    :-)
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    matso wrote: »
    Well, those buckets are a bit of fake - I think the server and client don't really keep those in sync properly - they are probably not lag-compensated or something. So they will still suck in 267. Making them work properly is a future project...

    However, I hope that being moved by properly lag-compensated entities will work smoothly in 267...

    I think they should just be taken out and replaced with static props.
  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    Can confirm that the jitter is gone, bw (at least from my experimental EnvironmentMove mod).
    So you should be able to have smoothly working Elevators/Trains again.

    Though unfortunately, NS2 movement lacks momentum - if you are standing on a moving train and jump straight up, you don't move with the train while in the air.

    Can be fixed though, just needs to rewrite all the NS2 movement code... *urk*... :-)
  • matsomatso Master of Patches Join Date: 2002-11-05 Member: 7000Members, Forum Moderators, NS2 Developer, Constellation, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Shadow, NS2 Community Developer
    And yea, those buckets in refindery .. they are part of a cinematics, which basically just plays up a predefined, non-lag compensated sequence of movements.

    You CAN turn on physics for the objects in the cinematic, but because they are not lag-compensated, you will get instant client/server desync if you touch them ... which results in a lot of shuddering and jittering.

    Which is why physics was turned off for them.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    matso wrote: »
    And yea, those buckets in refindery .. they are part of a cinematics, which basically just plays up a predefined, non-lag compensated sequence of movements.

    You CAN turn on physics for the objects in the cinematic, but because they are not lag-compensated, you will get instant client/server desync if you touch them ... which results in a lot of shuddering and jittering.

    Which is why physics was turned off for them.

    Actually, for whatever reason, the buckets in smelting are a prop animation, rolled into a cinematic... I guess so that the bucket pouring animations can have the appropriate particles accompanying them?
  • Dictator93Dictator93 Join Date: 2008-12-21 Member: 65833Members, Reinforced - Shadow
    I want level elevators so badly. Thanks for the fix matso.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    matso wrote: »
    Can confirm that the jitter is gone, bw (at least from my experimental EnvironmentMove mod).
    So you should be able to have smoothly working Elevators/Trains again.

    Though unfortunately, NS2 movement lacks momentum - if you are standing on a moving train and jump straight up, you don't move with the train while in the air.

    Can be fixed though, just needs to rewrite all the NS2 movement code... *urk*... :-)

    all you have to do is keeping track of the velocity of the platform you are on and once you leave it, just add the platforms velocity to the player. PlatformMoveMixin.lua ! :P
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Smelting buckets work just fine if they are a dynamic prop, full collision and you can cling to them
  • kmgkmg Join Date: 2008-02-28 Member: 63758Members
    hey @SamusDroid just out of curiosity (and i realize this is a random place for it) but why can't the player customization menu be done with cinematics instead of in-game characters? is it the interactivity of being able to rotate them around? i don't know too much about how cinematics work :P
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited June 2014
    Because you'd need over 50 cinematics..
  • DarakianDarakian Join Date: 2004-09-03 Member: 31233Members
    This is awesome. I'd love to see a return of elevators and weld points! :D
  • CarNagE1CarNagE1 Poland Join Date: 2003-05-14 Member: 16298Members, NS2 Playtester, Reinforced - Shadow, WC 2013 - Supporter, Subnautica Playtester
    edited July 2014
    That would be great if this would be implemented to ns2. JimWest did this more then a 1.5 year ago, but no one picked it.

  • UncleCrunchUncleCrunch Mayonnaise land Join Date: 2005-02-16 Member: 41365Members, Reinforced - Onos
    edited July 2014
    This is not particular to ns2.

    All games had this issue. The main issue reside in the fact that the elevator is moved by the server and all clients have to synchronize with this information. same for cars and other buckets. The best i saw was in GTA. But it s far from perfect.

    1 obvious lag problem
    2 side effect of lag would be some programmed behavior like gravity. Example: when the elevator goes down a little fast and lag is too high it creates a situation in which the player character lands constantly on the ground while the feet should never leave the floor.

    Apply a constraint never really works for many reasons like:
    *It doesn't remove the lag issue
    *It forces to write some dedicated Code applied through an entity (most of the time)
    *Hit detection has to function when the elevator is moving. At least look real.

    I believe OP results are ok for now as it's not supposed to be implemented in the game in the first place (also commander view issues).

    Maybe make it a box like a real elevator with doors would allow to isolate and to glue the player on the elevator platform.

    But that s a bargain. Smooth animation vs action in game etc..



    edit damn mobile phone.








  • JimWestJimWest Join Date: 2010-01-03 Member: 69865Members, Reinforced - Silver
    SO is it fixed now? I shortly tested it with my old extra entities mod but doesnt seem like anything has changed ?
Sign In or Register to comment.