How multiplayer should work (with pics!)

Discussion in 'Ideas and Suggestions' started by NaxNir, Oct 3, 2014.

  1. NaxNir

    NaxNir
    Expand Collapse

    Joined:
    Jan 28, 2014
    Messages:
    618
    I had an idea on how multiplayer should work. The type of multiplayer I'm talking about is where a server hosts a map and clients can connect to it (with inter-vehicle collision).

    The server will request a client to load a map, if the client doesn't have the map it will download from the forums (similar to Garry's Mod).

    So the idea is the way the crashing will work: "basic location data of parts" are sent to the server and then the client(s) receive it and do the more advanced crash physics. so look at FIG2 & FIG5 and, you can see that the basic location data of each part is very 'low poly' (is that the right phrase?). Ex. the car crashes into a wall head on, DOT2-1 & DOT2-2 will be pulled back to the left, and DOT5-1 & DOT5-2 will be pushed left aswell. So the client will do: ah! the car must have crashed at X speed, head on (because the nodes are both moved back about the same amount) and then the client will do the more advanced crashing based on the more basic location data the server provides (the client will do the intricate bending as it is in single-player).

    If any player is more than 100 meters from other players then it will only send the "location data for the middle of the chassis (with rotation data aswell)". If player X is 100 metes from player Z than the server will only send player Z's "location data for the middle of the chassis (with rotation data aswell)" to player X.

    So here is my idea, if you think it's good, leave a thanks!

    Images:

    FIG2:
    fig2-side.png

    FIG5:
    fig5-top.png

    Some other images:
    fig1-front.png fig3-back.png fig4-under.png
     
    #1 NaxNir, Oct 3, 2014
    Last edited: Oct 3, 2014
  2. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,082
    actually, i could see that working, and would certainly eliminate the main problem: sending thousands of nodes and such over the internet to other peoples pcs
     
  3. hyper320

    hyper320
    Expand Collapse

    Joined:
    Feb 19, 2014
    Messages:
    1
    he just want to send about 50 possible broken nodes to the server, which sends it to all clients. With all the location data the client calculates the "real" damage nodes internal

    for my opinion it's a good idea to heavily reduce the node amount for multiplayer, the only problem is that the performance is at the moment very poor with multiple cars crashing at the same time (because no GPU is used)
     
  4. Davidbc

    Davidbc
    Expand Collapse

    Joined:
    Mar 20, 2013
    Messages:
    1,333
    I don't know how sending data over the internet works on an online game, but if I put every single node/beam in a .txt file I'm pretty sure it will just be a few kb.
     
    • Like Like x 1
  5. randomshortguy

    randomshortguy
    Expand Collapse

    Joined:
    Aug 9, 2013
    Messages:
    1,562
    Yes, but a few kilobytes over at 2000 times a second. Multiplied by how many other cars on the server. Plus other things, like material status (headlight broken or not), and prop rotations, etc.

    You'd end up sending around (assuming a fairly complex jbeam plus paramaters times 5 other cars) ~ 50,000kb over the internet per second. Latency and server load would be a huge issue.


    @OP Totally support this idea or something like this
     
  6. gmaksi83

    gmaksi83
    Expand Collapse

    Joined:
    Aug 5, 2013
    Messages:
    348
    I think this is the best way to do multiplayer, with minimal N/B and the game control the car location same method like the trigger....
    example car, but this have to much N/B i think enough 12 node and maybe 4 to the wheel node...and so on....or cube method for fast multiplayer:D
    screenshot_00019.jpg screenshot_00020.jpg
     
  7. NaxNir

    NaxNir
    Expand Collapse

    Joined:
    Jan 28, 2014
    Messages:
    618
    My laptop can support 4 cars at the same time without any lag (look at my signature for specs), it would be fine for small servers, but no big ones. Also it would be very dependent on the clients hardware.
     
    #7 NaxNir, Oct 4, 2014
    Last edited: Dec 22, 2014
  8. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,082
    Provided that clients could sort the server list by max people per server, then cpu performance shouldn't be too much of a problem provided people stay within reason for there cpu

    Sent from the 3rd galaxy via the talks of tapping
     
  9. Dummiesman

    Dummiesman
    Expand Collapse

    Joined:
    Sep 17, 2013
    Messages:
    4,683
    This is how it should work.

    Clients connected to the sever will only send position and rotation data. Unless

    a) A beam deforms
    > In this case the server will get the message from the client that a beam has deformed, and the server will echo that message to all connected clients
    b) A beam breaks
    > Same as above except with beam breaks

    Local clients could handle the texture changes and such. You wouldn't have to send 'thousands of nodes' anyways, because that's why the client also has the vehicles installed .
     
  10. logoster

    logoster
    Expand Collapse

    Joined:
    Sep 5, 2012
    Messages:
    2,082
    Dummies, the point of sending thousands of nodes wasn't so that people would also have the car, but so their pc knew what other peoples cars jbeam status was

    Sent from the 3rd galaxy via the talks of tapping
     
  11. tegleg

    tegleg
    Expand Collapse

    Joined:
    Oct 5, 2014
    Messages:
    10
    shouldn't everything be handled on the server?
    with clients approximating damage ect from a minimal data packet. eg these 2 cars (rotation, location) crashed with this force in this direction.
    the server knows what happened and can send updated information on the car state ect when there is some spare bandwidth, within a reasonable timeframe.
    clients and server will of course have differences but at least you would be able to smash up someones car online.
    job done.
     
  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