Table of Contents

Network Options (UFE 1.x)

(Requires Network Addon)
P2P Network Addon is the first iteration of a network system for UFE. This structure allows you users via Peer-2-Peer connection (IP hosting).
To ensure a stable connection, P2P Network Addon uses Frame Delay (or Input Delay) and synchronized random seeds.

Available on UFE 2.0: Rollback netcode (similar to GGPO)


General

Fake Network: Toggle to run local network packaging tests. It forces local PvP matches to emulate a network game. Useful to test the Netcode without running 2 clients.

Force UFE Animation Control: UFE Netcode works by forcing a full synchronization between 2 clients. To ensure there are no desyncs, toggle this option to make it so the UFE Engine is always in charge of the animation control during online matches.

Apply Frame Delay Offline: UFE Netcode works by delaying inputs between clients according to connection quality. Depending on the game, you can make it so every match, including against CPU, always have the same standard delay as a network game. This ensures players will feel less discomfort when playing online games.

Disconnect on Desync: Depending on the modifications made to the engine, there is always a small chance of online desyncing between clients. To avoid different match results, enable this option to immediately force a disconnect.


Service

Network Service: Set the service type used for network games. Currently UFE 1.x only supports one type: P2P (Player-2-Player connection), but you can create your own Server structure over it using services such as Playfab and Photon.

Network Port: Set which Network port should the game use to connect between the clients. If you are testing your game using Play Mode under Unity, make sure your router and/or firewall are not blocking the port used.


Netcode

Min Frame Delay: When connection is ideal (<10ms ping) what is the best value for minimum input delay in your game? This value is also used in case you toggled Apply Frame Delay Offline. Large values makes the game more tolerant to lag spikes. On ideal connections it's recommended that you leave at least 4 frames (for 60 fps) or 3 (for 30 fps) to account for your FPS structure.

Max Frame Delay: In case of bad connections, how far can we increase the input delay before it relies on freezing the game to keep the network packages synchronized?


Bluetooth

If you plan on having your game running on Android devices you might want to set a bluetooth connection using Simple Bluetooth for Android available on the Asset Store.
To install it, once you import the asset, navigate go to .UFE\Engine\ThirdParty. And unpack BluetoothConnector.unitypackage. If it worked, you should see the following message under Network Options → General: Bluetooth installed.

In order to test it, go to GUI Options and under Screens, replace the current Main Menu UI with the alternative MainMenuScreenBluetooth.prefab (located under UFE\GUI\UI Prefabs\).
You should also see the option Bluetooth Game under the Network Mode group as well. Drag the BluetoothGameScreen.prefab to that field if its not there already.

Export your game to 2 Android devices and there you have it. Just select the bluetooth option and begin fighting!


Hints

Networking is a relatively complicated aspect of the engine. Don't be alarmed if you can't get running at first. Here are a few hints to help out on common issues:


Code access:

UFE.config.networkOptions


< Back to Global Editor