1. The BeamNG Team wishes everyone Happy Holidays!
    BeamNG team presence will be limited during the holiday season as we take the time off to rest and enjoy the holidays!
    There will be no mod support or mod approvals from 23rd of December until 6th of January. Please expect delays during this period.
    We hope you enjoy the holidays too, see you in 2025!

WIP BeamNG.drive Multiplayer (BeamNG-MP) (Formally "Local Multiplayer (Lua based)")

Discussion in 'Programming' started by [YTGN] | Titch2000, Jun 18, 2019.

  1. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    2,015
    Well, looks like single computer splitscreen multiplayer is more difficult than multi computer connection multiplayer.
     
  2. [YTGN] | Titch2000

    [YTGN] | Titch2000
    Expand Collapse

    Joined:
    Jun 16, 2019
    Messages:
    59
    I see you found that. It was decided to keep to unannounced for the time being to reduce potential excitement before we have it at a point we are happy to let it loose. However i did after that recording find that i had vehicle collisions turned off :/ But yes that is my video, yes it is laggy at the moment however as you have already said it is progress and we are making new steps and break through's at a good pace. just keep in mind that those of us working on this are holding down jobs, families, studies and so on. So please keep being patient. You will be told about this when we are ready.
     
    • Like Like x 12
    • Agree Agree x 3
    • Informative Informative x 3
  3. _Tanco

    _Tanco
    Expand Collapse

    Joined:
    Jan 7, 2017
    Messages:
    247
    Don't be afraid of hype in this forum, most of us are really patient (in reference to some mods who are in WIP since many years) and we always keep in mind that if a mod isn't released in the forum/repository it can be scrapped at every moment and never be released ;). This makes me think... how many peoples works on this mod :confused: ? I hope you will be able to make something the BeamNG team didn't managed to do :D (as gamergull did with traffic !)
     
    • Agree Agree x 1
  4. [YTGN] | Titch2000

    [YTGN] | Titch2000
    Expand Collapse

    Joined:
    Jun 16, 2019
    Messages:
    59
    There are 2 of us working to make this happen bouncing off each other find solutions to it.
     
    • Like Like x 2
  5. NGAP NSO Shotgun Chuck

    NGAP NSO Shotgun Chuck
    Expand Collapse

    Joined:
    Mar 6, 2015
    Messages:
    1,435
    You guys get this done and Assetto Corsa will be sweating. It's pretty much certain that on-the-fly refueling (i.e. pit stops) will become a thing at some point, and the devs are feverishly working on AI as well, so racing is definitely in the plan. Plus, even if BeamNG's nighttime simulation isn't the best, it at least doesn't need janky shader hacks to simulate more than one light source.

    What I'm saying is, this mod and a few decent-quality real car mods will eventually be enough to render other racing simulators completely obsolete and irrelevant.
     
  6. ManfredE3

    ManfredE3
    Expand Collapse

    Joined:
    Jan 9, 2016
    Messages:
    2,426
    Considering how much of the less mature forum population wants multiplayer I think Titch's caution is well advised...
     
    • Agree Agree x 4
  7. ImadPotato

    ImadPotato
    Expand Collapse

    Joined:
    Oct 27, 2015
    Messages:
    88
    isnt there a way to make multiplayer into online? a simple camera modification could create two cameras to create a split screen, then the second player can wirelessly connect or something from their own station while spectating the host's pc monitor. am i missing something here?
     
  8. 98crownvic

    98crownvic
    Expand Collapse

    Joined:
    Jul 14, 2016
    Messages:
    1,525
    All the physics. That would be difficult to pull off.
     
  9. default0.0player

    default0.0player
    Expand Collapse

    Joined:
    Nov 30, 2018
    Messages:
    2,015
    From the OP's progress we can conclude that Local Multiplayer is easier than Spiltscreen Multiseat, the reason is yet to known. Just don't hype it, BeamNG.drive is totaly OK with single player.
     
    • Like Like x 1
  10. CN877

    CN877
    Expand Collapse

    Joined:
    Jun 27, 2017
    Messages:
    1,465
    Lets just say the the two developers of this multiplayer mod live in different countries yet are still able to play with each other.... :rolleyes:
     
    • Agree Agree x 3
  11. ManfredE3

    ManfredE3
    Expand Collapse

    Joined:
    Jan 9, 2016
    Messages:
    2,426
    They buy a plane ticket whenever they want to play BeamNG? That sounds expensive.
     
    • Agree Agree x 1
  12. [YTGN] | Titch2000

    [YTGN] | Titch2000
    Expand Collapse

    Joined:
    Jun 16, 2019
    Messages:
    59
    Unfortunately the way the game works this would be extremely difficult to pull off due to the way that cameras work. not to mention the game play quality would be heavily intensive on the host and their machine. Neat idea though.

    No we do not buy plane tickets to play. we have since found ways to make the multiplayer work over the internet so not just local though you do get the choice :p . I have a dedicated server in Helsinki which i can play multiplayer over and things run quite well. In the video you have found the game session was hosted on the other player who was in France. I'm in the UK and was running over a VPN in the US at the time.
     
  13. jojos38

    jojos38
    Expand Collapse

    Joined:
    Oct 22, 2013
    Messages:
    1,066

    It is not a split screen playing, it is two different game running on one computer
     
    #93 jojos38, Sep 18, 2019
    Last edited: Sep 18, 2019
    • Like Like x 7
    • Informative Informative x 1
  14. Nothy

    Nothy
    Expand Collapse

    Joined:
    Jul 2, 2016
    Messages:
    14
    I think a neat solution to the lag would be to interpolate player positions if they're not too far off from their position on the server. Should make the simulation far smoother!
    More information here (stackexchange.com)
     
    • Informative Informative x 2
    • Like Like x 1
  15. [YTGN] | Titch2000

    [YTGN] | Titch2000
    Expand Collapse

    Joined:
    Jun 16, 2019
    Messages:
    59
    Very good idea! Thank you for the input! I have experimented with this a very small amount in that i use the throttle and steering values and send them too which are used to fill in the gaps without the updates. However as im writing this now it has just come to me where i might have been going wrong with this. I have not been continually applying the inputs which means it might be only applying once instead of continuously so i will go back and try constant application instead!

    Thank you for the input! I will try this tonight when i get in about 2300!
     
    • Like Like x 3
  16. crashmaster

    crashmaster
    Expand Collapse

    Joined:
    Aug 4, 2013
    Messages:
    1,819
    Ive got a question since you seem to have quite a bit of experience in the subject.
    What is SOOOOoooooooo complex in adding a 2nd camera?
    The reason of "the way the game works" blah blah blah seems like complete bullshit to me.
    If games from the 1990's can incorporate split screen on hardware 1/128 the force of the current pc, why is this an issue?
    I know not one software is coded the same and theres a lot of detail in the backend for stuff to work. but cmon.
    Have you taken a look at any of the call of duties? from BO3 to the latest i think theres a splitscreen that works flawlessly. and that game is heaaaavyy on graphics.

    I can run beamng 2, even 3 times simultaneously and it runs fine.
    What. Is. So. HARD..........

    Is it just the devs not wanting to spend time coding the backend to make the controllers work with x and y camera?
    Half, if not 3/4 of the engine has been rebuilt in-house by the devs. i mean, stuff can be incorporated with hard work. (duh)
    If someone can explain this better it would be appreciated. because seriously im getting tired of the same boring excuse "due to the way the game works"
    Lazy way to say it.

    Sorry if the way i worded things makes it sound rude, its not the intended way. but im a bit fascinated by learning how things works and this splitscreen topic and been picking my curiosity for quite some time.
    You working on a mp version of this game is already a miracle in itself because of the node calculations, but even that is doable somewhat.
    Seeing how multiple games does have a working split screen. It is doable with a lot of work. but since its kinda a high in demand feature, would it make it worth it?

    Whats so tricky with the way that beamng works?
     
    • Agree Agree x 1
  17. Littleturdlet

    Littleturdlet
    Expand Collapse

    Joined:
    Feb 12, 2017
    Messages:
    239
    I found this on the Garage Games forums: http://www.garagegames.com/community/forums/viewthread/63943
     
  18. atv_123

    atv_123
    Expand Collapse

    Joined:
    Aug 5, 2012
    Messages:
    1,712
    I too went searching for this information... and over and over again I just kept ending back up at this guys post. He seems to be the one person that claims to have actually gotten it to work, and for some reason it really genuinely seems to be just as difficult as everyone said.

    To me it almost sounds like it would be easier to completely rewrite the entire Camera system to make split screen easier than to actually implement it as it currently is... which is super strange. I don't know why they would have made it so darn difficult, but apparently they have.
     
  19. [YTGN] | Titch2000

    [YTGN] | Titch2000
    Expand Collapse

    Joined:
    Jun 16, 2019
    Messages:
    59
    Hello @crashmaster and thank you for your input. Don't worry despite the way that it does read i understand your frustration and can understand how the wording can come across the wrong way so do not worry.
    As for split screen the trouble is that the documentation for BeamNG is a bit sparce and i have next to no experience with the torque engine, so playing with these is for me is almost never going to happen. As for playing with cameras within lua, it comes back to the same issue of lacking documentation. So to explain this a little more; When creating the two points of view you will either have to have two areas for the two cameras to render to (traditional split screen) or you can render the two cameras to two separate windows (like when you run the game twice). The trouble with this though is trying to work with a system that has very few details for me to work with. The UI for BeamNG is all done in HTML + CSS which and from what i can see the game is rendered to a layer behind this and seems to always be running and the UI just hides and shows its self when needed. this means to control this window to resize, move and reposition it is going to be hard to do due to it being the main window for the game.
    Now to why it will be hard for two separate windows; To run the game in two separate windows one of them will still have to be the master one, the main process that does all the game stuff and the other will serve only to show you what is happening. Now this might seem simple in the way i have said that but the hard part is sending the real time camera data to the other window and having that render in real time without any delay between the two windows and you also have to find a way to send that data between them. On a high end machine this is going to be easier to achieve but on lower end machines this will be much more tricky due to the constant additional processing that will have to be done to keep the two windows synchronised.

    These are the reasons why i have not and likely will not try to do a split screen approch. You have to keep in mind that yes it is just a game and why cant you just add this or that however there are many layers to the game for example; we have a Cef (Chromium) browser for the front end, Torque3D for the game engine, Game engine LUA, Vehicle Engine LUA, Beam Engine Lua and probably some more too that i am forgetting or not aware of yet. The game is made up of lots of components for games like CoD these ideas or split screen and multiplayer are built into them from the start which means they have made sure that the engine in this case Torque3D is capable of it. The way that i am making this multiplayer work is im using the Lua engines together to get various bits of information from the game and then im sending this data to all the clients via a server. Though this will obviously cause some lag and delays there is nothing that can be done as this is something that really needs to be done and heavily integrated into the game its self. You dont go to the 5th floor of a hotel to talk to reception, however in this case im only able to access the 3rd floor for example. its close to it on a top level but it isn't there yet.

    Either way i hope this helps you understand why and as you said too i hope you take this the right way nothing harsh or what not intended. :)

    Titch
     
    • Like Like x 3
    • Informative Informative x 2
  20. hubert2005 kam

    hubert2005 kam
    Expand Collapse

    Joined:
    Jan 27, 2018
    Messages:
    95
    whats the progress of it
     
  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