app.hypergames.hypersdk 1.11.0-beta.15 → 1.11.0-beta.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.11.0-beta.17](https://github.com/mvmhyper/hyper-sdk/compare/v1.11.0-beta.16...v1.11.0-beta.17) (2026-09-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **replay:** refine seek loading progress ([3d01f94](https://github.com/mvmhyper/hyper-sdk/commit/3d01f94d7e6ce360a61dd3d257149cf7f3237bcb))
|
|
7
|
+
|
|
8
|
+
# [1.11.0-beta.16](https://github.com/mvmhyper/hyper-sdk/compare/v1.11.0-beta.15...v1.11.0-beta.16) (2026-08-31)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **replay:** show seek preparation progress ([60213f7](https://github.com/mvmhyper/hyper-sdk/commit/60213f784c5bff39da4634590545fe4d0e4c0911))
|
|
14
|
+
|
|
1
15
|
# [1.11.0-beta.15](https://github.com/mvmhyper/hyper-sdk/compare/v1.11.0-beta.14...v1.11.0-beta.15) (2026-08-31)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -21,6 +21,9 @@ namespace Hyper.Internal
|
|
|
21
21
|
[SerializeField] private float[] playbackSpeeds = { 1.5f, 2f, 3f, 4f, 5f, 1f };
|
|
22
22
|
[SerializeField, Min(1f)] private float seekPlaybackSpeed = 10f;
|
|
23
23
|
[SerializeField, Range(0.25f, 1f)] private float seekSnapshotScale = 0.55f;
|
|
24
|
+
[SerializeField, Range(0f, 0.5f)] private float seekPreparationProgress = 0.2f;
|
|
25
|
+
[SerializeField, Range(0f, 0.15f)] private float seekPreparationProgressVariation = 0.05f;
|
|
26
|
+
[SerializeField, Min(0.1f)] private float seekPreparationDuration = 3f;
|
|
24
27
|
[SerializeField] private GameObject seekLoadingOverlay;
|
|
25
28
|
[SerializeField] private RawImage seekSnapshotImage;
|
|
26
29
|
|
|
@@ -33,6 +36,11 @@ namespace Hyper.Internal
|
|
|
33
36
|
private Image seekOverlayBackground;
|
|
34
37
|
private Color seekOverlayBackgroundColor;
|
|
35
38
|
private ReplaySeekOverlay seekOverlay;
|
|
39
|
+
private static readonly System.Random SeekProgressRandom = new System.Random();
|
|
40
|
+
private static float displayedSeekProgress;
|
|
41
|
+
private static float firstSeekPreparationTarget;
|
|
42
|
+
private static float secondSeekPreparationTarget;
|
|
43
|
+
private static float seekPreparationCeiling;
|
|
36
44
|
|
|
37
45
|
private void Awake()
|
|
38
46
|
{
|
|
@@ -195,6 +203,7 @@ namespace Hyper.Internal
|
|
|
195
203
|
|
|
196
204
|
float resumeSpeed = SanitizePlaybackSpeed(ReplaySessionState.UserPlaybackSpeed);
|
|
197
205
|
float fastForwardSpeed = SanitizePlaybackSpeed(seekPlaybackSpeed);
|
|
206
|
+
InitializeSeekProgressPresentation();
|
|
198
207
|
StartCoroutine(CaptureAndSeek(targetProgress, resumeSpeed, fastForwardSpeed));
|
|
199
208
|
}
|
|
200
209
|
|
|
@@ -420,22 +429,105 @@ namespace Hyper.Internal
|
|
|
420
429
|
{
|
|
421
430
|
if (seekOverlay == null) return;
|
|
422
431
|
|
|
423
|
-
float progress
|
|
432
|
+
float progress;
|
|
424
433
|
if (!isSeeking)
|
|
425
434
|
{
|
|
426
435
|
progress = 1f;
|
|
427
436
|
}
|
|
428
|
-
else if (
|
|
437
|
+
else if (isCapturingSeek || ReplaySessionState.IsSeekRestartPending)
|
|
429
438
|
{
|
|
439
|
+
AdvanceSeekPreparationProgress();
|
|
440
|
+
progress = displayedSeekProgress;
|
|
441
|
+
}
|
|
442
|
+
else
|
|
443
|
+
{
|
|
444
|
+
EnsureSeekProgressPresentation();
|
|
430
445
|
float target = ReplaySessionState.SeekTarget01;
|
|
431
|
-
|
|
446
|
+
float reconstructionProgress = target <= Mathf.Epsilon
|
|
432
447
|
? 1f
|
|
433
448
|
: ReplaySessionState.Progress01 / target;
|
|
449
|
+
float realProgress = Mathf.Lerp(
|
|
450
|
+
seekPreparationCeiling,
|
|
451
|
+
1f,
|
|
452
|
+
Mathf.Clamp01(reconstructionProgress));
|
|
453
|
+
AdvanceSeekReconstructionProgress(realProgress);
|
|
454
|
+
progress = displayedSeekProgress;
|
|
434
455
|
}
|
|
435
456
|
|
|
436
457
|
seekOverlay.SetProgress(progress);
|
|
437
458
|
}
|
|
438
459
|
|
|
460
|
+
private void AdvanceSeekPreparationProgress()
|
|
461
|
+
{
|
|
462
|
+
EnsureSeekProgressPresentation();
|
|
463
|
+
float duration = Mathf.Max(0.1f, seekPreparationDuration);
|
|
464
|
+
float deltaTime = Mathf.Min(Time.unscaledDeltaTime, 0.1f);
|
|
465
|
+
|
|
466
|
+
if (displayedSeekProgress < firstSeekPreparationTarget)
|
|
467
|
+
{
|
|
468
|
+
float speed = firstSeekPreparationTarget / (duration * 0.35f);
|
|
469
|
+
displayedSeekProgress = Mathf.MoveTowards(
|
|
470
|
+
displayedSeekProgress,
|
|
471
|
+
firstSeekPreparationTarget,
|
|
472
|
+
speed * deltaTime);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
if (displayedSeekProgress < secondSeekPreparationTarget)
|
|
477
|
+
{
|
|
478
|
+
float speed = (secondSeekPreparationTarget - firstSeekPreparationTarget) / (duration * 0.2f);
|
|
479
|
+
displayedSeekProgress = Mathf.MoveTowards(
|
|
480
|
+
displayedSeekProgress,
|
|
481
|
+
secondSeekPreparationTarget,
|
|
482
|
+
speed * deltaTime);
|
|
483
|
+
return;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
float crawlResponse = 1f - Mathf.Exp(-deltaTime / (duration * 0.65f));
|
|
487
|
+
displayedSeekProgress = Mathf.Lerp(displayedSeekProgress, seekPreparationCeiling, crawlResponse);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
private void InitializeSeekProgressPresentation()
|
|
491
|
+
{
|
|
492
|
+
float center = Mathf.Clamp01(seekPreparationProgress);
|
|
493
|
+
float variation = Mathf.Max(0f, seekPreparationProgressVariation);
|
|
494
|
+
float minimum = Mathf.Clamp01(center - variation);
|
|
495
|
+
float maximum = Mathf.Clamp01(center + variation);
|
|
496
|
+
|
|
497
|
+
displayedSeekProgress = 0f;
|
|
498
|
+
seekPreparationCeiling = RandomRange(minimum, maximum);
|
|
499
|
+
firstSeekPreparationTarget = seekPreparationCeiling * RandomRange(0.25f, 0.35f);
|
|
500
|
+
secondSeekPreparationTarget = seekPreparationCeiling * RandomRange(0.62f, 0.76f);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
private void EnsureSeekProgressPresentation()
|
|
504
|
+
{
|
|
505
|
+
if (seekPreparationCeiling > 0f) return;
|
|
506
|
+
InitializeSeekProgressPresentation();
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
private static float RandomRange(float minimum, float maximum)
|
|
510
|
+
{
|
|
511
|
+
if (maximum <= minimum) return minimum;
|
|
512
|
+
return minimum + ((float)SeekProgressRandom.NextDouble() * (maximum - minimum));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
private void AdvanceSeekReconstructionProgress(float realProgress)
|
|
516
|
+
{
|
|
517
|
+
float target = Mathf.Max(displayedSeekProgress, realProgress);
|
|
518
|
+
if (target >= 0.999f)
|
|
519
|
+
{
|
|
520
|
+
displayedSeekProgress = 1f;
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
float deltaTime = Mathf.Min(Time.unscaledDeltaTime, 0.1f);
|
|
525
|
+
float gap = target - displayedSeekProgress;
|
|
526
|
+
float responseSpeed = Mathf.Lerp(5f, 14f, Mathf.Clamp01(gap * 4f));
|
|
527
|
+
float response = 1f - Mathf.Exp(-responseSpeed * deltaTime);
|
|
528
|
+
displayedSeekProgress = Mathf.Lerp(displayedSeekProgress, target, response);
|
|
529
|
+
}
|
|
530
|
+
|
|
439
531
|
private void ConfigureSeekSnapshot()
|
|
440
532
|
{
|
|
441
533
|
if (seekSnapshotImage == null)
|
|
@@ -319,6 +319,9 @@ MonoBehaviour:
|
|
|
319
319
|
- 0.5
|
|
320
320
|
seekPlaybackSpeed: 10
|
|
321
321
|
seekSnapshotScale: 0.725
|
|
322
|
+
seekPreparationProgress: 0.2
|
|
323
|
+
seekPreparationProgressVariation: 0.05
|
|
324
|
+
seekPreparationDuration: 3
|
|
322
325
|
seekLoadingOverlay: {fileID: 0}
|
|
323
326
|
seekSnapshotImage: {fileID: 0}
|
|
324
327
|
--- !u!1 &1862654115017658012
|
|
@@ -288,7 +288,7 @@ MonoBehaviour:
|
|
|
288
288
|
m_Name:
|
|
289
289
|
m_EditorClassIdentifier:
|
|
290
290
|
m_Material: {fileID: 0}
|
|
291
|
-
m_Color: {r: 1, g: 1, b: 1, a: 0.
|
|
291
|
+
m_Color: {r: 1, g: 1, b: 1, a: 0.1764706}
|
|
292
292
|
m_RaycastTarget: 1
|
|
293
293
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
|
294
294
|
m_Maskable: 1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "app.hypergames.hypersdk",
|
|
3
|
-
"version": "1.11.0-beta.
|
|
3
|
+
"version": "1.11.0-beta.17",
|
|
4
4
|
"displayName": "HyperSDK",
|
|
5
5
|
"description": "Official Unity SDK for Hyper: multiplayer battles, leaderboards, deterministic RNG, session management, tutorials, and WebGL optimizations for production-ready games.",
|
|
6
6
|
"unity": "6000.0",
|