Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Master Server Framework

Discussion in 'Assets and Asset Store' started by alvyxaz, Sep 11, 2016.

  1. neounix

    neounix

    Joined:
    Jan 9, 2017
    Posts:
    28
    Hey Barebones!

    I'm currently working on a cybersecurity application where we create and manage game objects on a LAMP server, storing all the objects in MySQL via PHP. Then, we use cron to dump the objects in MySQL our MySQL table to a JSON file and bulk import this into Unity with a C# web call to the PHP script on the server. This works OK, but if it far from ideal, as we don't want to import the entire huge JSON file with 100 of thousands of objects each time a new object appears in the LAMP MySQL DB.

    We prefer to push the objects from the LAMP server to our Unity clients as they are created or modified on the LAMP server, without initiating the update from the Unity clients (the games). Does have the Master Server Framework have built in code to push server updates to the client (the Unity game). We were looking at using sockets and writing all of this code, but then I did an Asset store search and found your Master Server Framework.

    Is this "push from the server to the game-client" a built-in service provided in the Master Server Framework?

    Sorry, I'm not nearly as good at Unity programming as I should be!

    Just in-case it helps, some details on our Unity cybersecurity app we are building are available here on ResearchGate.
     
  2. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    256
    In case nobody else answers thist, I'm giving it a go.
    I don'tt think any of the built-in systems will do exactly what you want right out of the box, but MSF could be the basis of that you're trying to do. It really is a framework. The big gotcha is that it really assumes the DB will be in the same place as the master server.
     
  3. neounix

    neounix

    Joined:
    Jan 9, 2017
    Posts:
    28
    Thanks for your reply!

    So far, I have tried using .NET sockets, but that seems too low level because I will need to write all the Unity code myself to make this happen. Then I tried the OOTB UNET (NetworkManager w/HUD) stuff, but I'm having trouble debugging client - server because I cannot get the clients to talk to the server for debugging except when they run on the same machine. However, I need to clients and servers running on separate machines on the same LAN segment so I can debug in the Unity editor; and I cannot get this working on a WIFI LAN segment in my lab, even though I tried Unity NetwordDiscovery and every English speaking UNET tutorial on YouTube, LOL

    I may try Photon (the free version of PUN), etc.

    It's confusing why Unity makes multiplayer so difficult and restrictive and why Unity makes debugging a simple UNET client server test on the same LAN so hard. I cannot find one working example anywhere on the net! LOL
     
  4. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    399
    I am using a linux server where i run masterserver but when i launch spawner in a different process and try to connect masterserver it tells me spawner is not connected and dont understand why, i use the ConnectToMaster script in Spawner with ip 127.0.0.1. I am using arguments to start masterserver and spawner and spawner waits is connected to master to spawn the server using OnConnectedToMaster listener, but it never connects
     
  5. MageHigh

    MageHigh

    Joined:
    May 18, 2017
    Posts:
    1
    ok i have downloaded htis asset and have been ripping thru it i have tryed several differnet ways and i can not find any info. i want to make a zone based game from the worldzones example but i can not seam to correctly regeaster the rooms and then connect to them from client
     
  6. PyroStudios

    PyroStudios

    Joined:
    Sep 23, 2012
    Posts:
    233
    Hello! this seems like a wonderful asset!

    I just had one question. I understand majority of this setup is written on top of UNET which is fine. But I was curious if my actual game server that is spawned could be written in something else... like Bolt Networking?

    I don't mind UNET handling the master server and communicating with other modules in the system... but I would like my actual spawned gameplay server to use Bolt. Is that possible with this framework?

    I would even be fine sending Bolt events to some abstraction layer and communicate with your framework that way also if it is possible.
     
  7. angusmf

    angusmf

    Joined:
    Jan 19, 2015
    Posts:
    256
    Yes, you can do the game networking however you like.
     
    recon0303 likes this.
  8. Narmer

    Narmer

    Joined:
    Mar 5, 2014
    Posts:
    18
    I ran into a problem with Profiles module.
    When retrieving data of a user and the game server asks for it, it works.
    But when client is trying to get the data from master server, I get only default values, profile is not filled with server saved values.

    Has anyone experienced such problem?
     
  9. AjaxTheOne

    AjaxTheOne

    Joined:
    Nov 17, 2016
    Posts:
    1
    Hello!

    I ran into a problem when I was messing around with the QuickStart example. I was trying to add my own factory (in addition to the other 4 that are already in there), and I kept getting an error "Failed to create lobby: Unavailable lobby factory (Factory: FactoryName)".

    So, I searched in the files for a place to register my factories, and I actually found the DemoLobbyFactories.cs with all the forementioned factories. I made a copy for my custom factory, added teams, max & min players etc. But the problem was still there, my factory was unavailable.

    I also tried to add the factory via the script DemoFactoriesSetup.cs in RoomsDemo (I don't know if it has any connection with the QuickSetup one), and the again my factory was unavailable. I even tried to comment out all other factories, in DemoLobbyFactories.cs and DemoFactoriesSetup.cs, to see if the QuickSetup is still working, and it was indeed working!

    So, my question is, where I can add my factories (like, where is the .cs file that I need to modify, in order to add more factories) and where can I load them in a LobbyModule, when I run the game?

    Any help is appreciated!
     
  10. janne404

    janne404

    Joined:
    Jul 26, 2009
    Posts:
    15
    Using the unet gameroom examples, what would be a good way to end the game for a specific player and just remove him from the current gameroom?

    In my test, a spawned server runs the game logic and is responsible of ending the game for each player. Now I end the game for a specific player by disconnecting him using Network identity and connectionToClient.Disconnect(); so he is returned back to the connection scene. But I doubt it is the best solution?
     
  11. SOBRECO

    SOBRECO

    Joined:
    Mar 7, 2016
    Posts:
    2
    Hello,

    Is there a forum dedicated to development help ? Because, I have a problem, and I do not know where I can get help.

    I created a scene based on the connection, and I used the script "LoginUI" that I modified, except that once I entered the information and press the connection button, I hit the main menu, but every time I want to create a game, an error message tells me that I'm not connected ...
     
  12. DavidLieder

    DavidLieder

    Joined:
    Feb 14, 2016
    Posts:
    82
  13. Ang_Otinsoft

    Ang_Otinsoft

    Joined:
    Aug 31, 2018
    Posts:
    1
    Hey, so i need to connect to a socket with an url how can i do it?
     
  14. taciturnsays

    taciturnsays

    Joined:
    Mar 12, 2016
    Posts:
    18
    Good evening, neither unity asset package or the github repository on import works.
    It displays 6 errors all of wich says
    WebSocketSharp.WebSocket is defined multiple times
    I’m using unity 2018.2.8f1 anyone else having the same issue?
     
  15. DavidLieder

    DavidLieder

    Joined:
    Feb 14, 2016
    Posts:
    82
    Looks like this asset/framework is abandoned.
     
  16. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    192
  17. ratxrat

    ratxrat

    Joined:
    Nov 7, 2016
    Posts:
    19
    i got this error
    Code (CSharp):
    1. Assets/Barebones/Demos/MiniGame/Scripts/MiniNetworkManager.cs(34,23): error CS0117: `NetworkServer' does not contain a definition for `AddPlayerForConnection'
    2.  
    3. Assets/Barebones/Demos/Common/Scripts/UnetGameRoom.cs(77,23): error CS0117: `NetworkServer' does not contain a definition for `RegisterHandler'
    i use unity 2018.2
     
  18. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    888
    the discord invite link doesn't seem to work anymore..
     
  19. blacksun666

    blacksun666

    Joined:
    Dec 17, 2015
    Posts:
    192
  20. Aevien

    Aevien

    Joined:
    Mar 26, 2011
    Posts:
    72
  21. Aevien

    Aevien

    Joined:
    Mar 26, 2011
    Posts:
    72
    ScottMeyers and MostHated like this.
unityunity