Idea for/Question about BeamNG over the internet.

Discussion in 'Ideas and Suggestions' started by skyliner_369, Oct 16, 2017.

  1. Spiicy

    Spiicy
    Expand Collapse

    Joined:
    Sep 8, 2016
    Messages:
    3,798
    thats not a bad theory. who knows maybe the devs will surprise us , it also does not seem that hard as long as your pc can run 2 cars well, and stream somewhat to another computer
     
  2. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,445
    Dev's are already working on multiplayer, im someone who likes to scavenge through gamefiles to find unused stuff.
    The devs are going to use the replay function for multiplayer, kind of like recording your car and sending the data live over to other pc and replaying it there.
     
    • Agree Agree x 3
    • Informative Informative x 1
  3. Funky7Monkey

    Funky7Monkey
    Expand Collapse

    Joined:
    Oct 12, 2014
    Messages:
    977
    IIRC, it works by sending the car's position and rotation, and resetting it in each new position. It's extremely crude, but the only way I can think of to have it as a mod.
     
    • Agree Agree x 4
    • Informative Informative x 1
  4. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,711
    So that is how they are going to do it... basically history repeating itself I suppose. Way back when the replay system was first added to Rigs of Rods there was speculation as to how it would be used in multiplayer, then about a year (or perhaps it was 2) later we got multiplayer and that's exactly how it worked. Whatever data the replay system gathered was then transmitted to the server and distributed likewise. It seems like it would be a lot of data, but, and this is a quote from Tdev, "The data stream is highly compressible." (that was said about 7 or 8 years ago, so that might not be word for word, but that's basically what he said)

    The hardest part was never transmitting the vehicles, or even the damage, however... it was always the vehicle to vehicle collision system. In Rigs of Rods, Multiplayer collision was buggy at best when it was added and working. I suspect that is because of the fact that it would be damn near impossible to transmit the collision data at the 2000 cycles per second that the collision needs to be computed at. This would require a complicated solution of either smoothing or data compression to make it work properly...

    Then there is the possibility of vehicle to vehicle connections... don't even get me started on how bad that used to be... never mind how hard it would be to implement.
     
    • Informative Informative x 1
  5. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,445
    Heres collision fixed, might not be best but should work good enough.
    With this system cpu would only require to load one jbeam meaning servers with unendless amounts of players until your gpu gives up.
    leaks.png
     
    • Informative Informative x 3
    • Agree Agree x 1
  6. Standard

    Standard
    Expand Collapse
    Banned

    Joined:
    Dec 20, 2016
    Messages:
    302
    Here we go again with this fuckery.
     
  7. Rainvest

    Rainvest
    Expand Collapse

    Joined:
    Dec 26, 2014
    Messages:
    1,906
    So what about suspension and stuff like that? That stuff is always deforming.
     
    • Agree Agree x 1
  8. chris_lucas

    chris_lucas
    Expand Collapse

    Joined:
    Dec 12, 2012
    Messages:
    1,445
    you can ignore that same as dummiesman regenerator tool ignores that if thats a problem.
     
    • Informative Informative x 3
  9. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,711
    While in theory that would work, I fear that it would also pose the exact same problem (just manifesting itself differently) as doing collisions the normal way the game computes them. Plus, the devs have done tons of work perfecting this collision system for single player, so I think Estama would eat his hat if they made him do collisions this way for multiplayer.

    As far as the collisions are concerned, remember when crash welding was a really common thing in Beam? Well that's how the collisions in Rigs of Rods multiplayer were, only about 100 times worse... You could collide with someone, but you would also phaze half way through them in the process. This of course just ended up making a huge mess of cars that couldn't move, especially on the spawn point as they would all spawn in at the same point. It doesn't take much imagination to see how ugly that can end up being. That is what lead to its ultimate removal, because no good solution could be found (yet).

    Basically, it's the exact same problem that used to cause crash welding. In the main game, the vehicle is being updated at 2000 cycles/second. This is very good for these types of collisions because this means that for each time step, there is very little positional movement. It is not ideal, however. This is because the Nodes have infinitesimal volume, and the collision triangles have infinitesimal thickness. This means that, in theory, to perfectly detect a node on triangle collision at any closing velocity, you would need infinite cycles/second physics steps for it to work.

    Well, naturally, we don't have that... we can't even conceivably get close to it (unlike what another user in another multiplayer thread was trying to illude too) so instead we are stuck at 2000 cycles/second. This means that every time a node or collision triangle is updated, they basically jump a very small distance to their new position without ever existing at any point in between. This means that if the closing speed is high enough on our node and triangle (or you just line it up way to perfectly on accident) a node can be repositioned, in one time step, on the wrong side of a collision triangle.

    That, ladies and gentlemen, is crash welding in a nutshell. Everyone here might have known all that already, but I figured I would explain it for anyone who didn't.

    Now... moving on to multiplayer... you can easily see where this would be the bane of the team... We would be lucky if we could get even 100 vehicle updates from our second player, nevermind 2000 in a single second. This is where the collision system gets all loopy. Seeing that they have fixed the main game's collision system (Fantastic work by the way dev's) by (I believe) giving the collision triangles an artificial thickness of sorts, this gives me hope that the multiplayer collision issue might just be to add to that system (on a much more extreme scale) and implement a special data smoothing algorithm to keep things like lag cannons from happening or connection drop outs... I get it that it's just funny sometimes in Forza, but in this game you would be lucky if you even had a couple of lugnuts left of both vehicles after something that violent happens.

    At least this thread has just become a friendly discussion and not turned into a war though... you have to admit that seams like a rather rare and welcome thing compared to how most other multiplayer threads go.
     
    #29 atv_123, Oct 19, 2017
    Last edited: Oct 19, 2017
    • Agree Agree x 2
  10. skyliner_369

    skyliner_369
    Expand Collapse

    Joined:
    Nov 4, 2013
    Messages:
    40
    Or we could forego this whole system using interpolation and throwing the j-beam structures at each other locally and correcting the deforms after for the second player (the one you're not driving) with the data they send you, and you'll send data to them for them to correct your car.
     
  11. Funky7Monkey

    Funky7Monkey
    Expand Collapse

    Joined:
    Oct 12, 2014
    Messages:
    977
    That's impossible right now. The engine has no way to receive jbeam data like that. Maybe in the future it will, maybe not.
     
    • Agree Agree x 1
  12. skyliner_369

    skyliner_369
    Expand Collapse

    Joined:
    Nov 4, 2013
    Messages:
    40
    the engine does know how to recieve jbeam data. You do it EVERY TIME YOU WATCH YOUR REPLAYS.
     
  13. Pervin.M

    Pervin.M
    Expand Collapse
    Banned

    Joined:
    Aug 26, 2016
    Messages:
    219
    Devs are capable of making anything in BeamNG,but some of them are really time consuming,so it's not in their short term priorities right now.Their biggest priority is to optimize game for lower spec computers.Maybe in the future,but not right now.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice