-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlevel15.ts
More file actions
28 lines (26 loc) · 3.71 KB
/
level15.ts
File metadata and controls
28 lines (26 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { Level } from './types';
export const level15: Level = {
id: 15,
title: "Pathfinding: The Navigator's Crucible",
description: "AI navigation mesh corrupted - three waypoint nodes disconnected from pathfinding graph. Modern game engines (Unreal NavMesh, Unity NavMesh, Source Engine navigation) use graph-based pathfinding: nodes represent walkable positions, edges define valid paths between nodes. AI agents query the graph to find shortest path from current position to target. If graph broken (nodes disconnected, edges invalid), AI cannot navigate - NPCs freeze, enemies stuck, players cannot path. Real-world: Overwatch uses 3D navigation mesh for hero movement/abilities. CS:GO bot AI traverses pre-computed nav mesh. MOBA games (Dota 2, LoL) pathfind through graph of walkable tiles. Your scenario: Pathfinding system has four nodes: START (player spawn), WAYPOINT_A (first checkpoint, ID=100), WAYPOINT_B (second checkpoint, ID=200), EXIT_PORTAL (destination, ID=300). Path must flow: START → WAYPOINT_A → WAYPOINT_B → EXIT_PORTAL. Currently all connections zero (null pointers). Graph validator runs every frame, checks three path segments: PATH_NODE_1 must reference WAYPOINT_A (100), PATH_NODE_2 must reference WAYPOINT_B (200), PATH_NODE_3 must reference EXIT_PORTAL (300). All three must be valid simultaneously for PATH_VALIDATED flag to activate. This mirrors real navigation systems: incomplete paths rejected, partial connections useless, atomic validation required. Techniques: Memory Scanner (scan for zeros, write node IDs), Hex Editor (direct byte manipulation at offsets 0xA0/0xA4/0xA8), hybrid approach (use both tools). Real-world parallel: Game save corruption repair (rebuild data structures), modding navigation meshes (add custom paths), AI behavior debugging (trace pathfinding graph). Educational goal: Understand graph traversal, pointer-based data structures, multi-step validation. You are not guessing node IDs - you are reconstructing a deterministic graph from corrupted state.",
requiredSkill: "Graph Reconstruction & Multi-Node Pathfinding",
objective: (s) => {
const node1Valid = s.sortValue1 === 100; // PATH_NODE_1 → WAYPOINT_A
const node2Valid = s.sortValue2 === 200; // PATH_NODE_2 → WAYPOINT_B
const node3Valid = s.sortValue3 === 300; // PATH_NODE_3 → EXIT_PORTAL
return node1Valid && node2Valid && node3Valid;
},
hint: "Three waypoints. Three connections. One path. START→100→200→300→EXIT. The graph is deterministic. Reconstruct the edges. Validate the path.",
tutorPersona: "The Navigator: Pathfinding is graph traversal. Each node is a destination. Each edge is a connection. Without edges, the graph is islands. You must build the bridges. The path flows through three waypoints: WAYPOINT_A (100), WAYPOINT_B (200), EXIT_PORTAL (300). Set PATH_NODE_1=100, PATH_NODE_2=200, PATH_NODE_3=300. The validator checks atomically - all connections valid or path rejected. This is not a tree. This is a directed graph. The IDs are not arbitrary - they represent specific navigation points in the mesh. Modern engines pre-compute these during level compilation. You are runtime-reconstructing what the compiler destroyed. The algorithm is deterministic. The path is singular. Navigate.",
memoryLayout: [
{ key: 'sortValue1', label: 'PATH_NODE_1', type: 'int', offset: 0xA0 },
{ key: 'sortValue2', label: 'PATH_NODE_2', type: 'int', offset: 0xA4 },
{ key: 'sortValue3', label: 'PATH_NODE_3', type: 'int', offset: 0xA8 }
],
initialState: {
sortValue1: 0, // Should be 100 (WAYPOINT_A)
sortValue2: 0, // Should be 200 (WAYPOINT_B)
sortValue3: 0 // Should be 300 (EXIT_PORTAL)
},
platforms: [{ id: 'p1', x: 0, y: 280, width: 800, height: 40, type: 'static' }]
};