Fish-Networking

This demo allows you to see the work of the MCT together with Fishnet. After playing in this demo, you will see how the game room with the settings starts. You can also control your character in the arena created with ProBuilder. You will also see a list of players in the room.

In this demo you can see four scenes.

Each scene has its own logic.

  • Master is for running master server and its modules, such as auth, room, spawners and another scripts you need to run your game properly on the backend.
  • Client scene is for running main menu, auth form, showing players list and starting new room using spawner system of MST.
  • Room scene is main gameplay scene that runs Fishnet logic. This scene contains all the managers required to run client-server gameplay. It also contain room connection validator and room player info and his profile.
  • Spawner scene is for spawning room remotely if your master and room placed separately from each other, I mean master is on one VDS, room is on another.

Master Scene

You can see master server component and its children in it, also known as modules

Spawner is for starting your new room-server using matchmaking system of MST. Connection to master component is required for spawner to be connected as client to master server.

Client Scene

In this scene you can see three main system. Master canvas has views to help you to do the following:

UI

  • SimpleSignInView - helps you to sign in user as guest player. It has basic logic of auth system of MST.
  • ClientInformationView - just shows a connection status of player and its username.
  • GamesListView - shows games list(rooms list) started both by you and other users.
  • CreateNewRoomView - helps you to start new fishnet server giving its parameters such as Region, password, server name and max allowed connections. This logic runs in MatchmakingBehaviour component assigned to --CLIENT_MANAGER object.
  • PasswordInputDialogBoxView - if fishnet server has password you will be required to input it here.
  • PlayersListView - just shows you list of all players joined fishnet servers.

RoomClientManager(--ROOM_CLIENT)

Helps you to join fishnet server using access validation process. This component is closely related to the logic working inside of MatchmakingBehaviour component mentioned above.

RoomServerManager(--ROOM_SERVER)

Helps you to start fishnet connection to server. This component has to be marked as Force Client Mode to prevent starting room server and all its events in client scene.

This component works both inside the Room scene and inside the Client scene in almost the same way. It helps to run all Fishnet systems using MST systems.

Offline and Online Scenes

You should also assign DefaultScene component to RoomServerManager(--ROOM_SERVER). This will run proper way of changing scenes.

By default this component has to have two scenes. First is offline scene and the second is online scene. Assign these two scenes.

Room Scene

Has both RoomClientManager(--ROOM_CLIENT) andRoomServerManager(--ROOM_SERVER) to run server logic. But in this way client manager helps you to run the both server and client logic in unity editor. This will help you debug your gameplay logic without building standalone player. Do not forget to check off Force Client Mode.

Quick build

To quickly build standalone player you can use this menu. 

This includes all required scenes and create application config file for your player. All players will be built in its own folders.

If you have any questions of integration of fishnet with MST please ask in my discord.