mosframe avatar

Blazor & Unity3D - FPS Game - Test Relay Server

mosframe

Published: 19 Nov 2019 › Updated: 19 Nov 2019Blazor & Unity3D - FPS Game - Test Relay Server

Blazor & Unity3D - FPS Game - Test Relay Server

Hello.
Today we have implemented a relay server for development testing.

The Unity WebGL version takes too long to build,
Before creating a Blazor version, you need to test it in the Unity Editor.
In order to provide a similar environment as possible WebGL version, it was produced using Websocket rather than TCP / UDP.

(Note that Websocket is a TCP-based protocol included in the HTTP5 specification.
It provides a TCP-like bidirectional communication through the HTTP / HTTPS port.
In other words, a single web service port can simultaneously use static web services or two-way communication.)

With ASP.NET Core, you can create simple middleware to request web services,
By separating websocket requests, you can easily service both at the same time.

Unfortunately, if you build WebGL in Unity yet, the .Net Websocket library won't work well without customization.
As an alternative, there is a library called Websocket-sharp (https://github.com/sta/websocket-sharp),
Since the purpose of this test is to use Blazor, we have not added any unnecessary libraries.

  1. Test Relay Server

Thank you.

Leave Blazor & Unity3D - FPS Game - Test Relay Server to:

Written by

Read more #blazor posts


Best Posts From mosframe

We have not curated any of mosframe's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From mosframe