Wiki source code of Traversal
Version 3.2 by Alexandros Mloukie on 2025/12/17 16:41
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
| |
2.1 | 1 | = 0 - Introduction = |
| 2 | |||
| 3 | Traversal defines the means through which the player explores the game world, and includes the mechanics and tools that allow the player to move from one point to another. | ||
| 4 | |||
| 5 | == 0.1 - Disclaimer == | ||
| 6 | |||
| 7 | The terminology used in this document (e.g. "Rock Climbing") functions as a conceptual descriptor of how the player's movement is affected by specific mechanics rather than literal items or objects. | ||
| 8 | |||
| 9 | == 0.2 - Design Philosophy == | ||
| 10 | |||
| 11 | Due to the high verticality of the game's level design, multiple vertical traversal mechanics are required to ensure fluid and engaging player movement. The goal is to combine these systems seamlessly, allowing the player to chain various traversal actions dynamically without breaking gameplay flow. | ||
| 12 | |||
| 13 | == 0.3 - Terminology == | ||
| 14 | |||
| 15 | (% class="table-bordered" %) | ||
| 16 | (% class="active" %)|=(% style="width: 169px;" %)Term|=(% style="width: 994px;" %)Meaning | ||
| 17 | |(% style="width:169px" %)PC|(% style="width:994px" %)Player Character | ||
| 18 | |(% style="width:169px" %) |(% style="width:994px" %) | ||
| 19 | |||
| 20 | ---- | ||
| 21 | |||
| 22 | = 1 - Traversal Mechanics = | ||
| 23 | |||
| 24 | == 1.1 - Basic Traversal == | ||
| 25 | |||
| 26 | (% class="table-bordered" %) | ||
| 27 | (% class="active" %)|=(% style="width: 167px;" %)Mechanic|=(% style="width: 995px;" %)Overview | ||
| 28 | |(% style="width:167px" %)Walking|(% style="width:995px" %)Standard for 3D games. Does not consume Stamina | ||
| 29 | |(% style="width:167px" %)Sprinting|(% style="width:995px" %)((( | ||
| 30 | Standard for 3D games | ||
| 31 | |||
| 32 | Features editable delays for acceleration/deceleration | ||
| 33 | |||
| 34 | Consumes Stamina over time | ||
| 35 | ))) | ||
| 36 | |(% style="width:167px" %)Jumping|(% style="width:995px" %)((( | ||
| 37 | True directional jumping | ||
| 38 | |||
| 39 | Consumes Stamina | ||
| 40 | |||
| 41 | PC remains steerable while airborne | ||
| 42 | ))) | ||
| 43 | |(% style="width:167px" %)Crouching|(% style="width:995px" %)((( | ||
| 44 | Standard crouch movement | ||
| 45 | |||
| 46 | Reduces visibility and hitbox size | ||
| 47 | |||
| 48 | Consumes stamina | ||
| 49 | ))) | ||
| 50 | |||
| 51 | == 1.2 Vertical Traversal == | ||
| 52 | |||
| 53 | (% class="table-bordered" %) | ||
| 54 | (% class="active" %)|=(% style="width: 168px;" %)Mechanic|=(% style="width: 995px;" %)Overview | ||
| 55 | |(% style="width:168px" %)Grappling Hook|(% style="width:995px" %)((( | ||
| 56 | Allows the player to attach to specific objects and climb up or down | ||
| 57 | |||
| 58 | The player can also swing to reach new surfaces | ||
| 59 | |||
| 60 | Consumes Stamina while the interaction is active | ||
| 61 | ))) | ||
| 62 | |(% style="width:168px" %)Rock Climbing|(% style="width:995px" %)((( | ||
| 63 | Enabled when interacting with designated surfaces | ||
| 64 | |||
| 65 | Upon activation the camera moves to 3rd person | ||
| 66 | |||
| 67 | The player can move along the vertical plane defined by the surface's orientation | ||
| 68 | |||
| 69 | If the player is touching the ground, no stamina is consumed | ||
| 70 | |||
| 71 | While not touching the ground, stamina is continuously consumed | ||
| 72 | |||
| 73 | If the player is actively moving, stamina is consumed faster | ||
| 74 | |||
| 75 | If stamina reaches 0, player enters a [[Freefall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] state | ||
| 76 | ))) | ||
| 77 | |(% style="width:168px" %)Rope|(% style="width:995px" %)((( | ||
| 78 | Restricts the PC's movement to the vertical axis | ||
| 79 | |||
| 80 | Stamina is consumed while the player is suspended or moving (LINK HERE!!!!!!!!!!!!!!!!!!) | ||
| 81 | |||
| 82 | If stamina reaches 0, player enters a [[Freefall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] state | ||
| 83 | ))) | ||
| 84 | |(% style="width:168px" %)Water|(% style="width:995px" %)Mitigates fall damage completely upon entry | ||
| 85 | |(% style="width:168px" %)Geyser|(% style="width:995px" %)((( | ||
| 86 | Launches the PC towards a vector defined per actor instance | ||
| 87 | |||
| 88 | Alternatively, it can add a launch vector to the PC's existing momentum | ||
| 89 | |||
| 90 | Both launching and landing consume stamina | ||
| 91 | |||
| 92 | If the PC is launched without the needed stamina, they enter the [[Freefall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] state | ||
| 93 | |||
| 94 | If the PC lands without the needed stamina, they get the [[Crippled>>doc:Test file.TestDocPort.WebHome||anchor="StatusList"]] status | ||
| 95 | ))) | ||
| 96 | |(% style="width:168px" %)Trampoline|(% style="width:995px" %)((( | ||
| 97 | Converts downwards momentum into upwards momentum | ||
| 98 | |||
| 99 | Allows the player to build and maintain speed | ||
| 100 | |||
| 101 | Each bounce consumes stamina | ||
| 102 | ))) | ||
| 103 | |||
| 104 | {{warning}} | ||
| 105 | [[image:icon:information]] Every mechanic that launches the PC by default puts them in the [[Controlled Fall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] state. For more info read the [[Player State Machine>>doc:Test file.TestDocPort.WebHome]] document | ||
| 106 | {{/warning}} | ||
| 107 | |||
| |
3.1 | 108 | == 1.3 - Horizontal Traversal == |
| |
2.1 | 109 | |
| 110 | (% class="table-bordered" %) | ||
| 111 | (% class="active" %)|=(% style="width: 166px;" %)Mechanic|=(% style="width: 997px;" %)Overview | ||
| 112 | |(% style="width:166px" %)Rail Skating|(% style="width:997px" %)((( | ||
| 113 | The PC automatically snaps onto a predefined spline and follows it | ||
| 114 | |||
| 115 | The player can jump off at any moment at the cost of stamina | ||
| 116 | |||
| 117 | Splines can branch into multiple paths from which the player can choose using their standard movement input | ||
| 118 | |||
| 119 | While skating, stamina neither regenerates nor depletes | ||
| 120 | ))) | ||
| 121 | |(% style="width:166px" %)Grappling Hook|(% style="width:997px" %)((( | ||
| 122 | Can be used to propel the player in a horizontal direction | ||
| 123 | |||
| 124 | Allows traversal over gaps and hazards | ||
| 125 | ))) | ||
| 126 | |||
| 127 | ---- | ||
| 128 | |||
| 129 | = 2 - Technical Documentation = | ||
| 130 | |||
| 131 | == 2.1 - Walking Data == | ||
| 132 | |||
| 133 | (% class="table-bordered" %) | ||
| |
3.1 | 134 | (% class="active" %)|=(% style="width: 250px;" %)Parameter|=(% style="width: 243px;" %)Type|=Description |
| 135 | |(% style="width:250px" %)Walk Speed|(% style="width:243px" %){{success}}Float{{/success}}|The PC's base walking speed | ||
| 136 | |(% style="width:250px" %)Acceleration|(% style="width:243px" %){{success}}Float{{/success}}|Time required to reach max walking speed | ||
| 137 | |(% style="width:250px" %)Deceleration|(% style="width:243px" %){{success}}Float{{/success}}|Time required to come to a full stop | ||
| 138 | |(% style="width:250px" %)Footstep Sound Cue|(% style="width:243px" %){{info}}Asset Reference{{/info}}|Defines the sound asset played when walking on a surface type | ||
| 139 | |(% style="width:250px" %)Stamina Cost per Second|(% style="width:243px" %){{success}}Float{{/success}}|Defines the stamina loss in special situation | ||
| |
2.1 | 140 | |
| |
3.1 | 141 | == 2.2 - Sprinting Data == |
| 142 | |||
| 143 | (% class="table-bordered" %) | ||
| 144 | (% class="active" %)|=(% style="width: 249px;" %)Parameter|=(% style="width: 213px;" %)Type|=(% style="width: 701px;" %)Description | ||
| 145 | |(% style="width:249px" %)Sprint Speed Multiplier|(% style="width:213px" %){{success}}Float{{/success}}|(% style="width:701px" %)Walk Speed multiplier applied while Sprinting | ||
| 146 | |(% style="width:249px" %)Acceleration Delay|(% style="width:213px" %){{success}}Float{{/success}}|(% style="width:701px" %)Time before reaching max sprint speed | ||
| 147 | |(% style="width:249px" %)Deceleration Delay|(% style="width:213px" %){{success}}Float{{/success}}|(% style="width:701px" %)Time before returning to normal speed when sprinting stops | ||
| 148 | |(% style="width:249px" %)Stamina Cost per Second|(% style="width:213px" %){{success}}Float{{/success}}|(% style="width:701px" %)Stamina drain while sprinting | ||
| 149 | |(% style="width:249px" %)Minimum Stamina to Start Sprint|(% style="width:213px" %){{success}}Float{{/success}}|(% style="width:701px" %)Minimum stamina amount required to initiate a sprint | ||
| 150 | |(% style="width:249px" %)Camera FOV Change|(% style="width:213px" %){{success}}Float{{/success}}|(% style="width:701px" %)Defines the FOV change while sprinting (visual feedback) | ||
| 151 | |||
| 152 | == 2.3 Jumping Data == | ||
| 153 | |||
| 154 | (% class="table-bordered" %) | ||
| 155 | (% class="active" %)|=(% style="width: 248px;" %)Parameter|=(% style="width: 215px;" %)Type|=(% style="width: 700px;" %)Description | ||
| 156 | |(% style="width:248px" %)Jump Height|(% style="width:215px" %){{success}}Float{{/success}}|(% style="width:700px" %)Determines the height of the PC's jump | ||
| 157 | |(% style="width:248px" %)Air Control Multiplies|(% style="width:215px" %){{success}}Float{{/success}}|(% style="width:700px" %)Defines how much directional control the player has mid-air | ||
| 158 | |(% style="width:248px" %)Stamina Cost|(% style="width:215px" %){{success}}Float{{/success}}|(% style="width:700px" %)Determines the stamina cost to perform a jump | ||
| 159 | |(% style="width:248px" %)Coyote Time|(% style="width:215px" %){{success}}Float{{/success}}|(% style="width:700px" %)Time window after walking off a ledge that the player can still jump | ||
| 160 | |(% style="width:248px" %)Landing Recovery Time|(% style="width:215px" %){{success}}Float{{/success}}|(% style="width:700px" %)Recovery time after landing before movement fully resumes | ||
| 161 | |||
| 162 | == 2.4 Crouching Data == | ||
| 163 | |||
| 164 | (% class="table-bordered" %) | ||
| 165 | (% class="active" %)|=(% style="width: 247px;" %)Parameter|=(% style="width: 217px;" %)Type|=Description | ||
| 166 | |(% style="width:247px" %)Crouch Speed|(% style="width:217px" %){{success}}Float{{/success}}|Movement speed while crouched | ||
| 167 | |(% style="width:247px" %)Transition Speed|(% style="width:217px" %){{success}}Float{{/success}}|Time to transition between standing and crouching | ||
| 168 | |(% style="width:247px" %)Collider Height|(% style="width:217px" %){{success}}Float{{/success}}|Capsule height while crouched | ||
| 169 | |(% style="width:247px" %)Stamina Cost per Second|(% style="width:217px" %){{success}}Float{{/success}}|Stamina drain while crouched | ||
| 170 | |(% style="width:247px" %)Visibility Modifier|(% style="width:217px" %){{success}}Float{{/success}}|Reduction to the detectibility of the player by enemy AI | ||
| 171 | |(% style="width:247px" %)Noise Reduction Multiplies|(% style="width:217px" %){{success}}Float{{/success}}|Scalar applied to the sound produced while moving | ||
| 172 | |||
| 173 | == 2.5 Grappling Hook == | ||
| 174 | |||
| 175 | (% class="table-bordered" %) | ||
| 176 | (% class="active" %)|=(% style="width: 245px;" %)Parameter|=(% style="width: 216px;" %)Type|=(% style="width: 702px;" %)Description | ||
| 177 | |(% style="width:245px" %)Hook Target|(% style="width:216px" %){{info}}Actor Reference{{/info}}|(% style="width:702px" %)Defines the object that the grapple line is attached to | ||
| 178 | |(% style="width:245px" %)Hook Range|(% style="width:216px" %){{success}}Float{{/success}}|(% style="width:702px" %)Maximum distance the Grappling Hook can attach to | ||
| 179 | |(% style="width:245px" %)Climb Speed|(% style="width:216px" %){{success}}Float{{/success}}|(% style="width:702px" %)Speed at which the player ascends or descends along the rope | ||
| 180 | |(% style="width:245px" %)Swing Speed Multiplier|(% style="width:216px" %){{success}}Float{{/success}}|(% style="width:702px" %)Controls how much forward momentum the player gains while swinging | ||
| 181 | |(% style="width:245px" %)Stamina Cost per Second|(% style="width:216px" %){{success}}Float{{/success}}|(% style="width:702px" %)Defines how fast stamina drains | ||
| 182 | |||
| 183 | == 2.6 Rock Climbing == | ||
| 184 | |||
| 185 | (% class="table-bordered" %) | ||
| 186 | (% class="active" %)|=(% style="width: 244px;" %)Parameter|=(% style="width: 217px;" %)Type|=(% style="width: 702px;" %)Description | ||
| 187 | |(% style="width:244px" %)Surface Bounds|(% style="width:217px" %){{info}}Actor Reference{{/info}}|(% style="width:702px" %)Defines the climbable area's bounds | ||
| 188 | |(% style="width:244px" %)Climb Speed|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:702px" %)Defines the movement speed of the player along the surface | ||
| 189 | |(% style="width:244px" %)Camera Offset|(% style="width:217px" %){{warning}}Vector3{{/warning}}|(% style="width:702px" %)Camera offset relative to the player while climbing | ||
| 190 | |(% style="width:244px" %)Stamina Cost|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:702px" %)Stamina drain while attached to the surface | ||
| 191 | |(% style="width:244px" %)Stamina Cost per Movement|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:702px" %)Stamina drain while moving along the surface | ||
| 192 | |(% style="width:244px" %)Fall Threshold Stamina|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:702px" %)Minimum stamina required to prevent entering the Freefall state | ||
| 193 | |||
| 194 | == 2.7 Rope == | ||
| 195 | |||
| 196 | (% class="table-bordered" %) | ||
| 197 | (% class="active" %)|=(% style="width: 243px;" %)Parameter|=(% style="width: 217px;" %)Type|=(% style="width: 703px;" %)Description | ||
| 198 | |(% style="width:243px" %)Rope Length|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:703px" %)Defines the length of the climbable segment of rope | ||
| 199 | |(% style="width:243px" %)Attach Point|(% style="width:217px" %){{warning}}Vector3{{/warning}}|(% style="width:703px" %)World-space location of the rope anchor point | ||
| 200 | |(% style="width:243px" %)Swing Speed|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:703px" %)Optional parameter for when the rope allows for limited swinging | ||
| 201 | |(% style="width:243px" %)Stamina Cost per Second|(% style="width:217px" %){{success}}Float{{/success}}|(% style="width:703px" %)Stamina drain while handing or moving along the rope | ||
| 202 | |||
| 203 | == 2.8 Geyser == | ||
| 204 | |||
| 205 | (% class="table-bordered" %) | ||
| 206 | (% class="active" %)|=(% style="width: 242px;" %)Parameter|=(% style="width: 219px;" %)Type|=(% style="width: 702px;" %)Description | ||
| 207 | |(% style="width:242px" %)Launch Vector|(% style="width:219px" %){{warning}}Vector3{{/warning}}|(% style="width:702px" %)Defines the launch direction | ||
| 208 | |(% style="width:242px" %)Launch Force|(% style="width:219px" %){{success}}Float{{/success}}|(% style="width:702px" %)The magnitude of the launch vector | ||
| 209 | |(% style="width:242px" %)AddToMomentum?|(% style="width:219px" %){{error}}Boolean{{/error}}|(% style="width:702px" %)If true, adds to the player's existing velocity instead of setting it | ||
| 210 | |(% style="width:242px" %)Min Stamina Required|(% style="width:219px" %){{success}}Float{{/success}}|(% style="width:702px" %)Minimum stamina required to enter [[Controlled Fall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] instead of [[Freefall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] on launch | ||
| 211 | |(% style="width:242px" %)Cooldown Time|(% style="width:219px" %){{success}}Float{{/success}}|(% style="width:702px" %)Time before the Geyser can be activated again | ||
| 212 | |||
| 213 | == 2.9 Trampoline == | ||
| 214 | |||
| 215 | (% class="table-bordered" %) | ||
| 216 | (% class="active" %)|=(% style="width: 241px;" %)Parameter|=(% style="width: 219px;" %)Type|=(% style="width: 703px;" %)Description | ||
| 217 | |(% style="width:241px" %)Bounce Multiplier|(% style="width:219px" %){{success}}Float{{/success}}|(% style="width:703px" %)Controls how much vertical velocity is retained or increased after impact | ||
| 218 | |(% style="width:241px" %)Max Chain Bounces|(% style="width:219px" %){{success}}Integer{{/success}}|(% style="width:703px" %)Defines how many consecutive bounces can be performed before losing momentum | ||
| 219 | |(% style="width:241px" %)Stamina Cost per Bounce|(% style="width:219px" %){{success}}Float{{/success}}|(% style="width:703px" %)Stamina drained on each bounce | ||
| 220 | |(% style="width:241px" %)Min Stamina Required|(% style="width:219px" %){{success}}Float{{/success}}|(% style="width:703px" %)Minimim stamina required to enter [[Controlled Fall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] instead of [[Freefall>>doc:Test file.TestDocPort.WebHome||anchor="PlayerStates"]] | ||
| 221 | |||
| 222 | == 2.10 Rail Spline == | ||
| 223 | |||
| 224 | (% class="table-bordered" %) | ||
| 225 | (% class="active" %)|=(% style="width: 239px;" %)Parameter|=(% style="width: 221px;" %)Type|=(% style="width: 703px;" %)Description | ||
| 226 | |(% style="width:239px" %)Spline Path|(% style="width:221px" %){{info}}Asset Reference{{/info}}|(% style="width:703px" %)Defines the spline asset used | ||
| 227 | |(% style="width:239px" %)Base Speed|(% style="width:221px" %){{success}}Float{{/success}}|(% style="width:703px" %)Default speed along spline | ||
| 228 | |(% style="width:239px" %)Branch Nodes|(% style="width:221px" %){{info}}Asset Reference{{/info}} [ Array ]|(% style="width:703px" %)The array of branch paths the player can switch to | ||
| 229 | |(% style="width:239px" %)Allow Mid-Air Attach?|(% style="width:221px" %){{error}}Boolean{{/error}}|(% style="width:703px" %)Defines if the PC can attach mid-jump |