Skip to content

Commit

Permalink
* implemented cone raycasts for player look and tablet
Browse files Browse the repository at this point in the history
* warp points are now structured as a graph
* walkable grid is constructed much faster in editor
* made optional dialogue lower priority to ensure it doesn't interrupt
* adjusted some tablet ui
  • Loading branch information
BeauchesneFieldDay committed Oct 4, 2024
1 parent 29a730b commit 94e04f4
Show file tree
Hide file tree
Showing 41 changed files with 2,416 additions and 908 deletions.
4 changes: 1 addition & 3 deletions Assets/Code/GameScenes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ static public class BuildScenes {

// Scene 0: ExteriorScene_Logic - Assets/Scenes/ExteriorScene_Logic.unity
public static readonly SceneReference ExteriorScene_Logic = new SceneReference(0);
// Scene 1: ExteriorScene - Assets/Scenes/ExteriorScene.unity
public static readonly SceneReference ExteriorScene = new SceneReference(1);
// Scene 2: ExteriorScene_Nav - Assets/Scenes/ExteriorScene_Nav.unity
public static readonly SceneReference ExteriorScene_Nav = new SceneReference(2);
public static readonly SceneReference ExteriorScene_Nav = new SceneReference(1);
}
7 changes: 5 additions & 2 deletions Assets/Code/Nav/PenguinWalkableGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static internal class PenguinWalkableGridGenerator {
#region Walk Analyzer

static internal IEnumerator GenerateGridJob(PenguinWalkableGrid grid) {
using (Profiling.Time("generating walkable grid", ProfileTimeUnits.Microseconds)) {
using (Profiling.Time("generating walkable grid", ProfileTimeUnits.Milliseconds)) {
grid.GridParams = new NavRegionGrid(grid.transform.position, grid.Region, grid.Resolution);

Log.Msg("Voxel Count {0}x{1}={2}", grid.GridParams.CountX, grid.GridParams.CountZ, grid.GridParams.Count);
Expand Down Expand Up @@ -253,9 +253,12 @@ static internal IEnumerator GenerateGridJob(PenguinWalkableGrid grid) {
grid.WalkableGrid.Clear();
Unsafe.Clear(grid.Height);

int execStride = grid.GridParams.CountX * 5;
for (int i = 0; i < grid.GridParams.Count; i++) {
TryAddRaycast(grid, i);
yield return null;
if ((i + 1) % execStride == 0) {
yield return null;
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions Assets/Code/Pennycook.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ static private void PreBoot() {
[InvokeOnBoot]
static private void OnBoot() {
XRUtility.SetRefreshRate(90);
RaycastJobs.Initialize();

Game.Scenes.OnMainSceneReady.Register(() => {
ScriptUtility.Trigger(GameTriggers.SceneReady);
});
Game.Scenes.OnMainSceneLateEnable.Register(() => {
ScriptUtility.Invoke(GameTriggers.ScenePrepare);
});

GameLoop.OnShutdown.Register(() => {
RaycastJobs.Shutdown();
});
}
}
}
8 changes: 8 additions & 0 deletions Assets/Code/Physics.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 94e04f4

Please sign in to comment.