-
Notifications
You must be signed in to change notification settings - Fork 0
Speed Zones
-
Dedicated
Map<String, Float>structures isolate speed modifiers, lettingkeyWaypointsretain only navigation pivots and visual anchors. -
Rendering helpers (
markKeypoint,markPathTile) touch only waypoint visuals and invalid-tile bookkeeping, so slow zones can change without repaint side effects. -
Mirror logic in
MapEditor2keeps the second lane’s geometry and speed changes equally independent.
Sources: source/core/src/main/com/csse3200/game/areas/MapEditor.java
-
generateEnemyPath()composes both geometric routes and speed modifiers in one pass, creating waypoint entities only when a coordinate is either a key turn or a speed-zone marker. -
connectWaypointsWithPath()/connectWaypoints2WithPath()emit path tiles viageneratePathBetweenPoints, keeping the visual lane and speed logic locked together. -
ForestGameArea.spawnPlayer()andForestGameArea2.spawnPlayer()consume the finishedwaypointList, so every factory receives synchronized data.
Sources:
source/core/src/main/com/csse3200/game/areas/MapEditor
source/core/src/main/com/csse3200/game/areas2/MapTwo/ForestGameArea2
- Game areas spawn crystals and snow trees while registering their coordinates via
registerBarrierCoords/registerSnowTreeCoords, keeping theMapEditorinvalid grid aligned with scene obstacles. -
placementController.refreshInvalidTiles()mergespathTiles, barriers, snow trees, and snow tiles, ensuring build UI and highlight overlays honor both paths and scenery.
Sources:
source/core/src/main/com/csse3200/game/areas/ForestGameArea
source/core/src/main/com/csse3200/game/areas/MapEditor
- Enemies slow only while inside a waypoint carrying
SpeedWaypointComponent; once absent,WaypointComponentfalls back to the factory’s default speed (e.g.,GruntEnemyFactory.DEFAULT_SPEED). - Unit coverage (
EnemySpeedWaypointTest#gruntEnemySlowsDownAtSpeedWaypoint) verifies the slowdown to(0.4f, 0.4f)and implicitly the automatic recovery when leaving the slow zone.
Sources: source/core/src/main/com/csse3200/game/entities/factories/GruntEnemyFactory.java
Sure! Here's the English version in Markdown format, following the exact style of your previous sections:
- Swamp slow tiles are visually highlighted using a procedurally generated pulse effect, rendered above the terrain to indicate movement penalties clearly.
- The overlay features scaling ripples, alpha breathing, and inner highlight animation, simulating viscous swamp terrain without requiring any external textures or art assets.
- All visuals are handled by
SlowZoneVisualComponent.update()anddraw(), while the radial texture is generated once inensureRegion()and shared across all swamp tiles to minimize GPU cost. - This system is purely visual — enemy slowdown is still governed exclusively by
SpeedWaypointComponent, ensuring gameplay logic remains decoupled from visual effects.
Sources:
source/core/src/main/com/csse3200/game/components/effects/SlowZoneVisualComponent.java
source/core/src/main/com/csse3200/game/entities/factories/SlowZoneEffectFactory.java
source/core/src/main/com/csse3200/game/areas/ForestGameArea.java