UI apps networking?

Discussion in 'Programming' started by gigawert, Jul 19, 2017.

  1. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    I am actually laying down the framework for a very big, fun project called Beam.trader which is a site that will let you buy and sell other player's vehicles, and tracking the status of the cars you own through a UI app. (Before you ask, yes, I actually know specifically what I am going to do as this is also a learning project for me to practice HTML/CSS and Javascript I'm learning)

    I would like to know if it is possible to upload and/or manipulate files on my own web server in a UI app? Thanks.
     
  2. EruptionTyphlosion

    EruptionTyphlosion
    Expand Collapse

    Joined:
    Sep 24, 2016
    Messages:
    2,927
    I'm not sure how this works, but I'm pretty sure this is possible as BeamNG supports in game IRC chat.
     
  3. Ezo

    Ezo
    Expand Collapse

    Joined:
    Jan 11, 2016
    Messages:
    877
    For this trader you would need to upload the vehicle.save.json files from each user, you know this, right?
     
  4. EruptionTyphlosion

    EruptionTyphlosion
    Expand Collapse

    Joined:
    Sep 24, 2016
    Messages:
    2,927
    No, wouldn't it be the .PC files?
     
  5. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    Unless I can access the current .PC file through the UI app I will have to leave it up to the user to upload it.
     
  6. Ezo

    Ezo
    Expand Collapse

    Joined:
    Jan 11, 2016
    Messages:
    877
    Nope, when you save your damaged car thru the radial menu, it creates a folder in documents/beamngdrive/vehicles and it creates a folder with vehicle name with the vehicles.save.json file, if you remove it, it will not load anything when load button in radial menu is pressed, if you put it back, it will load the damaged car
     
  7. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    Oh, I forgot you could save damage, that simplifies a lot.
     
  8. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    network communication is not allowed as the whole thing runs in a sandbox. There are some exceptions for BeamNG services
     
  9. EruptionTyphlosion

    EruptionTyphlosion
    Expand Collapse

    Joined:
    Sep 24, 2016
    Messages:
    2,927
    Runs in a sandbox? Why is it not allowed? Could you specify?
     
  10. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    But didn't the multiplayer mod utilize UI apps?
    --- Post updated ---
    Is creating/reading/writing files on user's hard drive possible?
     
    #10 gigawert, Jul 19, 2017
    Last edited: Jul 19, 2017
  11. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    For security reasons.
     
    • Informative Informative x 1
  12. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
    from JS? i dont think so.
     
  13. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
  14. tdev

    tdev
    Expand Collapse
    Developer
    BeamNG Team

    Joined:
    Aug 3, 2012
    Messages:
    3,031
  15. StinchinStein

    StinchinStein
    Expand Collapse

    Joined:
    Jul 16, 2014
    Messages:
    754
    Just curious, is it not a security problem that you can read/write using the Lua side of the game? As that is entirely possible.
     
    • Agree Agree x 1
  16. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    So is there any other way for the game to communicate with a remote server or at least a local file?
     
  17. EruptionTyphlosion

    EruptionTyphlosion
    Expand Collapse

    Joined:
    Sep 24, 2016
    Messages:
    2,927
    Possibly, as Chris Lucas did with the multiplayer mod, but I'd suggest, for a project like this, an RP thread with attached .json files. Any communication between the game and servers seems to be blocked.
     
  18. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    That was exactly why I wanted to create a real website for this, it would be better if there was something that automatically kept track of stuff like that in a server including overall mileage.
     
  19. EruptionTyphlosion

    EruptionTyphlosion
    Expand Collapse

    Joined:
    Sep 24, 2016
    Messages:
    2,927
    Is overall mileage included in the json?
     
  20. gigawert

    gigawert
    Expand Collapse

    Joined:
    Sep 6, 2015
    Messages:
    2,029
    No but I want to write a UI app that keeps track of that as part of its purpose.
     
  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