Headless Server

Options
Wobbles67
Wobbles67
edited May 2022 in Fusion

Hi,

I have followed the Fusion 100, tried all the examples and even created my own client host small examples. However, when it comes to the Headless Server example I am totally lost.

The example gives no indication of how the project needs to be structured. Are the Server and Clients completely separate builds? If they're separate, how on earth does a client connect to the scene defined in the headless server? Does the client need to use the same NetworkRunner defined in the server, if so how do you access it? Which one creates the rooms/sessions, the client or the server?

The client host makes perfect sense as the host and clients all use the same NetworkRunner and everything's in the same build, but I just can't get my head around the headless server sample. Can anyone give any more guidance on project structure and how a client connects to it?

Thanks for any help.

Answers

  • Wobbles67
    Options

    Okay, I have figured out the answer to at least two of my own questions:

    1. You need two separate Apps, one for the Headless Server and one for the Clients connecting. Both must use the same App ID from your Fusion Dashboard.
    2. The NetworkRunners are completely independent.

    Run the Headless Server example (you can add a SessionName if you want but it defaults to a random value).

    Run the client and call JoinSessionLobby(SessionLobby.ClientServer)

    This will show the headless server as a session you can join.

    Hope this helps others struggling with this.

  • Wobbles67
    Options

    Still looking for answers on how scene management should be handled when using a dedicated server. Still trying to work it out for myself, but haven't found a solution yet...

  • zdt11
    Options

    I'm in the same boat. I see from the discord there is a Dedicated Server Code / Docker / Orchestration sample on the way hopefully this week, so my plan is to do testing with player-as-host instead of spending days guessing at how to get a minimal topology up and running. Definitely seems odd that Fusion is touted as being built with dedicated server in mind with no clear path for new users to make it happen at the outset, but I guess it's all still new.

  • Wobbles67
    Options

    I managed to learn a bit more by taking a look at the KCC Add-on code. It has an option to start as just a server. It's hidden away in there but it tells you more than the useless headless server example does.

  • Is there an example of this type of project structure with fusion it's weird i can't see any example