Skip to content

Releases: hathora/hathora-unreal-sdk

v0.2.1

01 Jun 00:42
04825c4
Compare
Choose a tag to compare

Adding support for DiscoveryV2 API to enable new Dallas region!

"Get Pings" demo widget will also retrieve Dallas pings now as well

v0.2.0

07 Nov 17:19
0b15f30
Compare
Choose a tag to compare

Pinging via ICMP

This release switches the implementation of GetRegionalPings to use Hathora Cloud's new regional ICMP pinging support; the SDK no longer supports pinging with WebSockets. Using ICMP is more reliable and accurate than WebSockets, and the Unreal SDK abstracts the nuances away.

Breaking Changes

  • To better structure the SDK for upcoming changes, we dropped the UHathoraPing class in favor of a common UHathoraSDK class. Instead of creating an instance of UHathoraPing and then calling GetRegionalPings, you can call the static method UHathoraSDK::GetRegionalPings(...).
  • To support Blueprint usage, we changed the OnComplete delegate passed to GetRegionalPings to be a Dynamic Delegate, which means you can no longer call UHathoraSDK::GetRegionalPings from a non-UObject (e.g. Slate components). If you are using a Slate component, you can either wrap it with a UWidget and have the call occur in the child UWidget class or convert the Slate component to a full UUserWidget. For the purposes of the provided sample project in this repo, we opted to change SDemoMenuWidget : SCompoundWidget to UDemoMenuWidget : UUserWidget.

You can find an example on how to call UHathoraSDK::GetRegionalPings at https://github.com/hathora/hathora-unreal-sdk/blob/main/SDKDemo/Source/SDKDemo/DemoMenuWidget.cpp#L93-L95

Features

  • ICMP pinging support
  • Ping each region multiple times (defaults to 3)
  • Blueprint support

ICMP pinging support

The main interface of how the pings are handled is abstracted for you with UHathoraSDK::GetRegionalPings, but it should be noted that each ICMP echo has a default timeout of 1 second. You can change this in the new Edit > Project Settings... > Plugins submenu > Hathora SDK menu (or just search for ping timeout):

image

If you want to save the change for your entire project/team, make sure to click the Set as Default button at the top; this will save the setting in Config/DefaultGame.ini which you can add to your version control. If you don't do this, the setting will only apply to your instance of the Unreal project.

Ping each region multiple times

The GetRegionalPings function now takes an optional second argument int32 NumPingsPerRegion which defaults to 3. The SDK will execute the following when calling this function:

  1. Call the GetPingServiceEndpoints API call
  2. Send an ICMP echo for each region once in parallel
  3. After receiving a result for each region, step 2 is repeated NumPingsPerRegion - 1 times. The SDK waits until a result is returned from each region before sending another set of pings to prevent some of the ICMP echos from being ignored/dropped due to subsequent/overlap requests.
  4. After running step 2 a total of NumPingsPerRegion times, the minimum is returned for each region. If a particular region timed out or was unreachable otherwise for each ping, it is omitted from the callback delegate.

Blueprint support

We've added Blueprint support for the SDK!

image

For this release, the Get Regional Pings node shown in the above image is all you need to get started:

image

The Create Hathora SDK node will be useful in a future release.

v0.2.0-rc.2

03 Nov 20:59
0b15f30
Compare
Choose a tag to compare
v0.2.0-rc.2 Pre-release
Pre-release

Pinging via ICMP

This release switches the implementation of GetRegionalPings to use Hathora Cloud's new regional ICMP pinging support; the SDK no longer supports pinging with WebSockets. Using ICMP is more reliable and accurate than WebSockets, and the Unreal SDK abstracts the nuances away.

Breaking Changes

  • To better structure the SDK for upcoming changes, we dropped the UHathoraPing class in favor of a common UHathoraSDK class. Instead of creating an instance of UHathoraPing and then calling GetRegionalPings, you can call the static method UHathoraSDK::GetRegionalPings(...).
  • To support Blueprint usage, we changed the OnComplete delegate passed to GetRegionalPings to be a Dynamic Delegate, which means you can no longer call UHathoraSDK::GetRegionalPings from a non-UObject (e.g. Slate components). If you are using a Slate component, you can either wrap it with a UWidget and have the call occur in the child UWidget class or convert the Slate component to a full UUserWidget. For the purposes of the provided sample project in this repo, we opted to change SDemoMenuWidget : SCompoundWidget to UDemoMenuWidget : UUserWidget.

You can find an example on how to call UHathoraSDK::GetRegionalPings at https://github.com/hathora/hathora-unreal-sdk/blob/main/SDKDemo/Source/SDKDemo/DemoMenuWidget.cpp#L93-L95

Features

  • ICMP pinging support
  • Ping each region multiple times (defaults to 3)
  • Blueprint support

ICMP pinging support

The main interface of how the pings are handled is abstracted for you with UHathoraSDK::GetRegionalPings, but it should be noted that each ICMP echo has a default timeout of 1 second. You can change this in the new Edit > Project Settings... > Plugins submenu > Hathora SDK menu (or just search for ping timeout):

image

If you want to save the change for your entire project/team, make sure to click the Set as Default button at the top; this will save the setting in Config/DefaultGame.ini which you can add to your version control. If you don't do this, the setting will only apply to your instance of the Unreal project.

Ping each region multiple times

The GetRegionalPings function now takes an optional second argument int32 NumPingsPerRegion which defaults to 3. The SDK will execute the following when calling this function:

  1. Call the GetPingServiceEndpoints API call
  2. Send an ICMP echo for each region once in parallel
  3. After receiving a result for each region, step 2 is repeated NumPingsPerRegion - 1 times. The SDK waits until a result is returned from each region before sending another set of pings to prevent some of the ICMP echos from being ignored/dropped due to subsequent/overlap requests.
  4. After running step 2 a total of NumPingsPerRegion times, the minimum is returned for each region. If a particular region timed out or was unreachable otherwise for each ping, it is omitted from the callback delegate.

Blueprint support

We've added Blueprint support for the SDK!

image

For this release, the Get Regional Pings node shown in the above image is all you need to get started:

image

The Create Hathora SDK node will be useful in a future release.

v0.2.0-rc.1

30 Oct 21:01
28360e8
Compare
Choose a tag to compare
v0.2.0-rc.1 Pre-release
Pre-release

Pinging via ICMP

This release switches the implementation of GetRegionalPings to use Hathora Cloud's new regional ICMP pinging support; the SDK no longer supports pinging with WebSockets. Using ICMP is more reliable and accurate than WebSockets, and the Unreal SDK abstracts the nuances away.

Breaking Changes

  • To better structure the SDK for upcoming changes, we dropped the UHathoraPing class in favor of a common UHathoraSDK class. Instead of creating an instance of UHathoraPing and then calling GetRegionalPings, you can call the static method UHathoraSDK::GetRegionalPings(...).
  • To support Blueprint usage, we changed the OnComplete delegate passed to GetRegionalPings to be a Dynamic Delegate, which means you can no longer call UHathoraSDK::GetRegionalPings from a non-UObject (e.g. Slate components). If you are using a Slate component, you can either wrap it with a UWidget and have the call occur in the child UWidget class or convert the Slate component to a full UUserWidget. For the purposes of the provided sample project in this repo, we opted to change SDemoMenuWidget : SCompoundWidget to UDemoMenuWidget : UUserWidget.

You can find an example on how to call UHathoraSDK::GetRegionalPings at https://github.com/hathora/hathora-unreal-sdk/blob/main/SDKDemo/Source/SDKDemo/DemoMenuWidget.cpp#L93-L95

Features

  • ICMP pinging support
  • Ping each region multiple times (defaults to 3)
  • Blueprint support

ICMP pinging support

The main interface of how the pings are handled is abstracted for you with UHathoraSDK::GetRegionalPings, but it should be noted that each ICMP echo has a default timeout of 1 second. You can change this in the new Edit > Project Settings... > Plugins submenu > Hathora SDK menu (or just search for ping timeout):

image

If you want to save the change for your entire project/team, make sure to click the Set as Default button at the top; this will save the setting in Config/DefaultGame.ini which you can add to your version control. If you don't do this, the setting will only apply to your instance of the Unreal project.

Ping each region multiple times

The GetRegionalPings function now takes an optional second argument int32 NumPingsPerRegion which defaults to 3. The SDK will execute the following when calling this function:

  1. Call the GetPingServiceEndpoints API call
  2. Send an ICMP echo for each region once in parallel
  3. After receiving a result for each region, step 2 is repeated NumPingsPerRegion - 1 times. The SDK waits until a result is returned from each region before sending another set of pings to prevent some of the ICMP echos from being ignored/dropped due to subsequent/overlap requests.
  4. After running step 2 a total of NumPingsPerRegion times, the minimum is returned for each region. If a particular region timed out or was unreachable otherwise for each ping, it is omitted from the callback delegate.

Blueprint support

We've added Blueprint support for the SDK!

image

For this release, the Get Regional Pings node shown in the above image is all you need to get started:

image

The Create Hathora SDK node will be useful in a future release.

v0.1.0

08 Sep 17:35
25a27c1
Compare
Choose a tag to compare
Revert "Hathora SDK Improvements (#3)" (#5)

This reverts commit 9a1506988f3be157fe9c72f5b2cf1f20f7cb6c1a.